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('', url( r'^interests/$', views.SAMembersInterestsIndex.as_view(), name='sa-interests-index' ),
for index, pattern in enumerate(search_urlpatterns): if pattern.name == 'core_search': search_urlpatterns[index] = url(r'^$', SASearchView(), 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'), # 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'), ) sayit_patterns = patterns('', # Exposed endpoints url(r'^(?P<pk>\d+)$', SectionView.as_view(), name='section-view'), url(r'^speech/(?P<pk>\d+)$', SpeechView.as_view(), name='speech-view'), # Fake endpoint to redirect url(r'^speaker/(?P<pk>\d+)$', SASpeakerRedirectView.as_view(), name='speaker-view'), )
# Add View for person meetings attended person_patterns.append((url(r'(?P<person_slug>[-\w]+)/attendances/$', views.SAPersonAttendanceView.as_view(), name='sa-person-attendance'))) place_patterns = copy.copy(place_patterns) new_place_url = url( r'^(?P<slug>[-\w]+)/$', SAPlaceDetailView.as_view(), name='place', ) new_subplace_url = url( r'^(?P<slug>[-\w]+)/places/', SAPlaceDetailSub.as_view(sub_page='places'), name='place_places', ) for index, pattern in enumerate(place_patterns): if pattern.name == 'place': place_patterns[index] = new_place_url elif pattern.name == 'place_places': place_patterns[index] = new_subplace_url place_patterns.extend((url(r'^latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/$', LatLonDetailLocalView.as_view(), name='latlon'), )) urlpatterns = [ # Include the overriden person, organisation paths
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'), )