Sunday, December 30, 2012

Serve static files in production server

Hi all.
in the appfog ML we were fighting again the possibility to serve static file in django without using an external server.
So far AF does not provide a setup of the server to split the server in static and dynamic (django) folders.
so, one of the solution is to use this

urlpatterns += patterns('', 
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', { 
'document_root': settings.STATIC_ROOT}) 

but, is it ok to use this trick in django or will it lead to problems (aka memory problems and stuff like that)?



You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment