urls.py 1.17 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 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
urlpatterns = [
    # Project-specific overrides
    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(
        r'legislature/representative/$',
        views.RepresentativeList.as_view(),
    ),
    url(
        r'votes/dossier/$',
        views.DossierList.as_view(),
    ),

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