示例#1
0
def orgsignup():
    orgform = OrganizationForm()
    if orgform.validate_on_submit():
        neworg = Organization(
            name=orgform.name.data,
            types=orgform.types.data,
            description=orgform.description.data,
            category=orgform.category.data,
        )
        neworg.save()
        flash("Congratulations, your organization has joined Charnate!")
        neworg.reload()
        #TODO RETURN ANOTHER TEMPLATE
    return render_template('orgform.html', form=orgform)
示例#2
0
def education():
    educationorgs = Organization.objects(category="Education")
    return render_template("education.html", educationorgs=educationorgs)
示例#3
0
def corporations():
    corporations = Organization.objects(types="Corporation")
    return render_template("corporations.html", corporations=corporations)
示例#4
0
def other():
    otherorgs = Organization.objects(category="Other")
    return render_template("other.html", otherorgs=otherorgs)
示例#5
0
def cultural():
    culturalorgs = Organization.objects(category="Cultural")
    return render_template("cultural.html", culturalorgs=culturalorgs)
示例#6
0
def environment():
    environmentorgs = Organization.objects(category="Environment")
    return render_template("environment.html", environmentorgs=environmentorgs)
示例#7
0
def health():
    healthorgs = Organization.objects(category="Health")
    return render_template("health.html", healthorgs=healthorgs)