diff libervia/pages/events/rsvp/page_meta.py @ 1509:106bae41f5c8

massive refactoring from camelCase -> snake_case. See backend commit log for more details
author Goffi <goffi@goffi.org>
date Sat, 08 Apr 2023 13:44:11 +0200
parents d6bcb0cf92d2
children
line wrap: on
line diff
--- a/libervia/pages/events/rsvp/page_meta.py	Fri Apr 07 15:20:40 2023 +0200
+++ b/libervia/pages/events/rsvp/page_meta.py	Sat Apr 08 13:44:11 2023 +0200
@@ -20,7 +20,7 @@
 
 
 def parse_url(self, request):
-    self.getPathArgs(
+    self.get_path_args(
         request,
         ("event_service", "event_node", "event_id"),
         min_args=2,
@@ -32,15 +32,15 @@
 @defer.inlineCallbacks
 def prepare_render(self, request):
     template_data = request.template_data
-    data = self.getRData(request)
-    profile = self.getProfile(request)
+    data = self.get_r_data(request)
+    profile = self.get_profile(request)
 
     ## Event ##
 
     event_service = data["event_service"]
     event_node = data["event_node"]
     event_id = data["event_id"]
-    event_timestamp, event_data = yield self.host.bridgeCall(
+    event_timestamp, event_data = yield self.host.bridge_call(
         "eventGet",
         event_service.userhost() if event_service else "",
         event_node,
@@ -62,8 +62,8 @@
             % html.escape(background_image, True)
         )
     template_data["event"] = event_data
-    event_invitee_data = yield self.host.bridgeCall(
-        "eventInviteeGet",
+    event_invitee_data = yield self.host.bridge_call(
+        "event_invitee_get",
         event_data["invitees_service"],
         event_data["invitees_node"],
         '',
@@ -80,22 +80,22 @@
 
     # we now need blog items, using blog common page
     # this will fill the "items" template data
-    blog_page = self.getPageByName("blog_view")
+    blog_page = self.get_page_by_name("blog_view")
     yield blog_page.prepare_render(self, request)
 
 
 @defer.inlineCallbacks
 def on_data_post(self, request):
-    type_ = self.getPostedData(request, "type")
+    type_ = self.get_posted_data(request, "type")
     if type_ == "comment":
-        blog_page = self.getPageByName("blog_view")
+        blog_page = self.get_page_by_name("blog_view")
         yield blog_page.on_data_post(self, request)
     elif type_ == "attendance":
-        profile = self.getProfile(request)
-        service, node, attend, guests = self.getPostedData(
+        profile = self.get_profile(request)
+        service, node, attend, guests = self.get_posted_data(
             request, ("service", "node", "attend", "guests")
         )
         data = {"attend": attend, "guests": guests}
-        yield self.host.bridgeCall("eventInviteeSet", service, node, data, profile)
+        yield self.host.bridge_call("event_invitee_set", service, node, data, profile)
     else:
         log.warning(_("Unhandled data type: {}").format(type_))