We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 735396e commit 610ca0aCopy full SHA for 610ca0a
example_app/app.py
@@ -2,8 +2,8 @@
2
from flask_debugtoolbar import DebugToolbarExtension
3
from pymongo import monitoring
4
5
+from example_app import views
6
from example_app.models import db
-from example_app.views import index, pagination
7
from flask_mongoengine.panels import mongo_command_logger
8
9
app = flask.Flask("example_app")
@@ -38,8 +38,8 @@
38
db.init_app(app)
39
40
41
-app.add_url_rule("/", view_func=index)
42
-app.add_url_rule("/pagination", view_func=pagination)
+app.add_url_rule("/", view_func=views.index)
+app.add_url_rule("/pagination", view_func=views.pagination, methods=["GET", "POST"])
43
44
if __name__ == "__main__":
45
app.run(host="0.0.0.0", port=8000)
0 commit comments