comparison bns_website/urls.py @ 3:71f2941161e9

Created a generic view (for now) to display a home page. Wrote a test for the home page. Created a test settings file that uses sqlite. Created simple 404, 500, base, and home page templates.
author Brian Neal <bgneal@gmail.com>
date Fri, 28 Oct 2011 20:32:29 -0500
parents c8881d9ca347
children 48ff23eab86a
comparison
equal deleted inserted replaced
2:920ba6593732 3:71f2941161e9
1 from django.conf.urls.defaults import patterns, include, url 1 from django.conf.urls.defaults import patterns, include, url
2 #from django.contrib import admin
3 from django.views.generic.base import TemplateView
2 4
3 # Uncomment the next two lines to enable the admin: 5
4 # from django.contrib import admin 6 #admin.autodiscover()
5 # admin.autodiscover()
6 7
7 urlpatterns = patterns('', 8 urlpatterns = patterns('',
9 url(r'^$',
10 TemplateView.as_view(template_name="home.html"),
11 name="home"),
12
8 # Examples: 13 # Examples:
9 # url(r'^$', 'bns_website.views.home', name='home'), 14 # url(r'^$', 'bns_website.views.home', name='home'),
10 # url(r'^bns_website/', include('bns_website.foo.urls')), 15 # url(r'^bns_website/', include('bns_website.foo.urls')),
11 16
12 # Uncomment the admin/doc line below to enable admin documentation:
13 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), 17 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
14
15 # Uncomment the next line to enable the admin:
16 # url(r'^admin/', include(admin.site.urls)), 18 # url(r'^admin/', include(admin.site.urls)),
17 ) 19 )