urls.py 1.28 KB
Newer Older
Arnaud Fabre's avatar
Arnaud Fabre committed
1
# coding: utf-8
Jamesie Pic's avatar
Jamesie Pic committed
2
from django.conf.urls import include, url
luxcem's avatar
Init  
luxcem committed
3
from django.contrib import admin
Jamesie Pic's avatar
Jamesie Pic committed
4
from django.views import generic
luxcem's avatar
Init  
luxcem committed
5

Jamesie Pic's avatar
Jamesie Pic committed
6
import views
Jamesie Pic's avatar
Jamesie Pic committed
7
import api
luxcem's avatar
luxcem committed
8

Arnaud Fabre's avatar
Arnaud Fabre committed
9 10
admin.autodiscover()

Jamesie Pic's avatar
Jamesie Pic committed
11 12
urlpatterns = [
    # Project-specific overrides
Nicolas Joyard's avatar
Nicolas Joyard committed
13
    url(
Nicolas Joyard's avatar
Nicolas Joyard committed
14 15
        r'^legislature/representative/(?P<group_kind>\w+)/(?P<chamber>.+)/' +
        r'(?P<group>.+)/$',
Nicolas Joyard's avatar
Nicolas Joyard committed
16 17
        views.RepresentativeList.as_view(),
    ),
Jamesie Pic's avatar
Jamesie Pic committed
18 19 20 21 22 23 24 25 26
    url(
        r'^legislature/representative/(?P<group_kind>\w+)/(?P<group>.+)/$',
        views.RepresentativeList.as_view(),
    ),
    url(
        r'^legislature/representative/(?P<slug>[-\w]+)/$',
        views.RepresentativeDetail.as_view(),
    ),
    url(
Jamesie Pic's avatar
Jamesie Pic committed
27
        r'^legislature/representative/$',
Jamesie Pic's avatar
Jamesie Pic committed
28 29 30
        views.RepresentativeList.as_view(),
    ),
    url(
Jamesie Pic's avatar
Jamesie Pic committed
31
        r'^votes/dossier/$',
Jamesie Pic's avatar
Jamesie Pic committed
32 33 34
        views.DossierList.as_view(),
    ),

luxcem's avatar
Init  
luxcem committed
35
    url(r'^admin/', include(admin.site.urls)),
Jamesie Pic's avatar
Jamesie Pic committed
36
    url(r'^legislature/', include('representatives.urls',
Jamesie Pic's avatar
Jamesie Pic committed
37
        namespace='representatives')),
Jamesie Pic's avatar
Jamesie Pic committed
38
    url(r'^votes/', include('representatives_votes.urls',
Jamesie Pic's avatar
Jamesie Pic committed
39
        namespace='representatives_votes')),
Jamesie Pic's avatar
Jamesie Pic committed
40
    url(r'^positions/', include('representatives_positions.urls',
Jamesie Pic's avatar
Jamesie Pic committed
41
        namespace='representatives_positions')),
Jamesie Pic's avatar
Jamesie Pic committed
42
    url(r'^api/', include(api.router.urls)),
Jamesie Pic's avatar
Jamesie Pic committed
43 44
    url(r'^$', generic.TemplateView.as_view(template_name='home.html')),
]