Пример #1
0
def build_delete_email_form(request, user_email):
    if not user_email or user_email.type == 'primary':
        return build_form(FailureForm, request)

    form = build_form(DeleteEmailForm, request)
    form.user_email = user_email
    return form
Пример #2
0
def build_change_email_form(request, user_email):
    if not user_email or user_email.activation_state == 'pending' or \
       user_email.type == 'primary':
        return build_form(FailureForm, request)

    form = build_form(ChangeEmailForm, request)
    form.user_email = user_email
    return form
Пример #3
0
def build_new_email_form(request):
    return build_form(NewEmailForm, request)
Пример #4
0
def build_change_password_form(request, user):
    form = build_form(ChangePasswordForm, request)
    form.user = user
    return form
Пример #5
0
def build_edit_project_form(req, project):
    form = build_form(EditProjectForm, req, project)
    form.current_project = project
    return form
Пример #6
0
def build_signup_form(request):
    return build_form(SignupForm, request)
Пример #7
0
def build_edit_publication_site_form(req, site):
    form = build_form(EditPublicationSiteForm, req, site)
    form.current_site = site
    return form
Пример #8
0
def build_new_project_form(req):
    return build_form(NewProjectForm, req)
Пример #9
0
def build_new_publication_site_form(req):
    return build_form(NewPublicationSiteForm, req)
Пример #10
0
def build_new_application_site_form(req):
    return build_form(NewApplicationSiteForm, req)
Пример #11
0
def build_reset_password_form(request):
    return build_form(ResetPasswordForm, request)
Пример #12
0
def build_article_editor_form(req, article=None):
    form = build_form(ArticleEditorForm, req, article)
    form.current_article = article
    return form
Пример #13
0
def build_article_settings_form(req, article=None):
    form = build_form(ArticleSettingsForm, req, article)
    form.current_article = article
    return form