def signup_extra_form_class(self):
        if not getattr(self, '_signup_extra_form_class', None):
            from core.utils import get_code
            self._signup_extra_form_class = get_code(
                self.signup_extra_form_class_path)

        return self._signup_extra_form_class
Exemplo n.º 2
0
    def _get(self):
        # NOTE moving get_code invocation outside _get would create a circular import
        EventMetaClass = get_code(code_path)

        try:
            return EventMetaClass.objects.get(event=self)
        except EventMetaClass.DoesNotExist:
            return None
Exemplo n.º 3
0
    def _grant(self, person):
        from .granted_privilege import GrantedPrivilege

        gp = GrantedPrivilege.objects.get(privilege=self, person=person, state="approved")

        grant_function = get_code(self.grant_code)
        grant_function(self, person)

        gp.state = "granted"
        gp.save()
Exemplo n.º 4
0
    def _grant(self, person):
        from .granted_privilege import GrantedPrivilege

        gp = GrantedPrivilege.objects.get(privilege=self, person=person, state='approved')

        grant_function = get_code(self.grant_code)
        grant_function(self, person)

        gp.state = 'granted'
        gp.save()
Exemplo n.º 5
0
 def _make_account_name_for_person(self, person):
     account_name_func = get_code(self.account_name_code)
     return account_name_func(person)
    def programme_form_class(self):
        if not getattr(self, '_programme_form_class', None):
            from core.utils import get_code
            self._programme_form_class = get_code(self.programme_form_code)

        return self._programme_form_class
Exemplo n.º 7
0
    def signup_extra_form_class(self):
        if not getattr(self, '_signup_extra_form_class', None):
            from core.utils import get_code
            self._signup_extra_form_class = get_code(self.signup_extra_form_class_path)

        return self._signup_extra_form_class
Exemplo n.º 8
0
 def _get(self):
     from core.utils import get_code
     return get_code(getattr(self, code_field_name))
Exemplo n.º 9
0
 def _make_account_name_for_person(self, person):
     account_name_func = get_code(self.account_name_code)
     return account_name_func(person)
    def programme_form_class(self):
        if not getattr(self, '_programme_form_class', None):
            from core.utils import get_code
            self._programme_form_class = get_code(self.programme_form_code)

        return self._programme_form_class
Exemplo n.º 11
0
    def form_class(self):
        if not getattr(self, '_form_class', None):
            from core.utils import get_code
            self._form_class = get_code(self.form_class_path)

        return self._form_class
Exemplo n.º 12
0
    def form_class(self):
        if not getattr(self, '_form_class', None):
            from core.utils import get_code
            self._form_class = get_code(self.form_class_path)

        return self._form_class