Ignore:
Timestamp:
05/03/12 10:39:08 (8 years ago)
Author:
mnagni
Message:

Updated the urls.py in order to allow a static access to css/js/img. Anyway as specified in DJANGO manual

"Django itself doesn’t serve static (media) files, such as images, style sheets, or video. It leaves that job to whichever Web server you choose.
The reasoning here is that standard Web servers, such as Apache, lighttpd and Cherokee, are much more fine-tuned at serving static files than a Web application framework."

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/urls.py

    r8120 r8137  
    1 from django.conf.urls.defaults import patterns, include, url 
     1from django.conf.urls.defaults import patterns, url 
    22from MolesManager.settings import STATIC_ROOT 
    33 
     
    3838) 
    3939 
     40urlpatterns += patterns('', 
     41    url(r'^static/css', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css' , 'show_indexes': True}), 
     42) 
    4043 
     44urlpatterns += patterns('', 
     45    url(r'^static/css/960/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css/960' , 'show_indexes': True}), 
     46) 
    4147#urlpatterns += staticfiles_urlpatterns() 
Note: See TracChangeset for help on using the changeset viewer.