Mercurial > agora
diff urls.py @ 7:6c2d400091fd
Decouple bundle urlconfs; improve the skeleton layout to more than a few bones
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Sat, 26 Jun 2010 02:04:53 -0500 |
parents | 069cabdaf8b2 |
children | 8be7bdae8fb6 |
line wrap: on
line diff
--- a/urls.py Fri Jun 25 18:32:15 2010 -0500 +++ b/urls.py Sat Jun 26 02:04:53 2010 -0500 @@ -8,20 +8,22 @@ (r'^$', 'django.views.generic.simple.direct_to_template', - {'template': 'index.html'}), + {'template': 'index.djhtml'}), - # Uncomment the admin/doc line below and add 'django.contrib.admindocs' - # to INSTALLED_APPS to enable admin documentation: + (r'^admin/doc/', include('django.contrib.admindocs.urls')), - # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), - - - # Example: - # (r'^agora/', include('agora.foo.urls')), - - (r'^(?P<user>.*)/(?P<bundle>.*)/$', 'agora.apps.bundle.views.detail'), + (r'^', include('agora.apps.bundle.urls')) ) + +#Let Django itself serve static data during debugging +from django.conf import settings + +if settings.DEBUG: + urlpatterns.insert (1, + (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', + {'document_root': 'media/', 'show_indexes': True}), + )