CPI Ordering System (the old version)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
from pyramid.httpexceptions import HTTPFound
|
|
|
|
from pyramid.view import view_config
|
|
|
|
|
|
|
|
|
|
|
|
@view_config(
|
|
|
|
context='ordr.resources.RootResource',
|
|
|
|
permission='view',
|
|
|
|
renderer='ordr:templates/pages/welcome.jinja2',
|
|
|
|
)
|
|
|
|
def welcome(context, request):
|
|
|
|
next = 'orders' if request.user else 'login'
|
|
|
|
redirect_to = request.resource_url(context, next)
|
|
|
|
return HTTPFound(redirect_to)
|
|
|
|
|
|
|
|
|
|
|
|
@view_config(
|
|
|
|
context='ordr.resources.RootResource',
|
|
|
|
name='login',
|
|
|
|
permission='view',
|
|
|
|
renderer='ordr:templates/pages/welcome.jinja2',
|
|
|
|
)
|
|
|
|
def login(context, request):
|
|
|
|
return {}
|
|
|
|
|
|
|
|
|
|
|
|
@view_config(
|
|
|
|
context='ordr.resources.RootResource',
|
|
|
|
name='faq',
|
|
|
|
permission='view',
|
|
|
|
renderer='ordr:templates/pages/faq.jinja2'
|
|
|
|
)
|
|
|
|
def faq(context, request):
|
|
|
|
return {}
|