from django.conf.urls.defaults import * from django.conf import settings from lejogger.posts.models import Post urlpatterns = patterns('', (r'^admin/', include('django.contrib.admin.urls')), (r'^donations/', include('lejogger.donations.urls')), (r'^posts/', include('lejogger.posts.urls')), (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'home.html', 'extra_context': {'posts': Post.objects.all }}), # Slow and dangerous, use apache to do this in production environment # Also add .gpx text/xml mimetype to apaches conf and do away with /posts/gpx/ (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_DIR}), (r'^http://', 'django.views.generic.simple.direct_to_template',{'template': 'no_proxy.html'}), )