Refactor mobile views a bit, per tailbone changes
This commit is contained in:
parent
e9998cb597
commit
bae33491b6
|
@ -1,4 +0,0 @@
|
||||||
## -*- coding: utf-8 -*-
|
|
||||||
<%inherit file="tailbone:templates/mobile/base_external_toolbars.mako" />
|
|
||||||
|
|
||||||
${parent.body()}
|
|
|
@ -5,27 +5,9 @@ Web views
|
||||||
|
|
||||||
from __future__ import unicode_literals, absolute_import
|
from __future__ import unicode_literals, absolute_import
|
||||||
|
|
||||||
from tailbone import views as base
|
|
||||||
|
|
||||||
|
|
||||||
def bogus_error(request):
|
|
||||||
"""
|
|
||||||
A special view which simply raises an error, for the sake of testing
|
|
||||||
uncaught exception handling.
|
|
||||||
"""
|
|
||||||
raise Exception("Congratulations, you have triggered a bogus error.")
|
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def includeme(config):
|
||||||
|
|
||||||
# TODO: merge these views into core/common
|
|
||||||
config.add_route('home', '/')
|
|
||||||
config.add_view(base.home, route_name='home', renderer='/home.mako')
|
|
||||||
config.add_route('mobile.home', '/mobile/')
|
|
||||||
config.add_view(base.home, route_name='mobile.home', renderer='/mobile/home.mako')
|
|
||||||
config.add_route('bogus_error', '/bogus-error')
|
|
||||||
config.add_view(bogus_error, route_name='bogus_error', permission='admin')
|
|
||||||
|
|
||||||
# core views
|
# core views
|
||||||
config.include('rattail_demo.web.views.common')
|
config.include('rattail_demo.web.views.common')
|
||||||
config.include('rattail_demo.web.views.auth')
|
config.include('rattail_demo.web.views.auth')
|
||||||
|
|
Loading…
Reference in a new issue