In my settings.py,
STATIC_ROOT = '/home/khantthulinn/webapps/static_media/'
STATIC_URL = '/home/khantthulinn/webapps/static_media/'
In my urls.py,
urlpatterns = patterns('',
url(r'^admin/', admin.site.urls),
#Media
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT}),
)+ static(settings.STATIC_ROOT, document_root=settings.STATIC_ROOT)
After that, in my web server, I have copied static files.
python manage.py collectstatic
Everything is okay and I see all correctly.
It become problem when I change DEBUG = False.
I read this already but I don't understand.
https://docs.djangoproject.com/en/1.10/howto/static-files/deployment/
I have read solution from here too.
Why does DEBUG=False setting make my django Static Files Access fail?
With debug turned off Django won't handle static files for you any more - your production web server (Apache or something) should take care of that.
I wana try that. How shall I do?
I don't want to run this since it is insecure.
manage.py runserver --insecure