Commit f20fa3d9 authored by Petrus J.v.Rensburg's avatar Petrus J.v.Rensburg

Make 'simple' example deployable to Apache.

parent 532be52b
...@@ -29,13 +29,13 @@ app = Flask(__name__, template_folder='templates') ...@@ -29,13 +29,13 @@ app = Flask(__name__, template_folder='templates')
def index(): def index():
return '<a href="/admin/">Click me to get to Admin!</a>' return '<a href="/admin/">Click me to get to Admin!</a>'
# Create admin interface
admin = admin.Admin()
admin.add_view(MyAdminView(category='Test'))
admin.add_view(AnotherAdminView(category='Test'))
admin.init_app(app)
if __name__ == '__main__': if __name__ == '__main__':
# Create admin interface
admin = admin.Admin()
admin.add_view(MyAdminView(category='Test'))
admin.add_view(AnotherAdminView(category='Test'))
admin.init_app(app)
# Start app # Start app
app.run(debug=True) app.run(debug=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment