Mercurial > libervia-web
diff 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 |
line wrap: on
line diff
--- a/src/server/constants.py Fri Oct 27 18:35:23 2017 +0200 +++ b/src/server/constants.py Fri Oct 27 18:43:16 2017 +0200 @@ -59,7 +59,10 @@ PAGES_ACCESS_ALL = (PAGES_ACCESS_NONE, PAGES_ACCESS_PUBLIC, PAGES_ACCESS_PROFILE, PAGES_ACCESS_ADMIN) ## Session flags ## - FLAG_CONFIRM = u"confirm" + FLAG_CONFIRM = u"CONFIRM" + + ## Data post ## + POST_NO_CONFIRM = u"POST_NO_CONFIRM" ## HTTP methods ## HTTP_METHOD_GET = u'GET'