from django.conf.urls.defaults import * from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.decorators.cache import cache_page from django.views.generic.simple import redirect_to, direct_to_template # Uncomment the next two lines to enable the admin: from django.contrib import admin from django.conf import settings admin.autodiscover() urlpatterns = patterns('', # Example: (r'^robots.txt$', cache_page(60 * 15)(direct_to_template), {'template' : 'robots.txt', 'mimetype' : 'text/plain'}), (r'^$', redirect_to, { 'url' : 'wlheatmap/', 'permanent' : False }), (r'^wlheatmap/', include('wlheatmap.urls')), (r'^gheat/', include('gheat.urls')), (r'^admin/', include(admin.site.urls)), (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}), (r'^accounts/logout/$', 'django.contrib.auth.views.logout', { 'template_name': 'logout.html'}), ) if settings.DEBUG: urlpatterns += patterns('wlheatmap.osm_proxy', url( # Example : today/fire/12/3,2.png regex = r'^osm-tile-proxy/(?P\d+)/(?P\d+)[,/](?P\d+).png$', view = 'osm_proxy', name = 'osm_proxy', ), ) urlpatterns += staticfiles_urlpatterns() urlpatterns += patterns('', url(r'^media/(?P.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT, }))