# featured person ajax load url(r'^featured/((?P<direction>(before|after))/)?(?P<current_slug>[-\w]+)', 'featured_person', name='featured_person'), url(r'^(?P<slug>[-\w]+)/$', PersonDetail.as_view(), name='person'), ) for sub_page in ['scorecard', 'comments', 'experience', 'appearances', 'contact_details']: person_patterns += patterns( 'pombola.core.views', url( '^(?P<slug>[-\w]+)/%s/' % sub_page, PersonDetailSub.as_view(sub_page=sub_page), name='person_%s' % sub_page, ) ) place_patterns = patterns('pombola.core.views', url( r'^all/', PlaceKindList.as_view(), name='place_kind_all' ), url( r'^is/(?P<slug>[-\w]+)/$', PlaceKindList.as_view(), name='place_kind' ), url( r'^is/(?P<slug>[-\w]+)/(?P<session_slug>[-\w]+)/?', PlaceKindList.as_view(), name='place_kind' ), url(r'^(?P<slug>[-\w]+)/$', PlaceDetailView.as_view(), name='place'),
# featured person ajax load url(r'^featured/((?P<direction>(before|after))/)?(?P<current_slug>[-\w]+)', 'featured_person', name='featured_person'), url(r'^(?P<slug>[-\w]+)/$', PersonDetail.as_view(), name='person'), ) for sub_page in ['scorecard', 'comments', 'experience', 'appearances', 'contact_details']: person_patterns += patterns( 'pombola.core.views', url( '^(?P<slug>[-\w]+)/%s/$' % sub_page, PersonDetailSub.as_view(sub_page=sub_page), name='person_%s' % sub_page, ) ) if settings.ENABLED_FEATURES['bills']: person_patterns += patterns( 'pombola.core.views', url( '^(?P<slug>[-\w]+)/bills/', PersonDetailSub.as_view(sub_page='bills'), name='person_bills', ) )
# featured person ajax load url(r'^featured/((?P<direction>(before|after))/)?(?P<current_slug>[-\w]+)', 'featured_person', name='featured_person'), url(r'^(?P<slug>[-\w]+)/$', PersonDetail.as_view(), name='person'), ) # ugly, must be a better way for sub_page in ['scorecard', 'comments', 'experience', 'appearances', 'contact_details']: person_patterns += patterns( 'pombola.core.views', url( '^(?P<slug>[-\w]+)/%s/' % sub_page, # url regex PersonDetailSub.as_view(), # view function { 'sub_page': sub_page }, # pass in the 'sub_page' arg 'person_%s' % sub_page # url name for {% url ... %} tags ) ) place_patterns = patterns('pombola.core.views', url( r'^all/', PlaceKindList.as_view(), name='place_kind_all' ), url( r'^is/(?P<slug>[-\w]+)/$', PlaceKindList.as_view(), name='place_kind' ), url( r'^is/(?P<slug>[-\w]+)/(?P<session_slug>[-\w]+)/?', PlaceKindList.as_view(), name='place_kind' ), url(r'^(?P<slug>[-\w]+)/$', PlaceDetailView.as_view(),
RedirectView.as_view(url='/position/mp', permanent=True), ), # featured person ajax load url(r'^featured/((?P<direction>(before|after))/)?(?P<current_slug>[-\w]+)', featured_person, name='featured_person'), url(r'^(?P<slug>[-\w]+)/$', PersonDetail.as_view(), name='person'), ] for sub_page in [ 'scorecard', 'comments', 'experience', 'appearances', 'contact_details' ]: person_patterns += (url( '^(?P<slug>[-\w]+)/%s/$' % sub_page, PersonDetailSub.as_view(sub_page=sub_page), name='person_%s' % sub_page, ), ) if settings.ENABLED_FEATURES['bills']: person_patterns += (url( '^(?P<slug>[-\w]+)/bills/', PersonDetailSub.as_view(sub_page='bills'), name='person_bills', ), ) place_patterns = [ url(r'^all/', PlaceKindList.as_view(), name='place_kind_all'), url(r'^is/(?P<slug>[-\w]+)/$', PlaceKindList.as_view(), name='place_kind'), url(r'^is/(?P<slug>[-\w]+)/(?P<session_slug>[-\w]+)/?', PlaceKindList.as_view(),
# featured person ajax load url(r'^featured/((?P<direction>(before|after))/)?(?P<current_slug>[-\w]+)', 'featured_person', name='featured_person'), url(r'^(?P<slug>[-\w]+)/$', PersonDetail.as_view(), name='person'), ) # ugly, must be a better way for sub_page in [ 'scorecard', 'comments', 'experience', 'appearances', 'contact_details' ]: person_patterns += patterns( 'pombola.core.views', url( '^(?P<slug>[-\w]+)/%s/' % sub_page, # url regex PersonDetailSub.as_view(), # view function {'sub_page': sub_page}, # pass in the 'sub_page' arg 'person_%s' % sub_page # url name for {% url ... %} tags )) place_patterns = patterns( 'pombola.core.views', url(r'^all/', PlaceKindList.as_view(), name='place_kind_all'), url(r'^is/(?P<slug>[-\w]+)/$', PlaceKindList.as_view(), name='place_kind'), url(r'^is/(?P<slug>[-\w]+)/(?P<session_slug>[-\w]+)/?', PlaceKindList.as_view(), name='place_kind'), url(r'^(?P<slug>[-\w]+)/$', PlaceDetailView.as_view(), name='place'), # redirect .../candidates to .../aspirants so that the URL wording matches # that on the site. This is to fix originally using the word 'candidates'