kopia lustrzana https://github.com/wagtail/wagtail
Revert "Make subpage_urls a property on RoutablePageTest"
This reverts commit d80a92cfe4
.
pull/1170/head
rodzic
0262a55541
commit
09835326d7
|
@ -8,14 +8,12 @@ def routable_page_external_view(request, arg):
|
|||
return HttpResponse("EXTERNAL VIEW: " + arg)
|
||||
|
||||
class RoutablePageTest(RoutablePage):
|
||||
@property
|
||||
def subpage_urls(self):
|
||||
return (
|
||||
url(r'^$', self.main, name='main'),
|
||||
url(r'^archive/year/(\d+)/$', self.archive_by_year, name='archive_by_year'),
|
||||
url(r'^archive/author/(?P<author_slug>.+)/$', self.archive_by_author, name='archive_by_author'),
|
||||
url(r'^external/(.+)/$', routable_page_external_view, name='external_view')
|
||||
)
|
||||
subpage_urls = (
|
||||
url(r'^$', 'main', name='main'),
|
||||
url(r'^archive/year/(\d+)/$', 'archive_by_year', name='archive_by_year'),
|
||||
url(r'^archive/author/(?P<author_slug>.+)/$', 'archive_by_author', name='archive_by_author'),
|
||||
url(r'^external/(.+)/$', routable_page_external_view, name='external_view')
|
||||
)
|
||||
|
||||
def archive_by_year(self, request, year):
|
||||
return HttpResponse("ARCHIVE BY YEAR: " + str(year))
|
||||
|
|
Ładowanie…
Reference in New Issue