for index, pattern in enumerate(search_urlpatterns): if pattern.name == 'core_search': search_urlpatterns[index] = url(r'^$', SASearchView.as_view(), name='core_search') urlpatterns += patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/national/$', LatLonDetailNationalView.as_view(), name='latlon-national'), url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/$', LatLonDetailLocalView.as_view(), name='latlon'), # We want to override the location search view, so that we can # redirect straight to the results page if there's a unique result # returned. url(r'^search/location/$', SAGeocoderView.as_view(), name='core_geocoder_search'), # because the following slug matches override this definition in the core # place_patterns, we reinstate it here url( r'^place/all/', PlaceKindList.as_view(), name='place_kind_all' ), url(r'^place/(?P<slug>[-\w]+)/$', SAPlaceDetailView.as_view(), name='place'), url(r'^place/(?P<slug>[-\w]+)/places/', SAPlaceDetailSub.as_view(sub_page='places'), name='place_places'), # Catch the newsletter info page to change the template used so that the signup form is injected. # NOTE - you still need to create an InfoPage with the slug 'newsletter' for this not to 404. url(r'^info/newsletter', SANewsletterPage.as_view(), {'slug': 'newsletter'}, name='info_page_newsletter'), ) # Members' interests browser urlpatterns += patterns('',
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'), # redirect .../candidates to .../aspirants so that the URL wording matches # that on the site. This is to fix originally using the word 'candidates' # and can probably be removed at some point when there are no more hits on # this path - after July 2013 feels about right. url( r'^(?P<slug>[-\w]+)/candidates/$', RedirectView.as_view(url='/place/%(slug)s/aspirants', permanent=True), ),
LatLonDetailNationalView.as_view(), name='latlon-national'), url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/$', LatLonDetailLocalView.as_view(), name='latlon'), # We want to override the location search view, so that we can # redirect straight to the results page if there's a unique result # returned. url(r'^search/location/$', SAGeocoderView.as_view(), name='core_geocoder_search'), # because the following slug matches override this definition in the core # place_patterns, we reinstate it here url(r'^place/all/', PlaceKindList.as_view(), name='place_kind_all'), url(r'^place/(?P<slug>[-\w]+)/$', SAPlaceDetailView.as_view(), name='place'), url(r'^place/(?P<slug>[-\w]+)/places/', SAPlaceDetailSub.as_view(sub_page='places'), name='place_places'), # Catch the newsletter info page to change the template used so that the signup form is injected. # NOTE - you still need to create an InfoPage with the slug 'newsletter' for this not to 404. url(r'^info/newsletter', SANewsletterPage.as_view(), {'slug': 'newsletter'}, name='info_page_newsletter'), ) # Members' interests browser