comparison libervia/server/constants.py @ 1246:aaf28d45ae67

pages: browser code, first draft: - code for browser can now be specified if a page subdirectory named `_browser` exists - the default engine used is `Brython` (not yet implemented, so it will do nothing for now) - build_path now uses C.SITE_NAME_DEFAULT for default site instead of empty string, to avoid collision with other sites - ProtectedFile transtype path (first positional argument) to str, so a pathlib.Path can be used
author Goffi <goffi@goffi.org>
date Sun, 26 Apr 2020 22:01:13 +0200
parents f511f8fbbf8a
children 9b865f2604a9
comparison
equal deleted inserted replaced
1245:079e8eb6e327 1246:aaf28d45ae67
33 MEDIA_DIR = "media/" 33 MEDIA_DIR = "media/"
34 CARDS_DIR = "games/cards/tarot" 34 CARDS_DIR = "games/cards/tarot"
35 PAGES_DIR = "pages" 35 PAGES_DIR = "pages"
36 TASKS_DIR = "tasks" 36 TASKS_DIR = "tasks"
37 LIBERVIA_CACHE = "libervia" 37 LIBERVIA_CACHE = "libervia"
38 SITE_NAME_DEFAULT = "default"
38 BUILD_DIR = "__b" 39 BUILD_DIR = "__b"
40 BUILD_DIR_DYN = "dyn"
39 41
40 TPL_RESOURCE = '_t' 42 TPL_RESOURCE = '_t'
41 43
42 ERRNUM_BRIDGE_ERRBACK = 0 # FIXME 44 ERRNUM_BRIDGE_ERRBACK = 0 # FIXME
43 ERRNUM_LIBERVIA = 0 # FIXME 45 ERRNUM_LIBERVIA = 0 # FIXME
55 STATIC_RSM_MAX_DEFAULT = 10 57 STATIC_RSM_MAX_DEFAULT = 10
56 STATIC_RSM_MAX_COMMENTS_DEFAULT = 10 58 STATIC_RSM_MAX_COMMENTS_DEFAULT = 10
57 59
58 ## Libervia pages ## 60 ## Libervia pages ##
59 PAGES_META_FILE = "page_meta.py" 61 PAGES_META_FILE = "page_meta.py"
62 PAGES_BROWSER_DIR = "_browser"
60 PAGES_ACCESS_NONE = ( 63 PAGES_ACCESS_NONE = (
61 "none" 64 "none"
62 ) #  no access to this page (using its path will return a 404 error) 65 ) #  no access to this page (using its path will return a 404 error)
63 PAGES_ACCESS_PUBLIC = "public" 66 PAGES_ACCESS_PUBLIC = "public"
64 PAGES_ACCESS_PROFILE = ( 67 PAGES_ACCESS_PROFILE = (