diff 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
line wrap: on
line diff
--- a/libervia/server/constants.py	Tue Aug 13 09:39:33 2019 +0200
+++ b/libervia/server/constants.py	Tue Aug 13 19:12:31 2019 +0200
@@ -32,12 +32,12 @@
     THEMES_URL = "themes"
     MEDIA_DIR = "media/"
     CARDS_DIR = "games/cards/tarot"
-    PAGES_DIR = u"pages"
-    TASKS_DIR = u"tasks"
-    LIBERVIA_CACHE = u"libervia"
-    BUILD_DIR = u"__b"
+    PAGES_DIR = "pages"
+    TASKS_DIR = "tasks"
+    LIBERVIA_CACHE = "libervia"
+    BUILD_DIR = "__b"
 
-    TPL_RESOURCE = u'_t'
+    TPL_RESOURCE = '_t'
 
     ERRNUM_BRIDGE_ERRBACK = 0  # FIXME
     ERRNUM_LIBERVIA = 0  # FIXME
@@ -56,15 +56,15 @@
     STATIC_RSM_MAX_COMMENTS_DEFAULT = 10
 
     ## Libervia pages ##
-    PAGES_META_FILE = u"page_meta.py"
+    PAGES_META_FILE = "page_meta.py"
     PAGES_ACCESS_NONE = (
-        u"none"
+        "none"
     )  #  no access to this page (using its path will return a 404 error)
-    PAGES_ACCESS_PUBLIC = u"public"
+    PAGES_ACCESS_PUBLIC = "public"
     PAGES_ACCESS_PROFILE = (
-        u"profile"
+        "profile"
     )  # a session with an existing profile must be started
-    PAGES_ACCESS_ADMIN = u"admin"  #  only profiles set in admins_list can access the page
+    PAGES_ACCESS_ADMIN = "admin"  #  only profiles set in admins_list can access the page
     PAGES_ACCESS_ALL = (
         PAGES_ACCESS_NONE,
         PAGES_ACCESS_PUBLIC,
@@ -86,14 +86,14 @@
     ]
 
     ## Session flags ##
-    FLAG_CONFIRM = u"CONFIRM"
+    FLAG_CONFIRM = "CONFIRM"
 
     ## Data post ##
-    POST_NO_CONFIRM = u"POST_NO_CONFIRM"
+    POST_NO_CONFIRM = "POST_NO_CONFIRM"
 
     ## HTTP methods ##
-    HTTP_METHOD_GET = u"GET"
-    HTTP_METHOD_POST = u"POST"
+    HTTP_METHOD_GET = b"GET"
+    HTTP_METHOD_POST = b"POST"
 
     ## HTTP codes ##
     HTTP_SEE_OTHER = 303