from django.db import models
from django.http import HttpResponse
from django.conf.urls import url

from wagtail.contrib.wagtailroutablepage.models import RoutablePage


def routable_page_external_view(request, arg):
    return HttpResponse("EXTERNAL VIEW: " + arg)

class RoutablePageTest(RoutablePage):
    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))

    def archive_by_author(self, request, author_slug):
        return HttpResponse("ARCHIVE BY AUTHOR: " + author_slug)

    def main(self, request):
        return HttpResponse("MAIN VIEW")

@@ -306,22 +306,60 @@
     
-subpage_urls =
+@property%0A    def subpage_urls(self):%0A        return
  (%0A 
@@ -361,24 +361,28 @@
 n (%0A        
+ 
+   
 url(r'%5E$', '
@@ -380,22 +380,25 @@
 (r'%5E$', 
-'
+self.
 main
-'
 , name='
@@ -405,32 +405,36 @@
 main'),%0A        
+    
 url(r'%5Earchive/y
@@ -443,25 +443,29 @@
 r/(%5Cd+)/$', 
-'
+self.
 archive_by_y
@@ -467,17 +467,16 @@
 _by_year
-'
 , name='
@@ -490,24 +490,28 @@
 _by_year'),%0A
+    
         url(
@@ -552,17 +552,21 @@
 .+)/$', 
-'
+self.
 archive_
@@ -574,17 +574,16 @@
 y_author
-'
 , name='
@@ -599,24 +599,28 @@
 y_author'),%0A
+    
         url(
@@ -691,16 +691,20 @@
 _view')%0A
+    
     )%0A%0A 

Make subpage_urls a property on RoutablePageTest