annotate bns_website/urls.py @ 17:5348d2235497
Moved the news admin to its own file and removed it from Brian's band admin. I'm an idiot.
author |
Bob Mourlam <bob.mourlam@gmail.com> |
date |
Mon, 31 Oct 2011 20:30:37 -0500 |
parents |
2de51cc51d3a |
children |
71f2beb03789 |
rev |
line source |
bgneal@0
|
1 from django.conf.urls.defaults import patterns, include, url
|
bgneal@6
|
2 from django.contrib import admin
|
bgneal@3
|
3 from django.views.generic.base import TemplateView
|
bgneal@6
|
4 from django.views.generic import ListView
|
bgneal@0
|
5
|
bgneal@6
|
6 from bands.models import Band
|
bob@14
|
7 from news.models import News
|
bgneal@3
|
8
|
bgneal@6
|
9 admin.autodiscover()
|
bgneal@0
|
10
|
bgneal@0
|
11 urlpatterns = patterns('',
|
bgneal@6
|
12 url(r'^$',
|
bgneal@3
|
13 TemplateView.as_view(template_name="home.html"),
|
bgneal@3
|
14 name="home"),
|
bgneal@6
|
15 url(r'^bands/$',
|
bgneal@6
|
16 ListView.as_view(model=Band),
|
bgneal@6
|
17 name="bands"),
|
bob@14
|
18 url(r'^news/$',
|
bob@14
|
19 ListView.as_view(model=News),
|
bob@14
|
20 name="news"),
|
bgneal@9
|
21 url(r'^listen/$',
|
bgneal@9
|
22 TemplateView.as_view(template_name="music.html"),
|
bgneal@9
|
23 name="music"),
|
bgneal@9
|
24 url(r'^watch/$',
|
bgneal@9
|
25 TemplateView.as_view(template_name="videos.html"),
|
bgneal@9
|
26 name="videos"),
|
bgneal@9
|
27 url(r'^buy/$',
|
bgneal@9
|
28 TemplateView.as_view(template_name="buy.html"),
|
bgneal@9
|
29 name="buy"),
|
bgneal@3
|
30
|
bgneal@0
|
31 # Examples:
|
bgneal@0
|
32 # url(r'^$', 'bns_website.views.home', name='home'),
|
bgneal@0
|
33 # url(r'^bns_website/', include('bns_website.foo.urls')),
|
bgneal@0
|
34
|
bgneal@6
|
35 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
bgneal@6
|
36 url(r'^admin/', include(admin.site.urls)),
|
bgneal@0
|
37 )
|