Xerror icon indicating copy to clipboard operation
Xerror copied to clipboard

Fix urls.py

Open AlexTsai1618 opened this issue 5 years ago • 0 comments

According to the document django version >= 1.7 which is not support the following URL configuration

 url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
                  {'document_root': settings.MEDIA_ROOT}),

so I fix it to + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) at the end of url configuration and also the require library. from django.conf.urls.static import static

AlexTsai1618 avatar Dec 10 '20 07:12 AlexTsai1618