2016-12-07 20:24:11 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
|
|
Web views
|
|
|
|
"""
|
|
|
|
|
|
|
|
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):
|
|
|
|
|
2016-12-07 22:07:12 -06:00
|
|
|
# TODO: merge these views into core/common
|
2016-12-07 20:24:11 -06:00
|
|
|
config.add_route('home', '/')
|
|
|
|
config.add_view(base.home, route_name='home', renderer='/home.mako')
|
2016-12-11 01:40:41 -06:00
|
|
|
config.add_route('mobile.home', '/mobile/')
|
|
|
|
config.add_view(base.home, route_name='mobile.home', renderer='/mobile/home.mako')
|
2016-12-07 20:24:11 -06:00
|
|
|
config.add_route('bogus_error', '/bogus-error')
|
2016-12-11 01:40:41 -06:00
|
|
|
config.add_view(bogus_error, route_name='bogus_error', permission='admin')
|
2016-12-07 20:24:11 -06:00
|
|
|
|
|
|
|
# core views
|
|
|
|
config.include('rattail_demo.web.views.common')
|
2016-12-07 22:23:11 -06:00
|
|
|
config.include('rattail_demo.web.views.auth')
|
2016-12-07 20:24:11 -06:00
|
|
|
|
|
|
|
# main table views
|
|
|
|
config.include('tailbone.views.brands')
|
|
|
|
config.include('tailbone.views.customers')
|
|
|
|
config.include('tailbone.views.departments')
|
2016-12-10 14:55:36 -06:00
|
|
|
config.include('rattail_demo.web.views.email')
|
2016-12-10 16:04:34 -06:00
|
|
|
config.include('rattail_demo.web.views.employees')
|
2016-12-07 20:24:11 -06:00
|
|
|
config.include('tailbone.views.families')
|
2016-12-10 15:40:21 -06:00
|
|
|
config.include('tailbone.views.messages')
|
2016-12-07 22:07:12 -06:00
|
|
|
config.include('rattail_demo.web.views.people')
|
2016-12-07 20:24:11 -06:00
|
|
|
config.include('tailbone.views.products')
|
|
|
|
config.include('tailbone.views.reportcodes')
|
|
|
|
config.include('tailbone.views.roles')
|
2016-12-10 14:55:36 -06:00
|
|
|
config.include('rattail_demo.web.views.settings')
|
2016-12-10 16:04:34 -06:00
|
|
|
config.include('tailbone.views.shifts')
|
2016-12-07 20:24:11 -06:00
|
|
|
config.include('tailbone.views.stores')
|
|
|
|
config.include('tailbone.views.subdepartments')
|
2016-12-10 11:24:01 -06:00
|
|
|
config.include('rattail_demo.web.views.tempmon')
|
2016-12-07 22:07:12 -06:00
|
|
|
config.include('rattail_demo.web.views.users')
|
2016-12-07 20:24:11 -06:00
|
|
|
config.include('tailbone.views.vendors')
|
|
|
|
|
|
|
|
# batch views
|
|
|
|
config.include('tailbone.views.handheld')
|
|
|
|
config.include('tailbone.views.inventory')
|