Skip to content

Commit 82155f3

Browse files
committed
Fix serve media files path
1 parent 3a9ea7f commit 82155f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django-jquery-file-upload/urls.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
url(r'^admin/', include(admin.site.urls)),
2020
)
2121

22-
import os
22+
from os.path import join, abspath, dirname
2323
urlpatterns += patterns('',
24-
(r'^media/(.*)$', 'django.views.static.serve', {'document_root': os.path.join(os.path.abspath(os.path.dirname(__file__)), 'media')}),
24+
(r'^media/(.*)$', 'django.views.static.serve', {'document_root': join(abspath(dirname(dirname(__file__))), 'media')}),
2525
)

0 commit comments

Comments
 (0)