From de7fbaadb211650a73c68509f8b87cb93effdd2a Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 18 Feb 2007 18:47:15 -0800 Subject: removed knowledge directory, filled in front page, continued git_browse --- bn_django/urls.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'bn_django/urls.py') diff --git a/bn_django/urls.py b/bn_django/urls.py index 327e9ec..1993f26 100644 --- a/bn_django/urls.py +++ b/bn_django/urls.py @@ -1,21 +1,30 @@ from django.conf.urls.defaults import * +from photos.models import Photo urlpatterns = patterns('', # Example: # (r'^bn_django/', include('bn_django.foo.urls')), - (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'frontpage.html'}), + (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'frontpage.html','extra_context':dict({ \ + 'latest_photos':Photo.objects.order_by('date')[:2] \ + #'latest_comments':Photo.objects.order_by('date')[:4] \ + #'latest_knowledge':Photo.objects.order_by('date')[:4] \ + })}), (r'^about/$', 'django.views.generic.simple.direct_to_template', {'template': 'about.html'}), (r'^credits/$', 'django.views.generic.simple.direct_to_template', {'template': 'credits.html'}), (r'^copyright/$', 'django.views.generic.simple.direct_to_template', {'template': 'copyright.html'}), (r'^knowledge/', include('bn_django.git_wiki.urls')), + (r'^k/', include('bn_django.git_wiki.urls')), (r'^code/', include('bn_django.git_browse.urls')), (r'^photos/', include('bn_django.photos.urls')), + + (r'^search/', include('bn_django.search.urls')), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), - (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static', 'show_indexes': True}), + + (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static', 'show_indexes': True}), (r'^style/(?P.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/static/style'}), (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': '/home/bnewbold/bn-project/media'}), ) -- cgit v1.2.3