示例#1
0
文件: urls.py 项目: kvimal13/billy
# speeches
urlpatterns += patterns(
    'billy.web.public.views.speeches',

    url(r'^(?P<abbr>[a-z-]+)/speeches/$', 'speeches',
        name='speeches'),
    url(r'^(?P<abbr>[a-z-]+)/speeches/(?P<event_id>[\w-]+)/',
        'speeches_by_event', name='speeches_by_event'),
)

# bills
urlpatterns += patterns(
    'billy.web.public.views.bills',

    url(r'^(?P<abbr>all)/bills/$', ensure_csrf_cookie(AllBillList.as_view()),
        name='all_bills'),
    url(r'^(?P<abbr>all)/bills-csv/$',
        ensure_csrf_cookie(AllBillCSVList.as_view()), name='all_bills_csv'),
    url(r'^(?P<abbr>[a-z-]+)/bills/$', ensure_csrf_cookie(BillList.as_view()),
        name='bills'),
    url(r'^(?P<abbr>[a-z-]+)/bills/feed/$', BillFeed.as_view(),
        name='bills_feed'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/(?P<bill_id>[^/]+)/$',
        'bill', name='bill'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<bill_id>[^/]+)/$',
        'bill_noslug', name='bill_noslug'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/'
        r'(?P<bill_id>[^/]+)/(?P<key>documents)/$', 'all_documents',
        name='bill_all_documents'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/'
示例#2
0
    'billy.web.public.views.speeches',

    url(r'^(?P<abbr>[a-z-]+)/speeches/$', 'speeches',
        name='speeches'),
    url(r'^(?P<abbr>[a-z-]+)/speeches/(?P<event_id>[\w-]+)/',
        'speeches_by_event', name='speeches_by_event'),
)

# bills
urlpatterns += patterns(
    'billy.web.public.views.bills',

    url(r'^(?P<abbr>[a-z-]+)/bills/$', BillList.as_view(), name='bills'),
    url(r'^(?P<abbr>[a-z-]+)/bills/feed/$', BillFeed.as_view(),
        name='bills_feed'),
    url(r'^(?P<abbr>all)/bills/$', AllBillList.as_view(), name='bills'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/(?P<bill_id>[^/]+)/$',
        'bill', name='bill'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<bill_id>[^/]+)/$',
        'bill_noslug', name='bill_noslug'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/'
        r'(?P<bill_id>[^/]+)/(?P<key>documents)/$', 'all_documents',
        name='bill_all_documents'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/'
        r'(?P<bill_id>[^/]+)/documents/(?P<doc_id>[\w-]+)/$', 'document',
        name='document'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/'
        r'(?P<bill_id>[^/]+)/(?P<key>versions)/$', 'all_versions',
        name='bill_all_versions'),
    url(r'^(?P<abbr>[a-z-]+)/votes/(?P<vote_id>[\w-]+)/$',
        'vote', name='vote'),
示例#3
0
)

# speeches
urlpatterns += patterns(
    'billy.web.public.views.speeches',
    url(r'^(?P<abbr>[a-z-]+)/speeches/$', 'speeches', name='speeches'),
    url(r'^(?P<abbr>[a-z-]+)/speeches/(?P<event_id>[\w-]+)/',
        'speeches_by_event',
        name='speeches_by_event'),
)

