Commit a954f234 authored by Okhin's avatar Okhin

Working on moving to class based views on issue #22

parent dccf375b
This diff is collapsed.
......@@ -14,22 +14,19 @@ admin.autodiscover()
urlpatterns = patterns('',
url(r'^$',
view=bt.index,
view=bt.AddForm.as_view(),
name="homepage"),
url(r'^list/$',
view=bt.list_violations,
view=bt.ViolationsList.as_view(),
name="list_violations"),
url(r'^list/(?P<country>[^/]*)(/(?P<operator>[^/]*))?$',
view=bt.filter_violations,
url(r'^list/(?P<country>[^/]*)(/(?P<operator>[^/]*))?/$',
view=bt.ViolationsList.as_view(),
name="filter"),
url(r'^add/$',
view=bt.add,
name="add_violation"),
# violation cannonical url and redirections
url(r'^(?P<id>[0-9]*)$',
RedirectView.as_view(url='/view/%(id)s')),
url(r'^view/(?P<id>[0-9]*)$',
view=bt.view,
view=bt.ViolationView.as_view(),
name="violation_url"),
url(r'^attach/(?P<id>[0-9]*)$',
view=bt.get_attach,
......@@ -60,7 +57,7 @@ urlpatterns = patterns('',
view=bt.moderate,
name="moderate"),
url(r'^lookup/$',
view=bt.lookup,
view=bt.LookupView.as_view(),
name="lookup"),
url(r'^accounts/logout$',
'django.contrib.auth.views.logout', {'next_page': '/'}),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment