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
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
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()
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()
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
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
def _get(self): from core.utils import get_code return get_code(getattr(self, code_field_name))
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