comparison bns_website/urls.py @ 14:2de51cc51d3a

My first stab at the news app. The template is a little dull, but it's a start.
author Bob Mourlam <bob.mourlam@gmail.com>
date Sun, 30 Oct 2011 21:33:45 -0500
parents f2cb9b2ec552
children 71f2beb03789
comparison
equal deleted inserted replaced
13:40d86ae48db1 14:2de51cc51d3a
2 from django.contrib import admin 2 from django.contrib import admin
3 from django.views.generic.base import TemplateView 3 from django.views.generic.base import TemplateView
4 from django.views.generic import ListView 4 from django.views.generic import ListView
5 5
6 from bands.models import Band 6 from bands.models import Band
7 from news.models import News
7 8
8 admin.autodiscover() 9 admin.autodiscover()
9 10
10 urlpatterns = patterns('', 11 urlpatterns = patterns('',
11 url(r'^$', 12 url(r'^$',
12 TemplateView.as_view(template_name="home.html"), 13 TemplateView.as_view(template_name="home.html"),
13 name="home"), 14 name="home"),
14 url(r'^bands/$', 15 url(r'^bands/$',
15 ListView.as_view(model=Band), 16 ListView.as_view(model=Band),
16 name="bands"), 17 name="bands"),
18 url(r'^news/$',
19 ListView.as_view(model=News),
20 name="news"),
17 url(r'^listen/$', 21 url(r'^listen/$',
18 TemplateView.as_view(template_name="music.html"), 22 TemplateView.as_view(template_name="music.html"),
19 name="music"), 23 name="music"),
20 url(r'^watch/$', 24 url(r'^watch/$',
21 TemplateView.as_view(template_name="videos.html"), 25 TemplateView.as_view(template_name="videos.html"),