# bills
urlpatterns += patterns(
    'billy.web.public.views.bills',
    url(r'^(?P<abbr>all)/bills/$',
        ensure_csrf_cookie(AllBillList.as_view()),
        name='all_bills'),
    url(r'^(?P<abbr>all)/bills-csv/$',
        ensure_csrf_cookie(AllBillCSVList.as_view()),
        name='all_bills_csv'),
    url(r'^(?P<abbr>[a-z-]+)/bills/$',
        ensure_csrf_cookie(BillList.as_view()),
        name='bills'),
    url(r'^(?P<abbr>[a-z-]+)/bills/feed/$',
        BillFeed.as_view(),
        name='bills_feed'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/(?P<bill_id>[^/]+)/$',
        'bill',
        name='bill'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<bill_id>[^/]+)/$',
        'bill_noslug',
示例#4
0
urlpatterns += patterns(
    'billy.web.public.views.legislators',

    url(r'^(?P<abbr>[a-z-]+)/legislators/$', 'legislators',
        name='legislators'),
    url(r'^(?P<abbr>[a-z-]+)/legislators/(?P<_id>[\w-]+)/(?P<slug>[^/]*)/$',
        'legislator', name='legislator'),
    url(r'^(?P<abbr>[a-z-]+)/legislators/(?P<_id>[\w-]+)/$',
        'legislator', name='legislator_noslug'),
)

# bills
urlpatterns += patterns(
    'billy.web.public.views.bills',

    url(r'^(?P<abbr>all)/bills/$', ensure_csrf_cookie(AllBillList.as_view()),
        name='all_bills'),
    url(r'^(?P<abbr>all)/bills-csv/$',
        ensure_csrf_cookie(AllBillCSVList.as_view()), name='all_bills_csv'),
    url(r'^(?P<abbr>[a-z-]+)/bills/$', ensure_csrf_cookie(BillList.as_view()),
        name='bills'),
    url(r'^(?P<abbr>[a-z-]+)/bills/feed/$', BillFeed.as_view(),
        name='bills_feed'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/(?P<bill_id>[^/]+)/$',
        'bill', name='bill'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<bill_id>[^/]+)/$',
        'bill_noslug', name='bill_noslug'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/'
        r'(?P<bill_id>[^/]+)/(?P<key>documents)/$', 'all_documents',
        name='bill_all_documents'),
    url(r'^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/'
示例#5
0
文件: urls.py 项目: h4ck3rm1k3/billy
    url(r"^(?P<abbr>[a-z-]+)/legislators/$", "legislators", name="legislators"),
    url(r"^(?P<abbr>[a-z-]+)/legislators/(?P<_id>[\w-]+)/(?P<slug>[^/]*)/$", "legislator", name="legislator"),
    url(r"^(?P<abbr>[a-z-]+)/legislators/(?P<_id>[\w-]+)/$", "legislator", name="legislator_noslug"),
)

# speeches
urlpatterns += patterns(
    "billy.web.public.views.speeches",
    url(r"^(?P<abbr>[a-z-]+)/speeches/$", "speeches", name="speeches"),
    url(r"^(?P<abbr>[a-z-]+)/speeches/(?P<event_id>[\w-]+)/", "speeches_by_event", name="speeches_by_event"),
)

# bills
urlpatterns += patterns(
    "billy.web.public.views.bills",
    url(r"^(?P<abbr>all)/bills/$", ensure_csrf_cookie(AllBillList.as_view()), name="all_bills"),
    url(r"^(?P<abbr>all)/bills-csv/$", ensure_csrf_cookie(AllBillCSVList.as_view()), name="all_bills_csv"),
    url(r"^(?P<abbr>[a-z-]+)/bills/$", ensure_csrf_cookie(BillList.as_view()), name="bills"),
    url(r"^(?P<abbr>[a-z-]+)/bills/feed/$", BillFeed.as_view(), name="bills_feed"),
    url(r"^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/(?P<bill_id>[^/]+)/$", "bill", name="bill"),
    url(r"^(?P<abbr>[a-z-]+)/(?P<bill_id>[^/]+)/$", "bill_noslug", name="bill_noslug"),
    url(
        r"^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/" r"(?P<bill_id>[^/]+)/(?P<key>documents)/$",
        "all_documents",
        name="bill_all_documents",
    ),
    url(
        r"^(?P<abbr>[a-z-]+)/bills/(?P<session>[^/]+)/" r"(?P<bill_id>[^/]+)/documents/(?P<doc_id>[\w-]+)/$",
        "document",
        name="document",
    ),
示例#6
0
    url(r"^(?P<abbr>[a-z]{2})/legislators/(?P<_id>\w+)/$", "legislator", name="legislator_noslug"),
)

# speeches
urlpatterns += patterns(
    "billy.web.public.views.speeches",
    url(r"^(?P<abbr>[a-z]{2})/speeches/$", "speeches", name="speeches"),
    url(r"^(?P<abbr>[a-z]{2})/speeches/(?P<event_id>\w+)/", "speeches_by_event", name="speeches_by_event"),
)

# bills
urlpatterns += patterns(
    "billy.web.public.views.bills",
    url(r"^(?P<abbr>[a-z]{2})/bills/$", BillList.as_view(), name="bills"),
    url(r"^(?P<abbr>[a-z]{2})/bills/feed/$", BillFeed.as_view(), name="bills_feed"),
    url(r"^(?P<abbr>all)/bills/$", AllBillList.as_view(), name="bills"),
    url(r"^(?P<abbr>[a-z]{2})/bills/(?P<session>[^/]+)/(?P<bill_id>[^/]+)/$", "bill", name="bill"),
    url(r"^(?P<abbr>[a-z]{2})/(?P<bill_id>[^/]+)/$", "bill_noslug", name="bill_noslug"),
    url(
        r"^(?P<abbr>[a-z]{2})/bills/(?P<session>[^/]+)/" r"(?P<bill_id>[^/]+)/(?P<key>documents)/$",
        "all_documents",
        name="bill_all_documents",
    ),
    url(
        r"^(?P<abbr>[a-z]{2})/bills/(?P<session>[^/]+)/" r"(?P<bill_id>[^/]+)/documents/(?P<doc_id>\w+)/$",
        "document",
        name="document",
    ),
    url(
        r"^(?P<abbr>[a-z]{2})/bills/(?P<session>[^/]+)/" r"(?P<bill_id>[^/]+)/(?P<key>versions)/$",
        "all_versions",