#10 Started on the admin endpoints
This commit is contained in:
parent
7faca50b73
commit
cc9aaff6e1
21
controllers/web/admin.py
Normal file
21
controllers/web/admin.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
""" The user controller to manage all of the user related endpoints
|
||||||
|
in the web app
|
||||||
|
"""
|
||||||
|
from flask import Blueprint
|
||||||
|
|
||||||
|
# from flask import render_template
|
||||||
|
|
||||||
|
# Blueprint to append user endpoints to
|
||||||
|
blueprint = Blueprint("admin", __name__, url_prefix="/admin")
|
||||||
|
|
||||||
|
|
||||||
|
@blueprint.route('/')
|
||||||
|
def main_admin():
|
||||||
|
""" Function responsible for delivering the admin page for the site """
|
||||||
|
return "Hello, World"
|
||||||
|
|
||||||
|
|
||||||
|
@blueprint.route('/users/')
|
||||||
|
def admin_users():
|
||||||
|
""" Endpoint responsible for managing a users permissions """
|
||||||
|
return "Hello, Worlds"
|
@ -6,12 +6,14 @@ from flask import redirect, Blueprint, session
|
|||||||
from . import user
|
from . import user
|
||||||
from . import product
|
from . import product
|
||||||
from . import stats
|
from . import stats
|
||||||
|
from . import admin
|
||||||
|
|
||||||
blueprint = Blueprint('main', __name__)
|
blueprint = Blueprint('main', __name__)
|
||||||
|
|
||||||
blueprint.register_blueprint(user.blueprint)
|
blueprint.register_blueprint(user.blueprint)
|
||||||
blueprint.register_blueprint(product.blueprint)
|
blueprint.register_blueprint(product.blueprint)
|
||||||
blueprint.register_blueprint(stats.blueprint)
|
blueprint.register_blueprint(stats.blueprint)
|
||||||
|
blueprint.register_blueprint(admin.blueprint)
|
||||||
|
|
||||||
|
|
||||||
# CONTEXTS #
|
# CONTEXTS #
|
||||||
|
Loading…
Reference in New Issue
Block a user