aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pygments_api/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pygments_api/views.py')
-rw-r--r--examples/pygments_api/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/pygments_api/views.py b/examples/pygments_api/views.py
index 884cff3a..ffea60ae 100644
--- a/examples/pygments_api/views.py
+++ b/examples/pygments_api/views.py
@@ -22,6 +22,9 @@ import operator
HIGHLIGHTED_CODE_DIR = os.path.join(settings.MEDIA_ROOT, 'pygments')
MAX_FILES = 10
+if not os.path.exists(HIGHLIGHTED_CODE_DIR):
+ os.makedirs(HIGHLIGHTED_CODE_DIR)
+
def list_dir_sorted_by_ctime(dir):
"""