Exemplo n.º 1
0
 def load_config(self, app_config: CFG) -> None:
     template_dir = app_config.here_macro_replace("%(here)s/tracim_backend/templates/mail")
     app_config.EMAIL__NOTIFICATION__UPLOAD_PERMISSION_TO_RECEIVER__TEMPLATE__HTML = app_config.get_raw_config(
         "email.notification.upload_permission_to_receiver.template.html",
         "{}/{}".format(template_dir, "upload_permission_to_receiver_body_html.mak"),
     )
     app_config.EMAIL__NOTIFICATION__UPLOAD_PERMISSION_TO_RECEIVER__SUBJECT = app_config.get_raw_config(
         "email.notification.upload_permission_to_receiver.subject",
         _('{emitter_name} invited you to upload files on "{website_title}"'),
     )
     app_config.EMAIL__NOTIFICATION__UPLOAD_PERMISSION_TO_EMITTER__TEMPLATE__HTML = app_config.get_raw_config(
         "email.notification.upload_permission_to_emitter.template.html",
         "{}/{}".format(template_dir, "upload_permission_to_emitter_body_html.mak"),
     )
     app_config.EMAIL__NOTIFICATION__UPLOAD_PERMISSION_TO_EMITTER__SUBJECT = app_config.get_raw_config(
         "email.notification.upload_permission_to_emitter.subject",
         _(
             '[{website_title}] You invited {nb_receivers} people to upload files on "{workspace_name}"'
         ),
     )
     app_config.EMAIL__NOTIFICATION__NEW_UPLOAD_EVENT__TEMPLATE__HTML = app_config.get_raw_config(
         "email.notification.new_upload_event.template.html",
         "{}/{}".format(template_dir, "new_upload_event_body_html.mak"),
     )
     app_config.EMAIL__NOTIFICATION__NEW_UPLOAD_EVENT__SUBJECT = app_config.get_raw_config(
         "email.notification.new_upload_event.subject",
         _(
             '[{website_title}] {uploader_username} shared {nb_uploaded_contents} files in "{workspace_name}"'
         ),
     )
Exemplo n.º 2
0
 def load_config(self, app_config: CFG) -> None:
     app_config.COLLABORATIVE_DOCUMENT_EDITION__SOFTWARE = app_config.get_raw_config(
         "collaborative_document_edition.software")
     app_config.COLLABORATIVE_DOCUMENT_EDITION__COLLABORA__BASE_URL = app_config.get_raw_config(
         "collaborative_document_edition.collabora.base_url")
     default_file_template_dir = app_config.here_macro_replace(
         "%(here)s/tracim_backend/templates/open_documents")
     app_config.COLLABORATIVE_DOCUMENT_EDITION__FILE_TEMPLATE_DIR = app_config.get_raw_config(
         "collaborative_document_edition.file_template_dir",
         default_file_template_dir)
Exemplo n.º 3
0
 def load_config(self, app_config: CFG) -> None:
     """
     load config for caldav related stuff
     """
     app_config.CALDAV__RADICALE_PROXY__BASE_URL = app_config.get_raw_config(
         "caldav.radicale_proxy.base_url", "http://localhost:5232")
     default_caldav_storage_dir = app_config.here_macro_replace(
         "%(here)s/radicale_storage")
     app_config.CALDAV__RADICALE__STORAGE__FILESYSTEM_FOLDER = app_config.get_raw_config(
         "caldav.radicale.storage.filesystem_folder",
         default_caldav_storage_dir)
     app_config.CALDAV__RADICALE__AGENDA_DIR = "agenda"
     app_config.CALDAV__RADICALE__WORKSPACE_SUBDIR = "workspace"
     app_config.CALDAV__RADICALE__USER_SUBDIR = "user"
     app_config.CALDAV__RADICALE__BASE_PATH = "/{}/".format(
         app_config.CALDAV__RADICALE__AGENDA_DIR)
     app_config.CALDAV__RADICALE__USER_PATH = "/{}/{}/".format(
         app_config.CALDAV__RADICALE__AGENDA_DIR,
         app_config.CALDAV__RADICALE__USER_SUBDIR)
     app_config.CALDAV_RADICALE_WORKSPACE_PATH = "/{}/{}/".format(
         app_config.CALDAV__RADICALE__AGENDA_DIR,
         app_config.CALDAV__RADICALE__WORKSPACE_SUBDIR)
Exemplo n.º 4
0
 def load_config(self, app_config: CFG) -> None:
     # share content email
     template_dir = app_config.here_macro_replace(
         "%(here)s/tracim_backend/templates/mail")
     app_config.EMAIL__NOTIFICATION__SHARE_CONTENT_TO_RECEIVER__TEMPLATE__HTML = app_config.get_raw_config(
         "email.notification.share_content_to_receiver.template.html",
         "{}/{}".format(template_dir,
                        "shared_content_to_receiver_body_html.mak"),
     )
     app_config.EMAIL__NOTIFICATION__SHARE_CONTENT_TO_RECEIVER__SUBJECT = app_config.get_raw_config(
         "email.notification.share_content_to_receiver.subject",
         _('[{website_title}] {emitter_name} shared the file "{content_filename}" with you'
           ),
     )
     app_config.EMAIL__NOTIFICATION__SHARE_CONTENT_TO_EMITTER__TEMPLATE__HTML = app_config.get_raw_config(
         "email.notification.share_content_to_emitter.template.html",
         "{}/{}".format(template_dir,
                        "shared_content_to_emitter_body_html.mak"),
     )
     app_config.EMAIL__NOTIFICATION__SHARE_CONTENT_TO_EMITTER__SUBJECT = app_config.get_raw_config(
         "email.notification.share_content_to_emitter.subject",
         _('[{website_title}] You shared "{content_filename}" with {nb_receivers} people'
           ),
     )