diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-07 13:59:24 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-07 13:59:24 +0530 |
commit | 11a2e1c778cf4b2ea958b6bdd7868c8604d45df2 (patch) | |
tree | 1db1b387a4d0f34831b6e88aeced59c89e604cd6 /app/views/main.py | |
parent | 3a708b304319afe84ebf3d40ecebabe6acc339f3 (diff) |
added docstrings
Diffstat (limited to 'app/views/main.py')
-rw-r--r-- | app/views/main.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/views/main.py b/app/views/main.py index 85df723..d4d94e9 100644 --- a/app/views/main.py +++ b/app/views/main.py @@ -1,20 +1,32 @@ +# -*- coding: utf-8 -*- +""" +This is the main views module. + +You should import all other views into this file rather than individually importing in __init__.py +""" + from app import app from app.forms.app_forms import MyForm from flask import render_template, flash from app.views import auth, error_pages, admin from app.misc_func import flash_errors -theme = "original" - - @app.route("/") @app.route("/index") def index(): + """ + The view for the landing page. + """ return render_template("index.html") @app.route("/ContactUs", methods=["GET", "POST"]) def contact_us(): + """ + A simple contact us form with basic validation. + + This dummy form has not been linked to any database. + """ form = MyForm() if form.validate_on_submit(): return "Wuhu" |