Commits

Anonymous committed 1df70db

serve admin media

Comments (0)

Files changed (1)

src/project/urls.py

 from django.conf import settings
 from django.conf.urls.defaults import *
+import os.path
 
 # Uncomment the next two lines to enable the admin:
 from django.contrib import admin
          'django.views.static.serve',
          {'document_root': settings.MEDIA_ROOT,
           "show_indexes":True}),
-    )
+        (r'^admin_media/(?P<path>.*)$',
+         'django.views.static.serve',
+         {'document_root': '%s/media' % os.path.dirname(admin.__file__),
+          "show_indexes":True}),
+    )