コード例 #1
0
ファイル: urls.py プロジェクト: kvimal13/billy
    url(r'^$', 'homepage', name='homepage'),
    url(r'^downloads/$', 'downloads', name='downloads'),
    url(r'^find_your_legislator/$', 'find_your_legislator',
        name='find_your_legislator'),
    url(r'^get_district/(?P<district_id>.+)/$', 'get_district',
        name='get_district'),

    # votes & news
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        '(?P<slug>[^/]+)/news/$',
        NewsList.as_view(), name='news_list'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        '(?P<slug>[^/]+)/news/rss/$',
        NewsListFeed(), name='news_list_rss'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)'
        '/(?P<_id>[\w-]+)/votes/$', VotesList.as_view(), name='votes_list'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        'votes/rss/$',
        VotesListFeed(), name='votes_list_rss'),

)

# user-related views
urlpatterns += patterns(
    '',

    url(r'^profile/$', 'billy.web.public.views.misc.user_profile',
        name='user_profile'),
    url(r'^get_user_latlong/$', 'billy.web.public.views.misc.get_user_latlong',
        name='get_user_latlong'),
    url(r'^favorites/$', 'billy.web.public.views.favorites.favorites',
コード例 #2
0
    url(r'^$', 'homepage', name='homepage'),
    url(r'^downloads/$', 'downloads', name='downloads'),
    url(r'^find_your_legislator/$', 'find_your_legislator',
        name='find_your_legislator'),
    url(r'^get_district/(?P<district_id>.+)/$', 'get_district',
        name='get_district'),

    # votes & news
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        '(?P<slug>[^/]+)/news/$',
        NewsList.as_view(), name='news_list'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        '(?P<slug>[^/]+)/news/rss/$',
        NewsListFeed(), name='news_list_rss'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)'
        '/(?P<_id>[\w-]+)/votes/$', VotesList.as_view(), name='votes_list'),
    url(r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        'votes/rss/$',
        VotesListFeed(), name='votes_list_rss'),

)

# user-related views
urlpatterns += patterns(
    '',

    # delete this once real login lands
    (r'^login/$', 'django.contrib.auth.views.login',
     {'template_name': 'billy/web/public/login.html'}
    ),
コード例 #3
0
ファイル: urls.py プロジェクト: opengovernment/billy
    # votes & news
    url(
        r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        '(?P<slug>[^/]+)/news/$',
        NewsList.as_view(),
        name='news_list'),
    url(
        r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        '(?P<slug>[^/]+)/news/rss/$',
        NewsListFeed(),
        name='news_list_rss'),
    url(
        r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)'
        '/(?P<_id>[\w-]+)/votes/$',
        VotesList.as_view(),
        name='votes_list'),
    url(
        r'^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/'
        'votes/rss/$',
        VotesListFeed(),
        name='votes_list_rss'),
)

# user-related views
urlpatterns += patterns(
    '',
    url(r'^profile/$',
        'billy.web.public.views.misc.user_profile',
        name='user_profile'),
    url(r'^get_user_latlong/$',
コード例 #4
0
ファイル: urls.py プロジェクト: h4ck3rm1k3/billy
    url(r"^find_your_legislator/$", "find_your_legislator", name="find_your_legislator"),
    url(r"^get_district/(?P<district_id>.+)/$", "get_district", name="get_district"),
    # votes & news
    url(
        r"^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/" r"(?P<slug>[^/]+)/news/$",
        NewsList.as_view(),
        name="news_list",
    ),
    url(
        r"^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/" r"(?P<slug>[^/]+)/news/rss/$",
        NewsListFeed(),
        name="news_list_rss",
    ),
    url(
        r"^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)" r"/(?P<_id>[\w-]+)/votes/$",
        VotesList.as_view(),
        name="votes_list",
    ),
    url(
        r"^(?P<abbr>[a-z-]+)/(?P<collection_name>[\w-]+)/(?P<_id>[\w-]+)/" r"votes/rss/$",
        VotesListFeed(),
        name="votes_list_rss",
    ),
)

# user-related views
urlpatterns += patterns(
    "",
    url(r"^profile/$", "billy.web.public.views.misc.user_profile", name="user_profile"),
    url(r"^get_user_latlong/$", "billy.web.public.views.misc.get_user_latlong", name="get_user_latlong"),
    url(r"^favorites/$", "billy.web.public.views.favorites.favorites", name="user_favorites"),
コード例 #5
0
ファイル: urls.py プロジェクト: annerajb/billy
# misc. views
urlpatterns = patterns('billy.web.public.views.misc',
    url(r'^$', 'homepage', name='homepage'),
    url(r'^downloads/$', 'downloads', name='downloads'),
    url(r'^find_your_legislator/$', 'find_your_legislator',
        name='find_your_legislator'),
    url(r'^get_district/(?P<district_id>.+)/$', 'get_district',
        name='get_district'),

    # votes & news
    url(r'^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/(?P<slug>[^/]+)/news/$',
        NewsList.as_view(), name='news_list'),
    url(r'^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/(?P<slug>[^/]+)/news/rss/$',
        NewsListFeed(), name='news_list_rss'),
    url(r'^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/votes/$',
        VotesList.as_view(), name='votes_list'),
    url(r'^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/votes/rss/$',
        VotesListFeed(), name='votes_list_rss'),

)

# region/state specific
urlpatterns += patterns('billy.web.public.views.region',
    url(r'^(?P<scope>[a-z]{,3})/search/$', 'search', name='search'),
    url(r'^(?P<abbr>[a-z]{2})/$', 'state', name='state'),
    url(r'^state_selection/$', 'state_selection', name='state_selection'),
)

# events
urlpatterns += patterns('billy.web.public.views.events',
    url(r'^(?P<abbr>[a-z]{2})/events/$', EventsList.as_view(),
コード例 #6
0
ファイル: urls.py プロジェクト: rhymeswithcycle/billy
    url(r"^$", "homepage", name="homepage"),
    url(r"^downloads/$", "downloads", name="downloads"),
    url(r"^find_your_legislator/$", "find_your_legislator", name="find_your_legislator"),
    url(r"^get_district/(?P<district_id>.+)/$", "get_district", name="get_district"),
    # votes & news
    url(
        r"^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/" "(?P<slug>[^/]+)/news/$",
        NewsList.as_view(),
        name="news_list",
    ),
    url(
        r"^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/" "(?P<slug>[^/]+)/news/rss/$",
        NewsListFeed(),
        name="news_list_rss",
    ),
    url(r"^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/votes/$", VotesList.as_view(), name="votes_list"),
    url(
        r"^(?P<abbr>[a-z]{2})/(?P<collection_name>\w+)/(?P<_id>\w+)/" "votes/rss/$",
        VotesListFeed(),
        name="votes_list_rss",
    ),
)

# user-related views
urlpatterns += patterns(
    "", (r"^login/$", "django.contrib.auth.views.login", {"template_name": "billy/web/public/login.html"})
)

# region specific
urlpatterns += patterns(
    "billy.web.public.views.region",