Source

indie-community / gamedb / urls.py

Full commit
from django.conf.urls import patterns, url
from django.views.generic.base import TemplateView
from gamedb.views import ViewGame, GameList, ViewWriter, ViewArtist,\
    ViewComposer, AddGame
from django.contrib.auth.decorators import login_required

urlpatterns = patterns('',
    url(r'^$', TemplateView.as_view(template_name='gamedb/homepage.html'), name='gamedb_home'),
    url(r'^Games/Add$', login_required(AddGame.as_view()), name='game_add'),
    url(r'^Games/$', GameList.as_view(), name='game_list'),
    url(r'^Games/(?P<slug>[\w-]+).html$', ViewGame.as_view(), name='game_detail'),
    url(r'^Writer/(?P<pk>\d+)$', ViewWriter.as_view(), name='writer_detail'),
    url(r'^Artist/(?P<pk>\d+)$', ViewArtist.as_view(), name='artist_detail'),
    url(r'^Composer/(?P<pk>\d+)$', ViewComposer.as_view(), name='composer_detail'),
)