comparison src/server/constants.py @ 962:c7fba7709d05

Pages: various improvments: - automatic confirmation message on data post can now be avoided by using the C.POST_NO_CONFIRM flag - new tailing_slash page variable can be used to force a trailing slash at the end of the URL (by redirecting if necessary) - LiberviaPage now has a url attribute with the its relative path - new redirection methods: - getPageRedirectURL: generate and URL which will redirect to current page (or somewhere else), mainly useful for login - HTTPRedirect: stop workflow and do a HTTP redirection - redirectOrContinue: redirect a page if redirect arguments is present (usually redirect_url), else continue workflow - profile access now redirect to login page if registration is allowed.
author Goffi <goffi@goffi.org>
date Fri, 27 Oct 2017 18:43:16 +0200
parents 67bf14c91d5c
children fd4eae654182
comparison
equal deleted inserted replaced
961:22fe06569b1a 962:c7fba7709d05
57 PAGES_ACCESS_PROFILE = u"profile" # a session with an existing profile must be started 57 PAGES_ACCESS_PROFILE = u"profile" # a session with an existing profile must be started
58 PAGES_ACCESS_ADMIN = u"admin" # only profiles set in admins_list can access the page 58 PAGES_ACCESS_ADMIN = u"admin" # only profiles set in admins_list can access the page
59 PAGES_ACCESS_ALL = (PAGES_ACCESS_NONE, PAGES_ACCESS_PUBLIC, PAGES_ACCESS_PROFILE, PAGES_ACCESS_ADMIN) 59 PAGES_ACCESS_ALL = (PAGES_ACCESS_NONE, PAGES_ACCESS_PUBLIC, PAGES_ACCESS_PROFILE, PAGES_ACCESS_ADMIN)
60 60
61 ## Session flags ## 61 ## Session flags ##
62 FLAG_CONFIRM = u"confirm" 62 FLAG_CONFIRM = u"CONFIRM"
63
64 ## Data post ##
65 POST_NO_CONFIRM = u"POST_NO_CONFIRM"
63 66
64 ## HTTP methods ## 67 ## HTTP methods ##
65 HTTP_METHOD_GET = u'GET' 68 HTTP_METHOD_GET = u'GET'
66 HTTP_METHOD_POST = u'POST' 69 HTTP_METHOD_POST = u'POST'
67 70