diff libervia/pages/events/new/page_meta.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 29eb15062416
children f511f8fbbf8a
line wrap: on
line diff
--- a/libervia/pages/events/new/page_meta.py	Tue Aug 13 09:39:33 2019 +0200
+++ b/libervia/pages/events/new/page_meta.py	Tue Aug 13 19:12:31 2019 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.7
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 from libervia.server.constants import Const as C
@@ -8,9 +8,9 @@
 
 """creation of new events"""
 
-name = u"event_new"
+name = "event_new"
 access = C.PAGES_ACCESS_PROFILE
-template = u"event/create.html"
+template = "event/create.html"
 log = getLogger(__name__)
 
 
@@ -31,9 +31,9 @@
         if not value.startswith("http"):
             self.pageError(request, C.HTTP_BAD_REQUEST)
         data[var] = value
-    data[u"register"] = C.BOOL_TRUE
+    data["register"] = C.BOOL_TRUE
     node = yield self.host.bridgeCall("eventCreate", timestamp, data, "", "", "", profile)
-    log.info(u"Event node created at {node}".format(node=node))
+    log.info("Event node created at {node}".format(node=node))
 
-    request_data["post_redirect_page"] = (self.getPageByName(u"event_admin"), "@", node)
+    request_data["post_redirect_page"] = (self.getPageByName("event_admin"), "@", node)
     defer.returnValue(C.POST_NO_CONFIRM)