Is there a way to split the url mappings in multiple files in Google App Engine?
I want something like this:
from app1.controller import App1Handler
from app2.controller import App2Handler
app = webapp2.WSGIApplication([(r'/app1', App1Handler),(r'/app1', App2Handler)])
In App1Handler, I would like to specify some thing like this:
(r'/action1', Action1Handler), (r'/action2', Action2Handler)
In summary, when user access /app1/action1, Action1Handler has to be executed.
Django has a similar feature, where admin site urls are included in the main url patterns.
urlpatterns = patterns('',
url(r'^polls/$', 'polls.views.index'),
url(r'^admin/', include(admin.site.urls)),
)
Is there any such provisions available in GAE?