Ignore:
Timestamp:
27/09/12 12:41:13 (9 years ago)
Author:
mnagni
Message:

Incomplete - # 22554: "Remove the ""FollowSymLinks"""
 http://team.ceda.ac.uk/trac/ceda/ticket/22554

Fixes the localhost static files serving

File:
1 edited

Legend:

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

    r8571 r8573  
    22from django.views.generic.simple import redirect_to 
    33from django.contrib.staticfiles.urls import staticfiles_urlpatterns 
     4from cedaMoles.MolesManager.settings import STATIC_ROOT, STATIC_URL 
    45 
    56# Uncomment the next two lines to enable the admin: 
     
    5455) 
    5556 
    56 urlpatterns += staticfiles_urlpatterns() 
     57if STATIC_URL == 'http://127.0.0.1:8000/static/': 
     58    urlpatterns += patterns('', 
     59       url(r'css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css' , 'show_indexes': True}), 
     60    ) 
     61 
     62    urlpatterns += patterns('', 
     63       url(r'css/960/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/css/960' , 'show_indexes': True}), 
     64    ) 
     65 
     66    urlpatterns += patterns('', 
     67       url(r'img/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/img' , 'show_indexes': True}), 
     68    ) 
     69 
     70    urlpatterns += patterns('', 
     71       url(r'js/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT+'/js' , 'show_indexes': True}), 
     72    ) 
     73 
     74#urlpatterns += staticfiles_urlpatterns() 
     75 
Note: See TracChangeset for help on using the changeset viewer.