예제 #1
0
    def ijik_plugin_init(self, app):
        self.api = app.api
        self.get_session = app.get_session
        self.mixins = app.mixins
        self.pluginmanager = app.pluginmanager
        self.entitymanager = app.entitymanager
        self.form_renderer = app.form_renderer

        app.pluginmanager.add_hookspecs(Hooks)

        self.editor = Editor(
                templates = app.templates,
                pluginmanager = app.pluginmanager,
                sessionmanager = app.sessionmanager,
                **self.config
        )

        ijik.mixin(self.mixins.EditorNewSignup)(EditorNewSignup)
예제 #2
0
    def ijik_plugin_init(self, app):
        self.mixins = app.mixins
        self.pluginmanager = app.pluginmanager
        self.sessionmanager = app.sessionmanager
        self.entitymanager = app.entitymanager

        ijik.mixin(self.mixins.EditorNewTeam)(EditorTeamProps)
        ijik.mixin(self.mixins.EditorUpdateTeam)(partial(EditorTeamProps))
        ijik.mixin(self.mixins.EditorTeamInfo)(EditorTeamInfo)
예제 #3
0
    def ijik_plugin_init(self, app):
        self.mixins = app.mixins
        self.entitymanager = app.entitymanager
        self.pluginmanager = app.pluginmanager
        self.sessionmanager = app.sessionmanager
        self.templates = app.templates

        ijik.mixin(self.mixins.EditorNewSignup)(EditorUserInfo)
        ijik.mixin(self.mixins.EditorUpdateUser)(partial(EditorUserProps))
        ijik.mixin(self.mixins.EditorUserInfo)(EditorUserInfo)
예제 #4
0
    def ijik_plugin_init(self, app):
        self.mixins = app.mixins
        self.pluginmanager = app.pluginmanager
        self.sessionmanager = app.sessionmanager
        self.entitymanager = app.entitymanager
        self.templates = app.templates

        ijik.mixin(self.mixins.EditorNewMember)(EditorMemberProps)
        ijik.mixin(self.mixins.EditorUpdateMember)(partial(EditorMemberProps))
        ijik.mixin(self.mixins.EditorMemberInfo)(EditorMemberInfo)

        ijik.mixin(self.mixins.EditorNewTeam)(EditorTeamMembers)
        ijik.mixin(self.mixins.EditorUpdateTeam)(partial(EditorTeamMembers))
        ijik.mixin(self.mixins.EditorTeamInfo)(EditorTeamMembers)
예제 #5
0
        def ijik_plugin_init(self, app):
            class Missing(pydantic.BaseModel):
                missing_prop: str

            for m in self.mixins:
                ijik.mixin(getattr(app.mixins, m))(Missing)
예제 #6
0
 def ijik_plugin_init(self, app):
     self.form_renderer = app.form_renderer
     ijik.mixin(app.mixins.EditorNewSignup)(partial(UserAgreeMixin))
예제 #7
0
 def ijik_plugin_init(self, app):
     ijik.mixin(app.mixins.EditorNewSignup)(
         self.schema)  # note: this is the static model
     ijik.mixin(app.mixins.EditorUpdateUser)(partial(
         self.inject_update_model))
     ijik.mixin(app.mixins.EditorUserInfo)(self.inject_model)
예제 #8
0
 def _team_mixin_init(self, app):
     ijik.mixin(app.mixins.EditorNewTeam)(self.inject_model)
     ijik.mixin(app.mixins.EditorUpdateTeam)(partial(
         self.inject_update_model))
     ijik.mixin(app.mixins.EditorTeamInfo)(self.inject_model)
예제 #9
0
 def _member_mixin_init(self, app):
     ijik.mixin(app.mixins.EditorNewMember)(self.inject_model)
     ijik.mixin(app.mixins.EditorUpdateMember)(partial(
         self.inject_update_model))
     ijik.mixin(app.mixins.EditorMemberInfo)(self.inject_model)
예제 #10
0
 def ijik_plugin_init(self, app):
     ijik.mixin(app.mixins.EditorNewTeam)(EditorTeamCategory)
     ijik.mixin(app.mixins.EditorTeamInfo)(EditorTeamCategory)
     app.templates.env.globals["category_name"] = self.category_name