aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTom Christie2011-12-30 15:51:00 +0000
committerTom Christie2011-12-30 15:51:06 +0000
commitfd449204c1e2987bd2f05b43ab3ed03e7569f99a (patch)
treeb7ecf83ac01b40304fed5dbe1bed846851b987b9 /examples
parent0bf89f267e976a976ceeaaf353e7acbba0a6bf4d (diff)
downloaddjango-rest-framework-fd449204c1e2987bd2f05b43ab3ed03e7569f99a.tar.bz2
Fixup for epio
Diffstat (limited to 'examples')
-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):
"""