Mercurial > libervia-web
comparison libervia/server/constants.py @ 1216:b2d067339de3
python 3 port:
/!\ Python 3.6+ is now needed to use libervia
/!\ instability may occur and features may not be working anymore, this will improve with time
/!\ TxJSONRPC dependency has been removed
The same procedure as in backend has been applied (check backend commit ab2696e34d29 logs
for details). Removed now deprecated code (Pyjamas compiled browser part, legacy blog,
JSON RPC related code).
Adapted code to work without `html` and `themes` dirs.
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 13 Aug 2019 19:12:31 +0200 |
parents | 0f37b65fe7c2 |
children | 987595a254b0 |
comparison
equal
deleted
inserted
replaced
1215:f14ab8a25e8b | 1216:b2d067339de3 |
---|---|
30 HTML_DIR = "html/" | 30 HTML_DIR = "html/" |
31 THEMES_DIR = "themes/" | 31 THEMES_DIR = "themes/" |
32 THEMES_URL = "themes" | 32 THEMES_URL = "themes" |
33 MEDIA_DIR = "media/" | 33 MEDIA_DIR = "media/" |
34 CARDS_DIR = "games/cards/tarot" | 34 CARDS_DIR = "games/cards/tarot" |
35 PAGES_DIR = u"pages" | 35 PAGES_DIR = "pages" |
36 TASKS_DIR = u"tasks" | 36 TASKS_DIR = "tasks" |
37 LIBERVIA_CACHE = u"libervia" | 37 LIBERVIA_CACHE = "libervia" |
38 BUILD_DIR = u"__b" | 38 BUILD_DIR = "__b" |
39 | 39 |
40 TPL_RESOURCE = u'_t' | 40 TPL_RESOURCE = '_t' |
41 | 41 |
42 ERRNUM_BRIDGE_ERRBACK = 0 # FIXME | 42 ERRNUM_BRIDGE_ERRBACK = 0 # FIXME |
43 ERRNUM_LIBERVIA = 0 # FIXME | 43 ERRNUM_LIBERVIA = 0 # FIXME |
44 | 44 |
45 # Security limit for Libervia (get/set params) | 45 # Security limit for Libervia (get/set params) |
54 STATIC_RSM_MAX_LIMIT = 100 | 54 STATIC_RSM_MAX_LIMIT = 100 |
55 STATIC_RSM_MAX_DEFAULT = 10 | 55 STATIC_RSM_MAX_DEFAULT = 10 |
56 STATIC_RSM_MAX_COMMENTS_DEFAULT = 10 | 56 STATIC_RSM_MAX_COMMENTS_DEFAULT = 10 |
57 | 57 |
58 ## Libervia pages ## | 58 ## Libervia pages ## |
59 PAGES_META_FILE = u"page_meta.py" | 59 PAGES_META_FILE = "page_meta.py" |
60 PAGES_ACCESS_NONE = ( | 60 PAGES_ACCESS_NONE = ( |
61 u"none" | 61 "none" |
62 ) # no access to this page (using its path will return a 404 error) | 62 ) # no access to this page (using its path will return a 404 error) |
63 PAGES_ACCESS_PUBLIC = u"public" | 63 PAGES_ACCESS_PUBLIC = "public" |
64 PAGES_ACCESS_PROFILE = ( | 64 PAGES_ACCESS_PROFILE = ( |
65 u"profile" | 65 "profile" |
66 ) # a session with an existing profile must be started | 66 ) # a session with an existing profile must be started |
67 PAGES_ACCESS_ADMIN = u"admin" # only profiles set in admins_list can access the page | 67 PAGES_ACCESS_ADMIN = "admin" # only profiles set in admins_list can access the page |
68 PAGES_ACCESS_ALL = ( | 68 PAGES_ACCESS_ALL = ( |
69 PAGES_ACCESS_NONE, | 69 PAGES_ACCESS_NONE, |
70 PAGES_ACCESS_PUBLIC, | 70 PAGES_ACCESS_PUBLIC, |
71 PAGES_ACCESS_PROFILE, | 71 PAGES_ACCESS_PROFILE, |
72 PAGES_ACCESS_ADMIN, | 72 PAGES_ACCESS_ADMIN, |
84 "merge-requests", | 84 "merge-requests", |
85 "app", | 85 "app", |
86 ] | 86 ] |
87 | 87 |
88 ## Session flags ## | 88 ## Session flags ## |
89 FLAG_CONFIRM = u"CONFIRM" | 89 FLAG_CONFIRM = "CONFIRM" |
90 | 90 |
91 ## Data post ## | 91 ## Data post ## |
92 POST_NO_CONFIRM = u"POST_NO_CONFIRM" | 92 POST_NO_CONFIRM = "POST_NO_CONFIRM" |
93 | 93 |
94 ## HTTP methods ## | 94 ## HTTP methods ## |
95 HTTP_METHOD_GET = u"GET" | 95 HTTP_METHOD_GET = b"GET" |
96 HTTP_METHOD_POST = u"POST" | 96 HTTP_METHOD_POST = b"POST" |
97 | 97 |
98 ## HTTP codes ## | 98 ## HTTP codes ## |
99 HTTP_SEE_OTHER = 303 | 99 HTTP_SEE_OTHER = 303 |
100 HTTP_NOT_MODIFIED = 304 | 100 HTTP_NOT_MODIFIED = 304 |
101 HTTP_BAD_REQUEST = 400 | 101 HTTP_BAD_REQUEST = 400 |