Beispiel #1
0
from django.conf.urls.defaults import *

from parliament.core.utils import redir_view

urlpatterns = patterns(
    "parliament.hansards.views",
    (r"^$", "index"),
    (r"^year/(?P<year>\d{4})/$", "by_year"),
    url(r"^(?P<hansard_id>\d+)/$", "hansard", name="hansard"),
    url(r"^(?P<hansard_date>[0-9-]+)/$", "hansard", name="hansard_bydate"),
    url(r"^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/$", "hansard", name="hansard_statement"),
    url(r"^(?P<hansard_date>[0-9-]+)/(?P<statement_seq>\d+)/$", "hansard", name="hansard_statement_bydate"),
    (r"^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/twitter/$", "statement_twitter"),
    url(r"^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/only/$", "statement_permalink", name="hansard_statement_only"),
    url(
        r"^(?P<hansard_date>[0-9-]+)/(?P<statement_seq>\d+)/only/$",
        "statement_permalink",
        name="hansard_statement_only_bydate",
    ),
    (r"^hansard/(\d+)/local/$", "hansardcache"),
    (
        r"^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/permalink/$",
        redir_view("parliament.hansards.views.statement_permalink"),
    ),
)
Beispiel #2
0
from django.conf.urls import patterns, include, url

from parliament.core.utils import redir_view

urlpatterns = patterns(
    'parliament.hansards.redirect_views',
    (r'^hansards/$', redir_view('parliament.hansards.views.index')),
    (r'^hansards/year/(?P<year>\d{4})/$',
     redir_view('parliament.hansards.views.by_year')),
    url(r'^hansards/(?P<hansard_id>\d+)/$', 'hansard_redirect'),
    url(r'^hansards/(?P<hansard_date>[0-9-]+)/$', 'hansard_redirect'),
    url(r'^hansards/(?P<hansard_id>\d+)/(?P<sequence>\d+)/$',
        'hansard_redirect'),
    url(r'^hansards/(?P<hansard_date>[0-9-]+)/(?P<sequence>\d+)/$',
        'hansard_redirect'),
    url(
        r'^hansards/(?P<hansard_id>\d+)/(?P<sequence>\d+)/(?P<only>only|permalink)/$',
        'hansard_redirect'),
    url(
        r'^hansards/(?P<hansard_date>[0-9-]+)/(?P<sequence>\d+)/(?P<only>only|permalink)/$',
        'hansard_redirect'),
)
from django.conf.urls import url

from parliament.core.utils import redir_view
from parliament.hansards.redirect_views import hansard_redirect

urlpatterns = [
    url(r'^hansards/$', redir_view('debates')),
    url(r'^hansards/year/(?P<year>\d{4})/$', redir_view('debates_by_year')),
    url(r'^hansards/(?P<hansard_id>\d+)/$', hansard_redirect),
    url(r'^hansards/(?P<hansard_date>[0-9-]+)/$', hansard_redirect),
    url(r'^hansards/(?P<hansard_id>\d+)/(?P<sequence>\d+)/$',
        hansard_redirect),
    url(r'^hansards/(?P<hansard_date>[0-9-]+)/(?P<sequence>\d+)/$',
        hansard_redirect),
    url(
        r'^hansards/(?P<hansard_id>\d+)/(?P<sequence>\d+)/(?P<only>only|permalink)/$',
        hansard_redirect),
    url(
        r'^hansards/(?P<hansard_date>[0-9-]+)/(?P<sequence>\d+)/(?P<only>only|permalink)/$',
        hansard_redirect),
]
from django.conf.urls import patterns, include, url

from parliament.core.utils import redir_view

urlpatterns = patterns('parliament.hansards.redirect_views',
    (r'^hansards/$', redir_view('parliament.hansards.views.index')),
    (r'^hansards/year/(?P<year>\d{4})/$', redir_view('parliament.hansards.views.by_year')),
    url(r'^hansards/(?P<hansard_id>\d+)/$', 'hansard_redirect'),
    url(r'^hansards/(?P<hansard_date>[0-9-]+)/$', 'hansard_redirect'),
    url(r'^hansards/(?P<hansard_id>\d+)/(?P<sequence>\d+)/$', 'hansard_redirect'),
    url(r'^hansards/(?P<hansard_date>[0-9-]+)/(?P<sequence>\d+)/$', 'hansard_redirect'),
    url(r'^hansards/(?P<hansard_id>\d+)/(?P<sequence>\d+)/(?P<only>only|permalink)/$', 'hansard_redirect'),
    url(r'^hansards/(?P<hansard_date>[0-9-]+)/(?P<sequence>\d+)/(?P<only>only|permalink)/$', 'hansard_redirect'),
)
Beispiel #5
0
from django.conf.urls.defaults import *

from parliament.core.utils import redir_view

urlpatterns = patterns('parliament.hansards.views',
    (r'^$', 'index'),
    (r'^year/(?P<year>\d{4})/$', 'by_year'),
    url(r'^(?P<hansard_id>\d+)/$', 'hansard', name="hansard"),
    url(r'^(?P<hansard_date>[0-9-]+)/$', 'hansard', name="hansard_bydate"),
    url(r'^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/$', 'hansard', name="hansard_statement"),
    url(r'^(?P<hansard_date>[0-9-]+)/(?P<statement_seq>\d+)/$', 'hansard', name="hansard_statement_bydate"),
    (r'^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/twitter/$', 'statement_twitter'),
    url(r'^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/only/$', 'statement_permalink', name="hansard_statement_only"),
    url(r'^(?P<hansard_date>[0-9-]+)/(?P<statement_seq>\d+)/only/$', 'statement_permalink', name="hansard_statement_only_bydate"),
    (r'^hansard/(\d+)/local/$', 'hansardcache'),
    (r'^(?P<hansard_id>\d+)/(?P<statement_seq>\d+)/permalink/$', redir_view('parliament.hansards.views.statement_permalink')),
)