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.
21 lines
501 B
21 lines
501 B
""" static and login pages """ |
|
|
|
|
|
from pyramid.view import ( |
|
view_config, |
|
notfound_view_config, |
|
forbidden_view_config, |
|
) |
|
from pyramid.httpexceptions import HTTPFound |
|
|
|
|
|
@forbidden_view_config() |
|
@notfound_view_config() |
|
@view_config( |
|
context="ordr3:resources.Root", permission="view", |
|
) |
|
def root(context, request): |
|
if request.user: |
|
return HTTPFound(request.resource_path(request.root, "orders")) |
|
else: |
|
return HTTPFound(request.resource_path(request.root, "login"))
|
|
|