From d473ffe12f72109bc304ca341571a10cc4cf8f38 Mon Sep 17 00:00:00 2001 From: cel Date: Wed, 4 May 2022 16:15:39 +0100 Subject: added routes doc --- routes.txt | 111 +++++++++++++++++++++++++++++++++++++++++++++++ victoria/admin/routes.py | 16 +++++++ 2 files changed, 127 insertions(+) create mode 100644 routes.txt diff --git a/routes.txt b/routes.txt new file mode 100644 index 0000000..c95a2c4 --- /dev/null +++ b/routes.txt @@ -0,0 +1,111 @@ +# routes for site + +## main + +/ +/home +/tags +/tag/ +/about +/series +/series/ +(/artists +/artist/ +/artist//contact) +/contact +/works +/work/ +/license/ + +## admin + +/admin/login +/admin/login?token= +login path, sign in with otp code sent to email + +### requires auth + +/admin +/admin/dashboard +links to: +- works +- series +- artists +- settings + +/admin/works +- lists works in library +- ability to jump into works edit +- select works on page to: + - delete + - add to series + - tag/untag + - edit license +- delete individual work +- add new work +(some kind of library view which can be adapted for different uses) + +/admin/work/new +- create new work to add to library +- form + +/admin/work/ +- work edit page +- option to delete work +- shows which series work is in +- shows which tags work is in +- form + +/admin/work//delete +- delete work + +/admin/series +- shows series tree structure +- ability to drag and reorder tree +- ability to delete series + - confirm if also delete works in series from library +- jump into series edit +- add new series + +/admin/series/new +- create new series +- form + +/admin/series/ +- series edit page +- can add works + - from library + - create new +- rearrange elements +- remove elements from series + - if deleting a child series, ask if also want to remove works within from library +- option to delete series + +/admin/series//delete +- delete series +- option to delete works within series + +/admin/artists +- if single user, redirects to your page +- else lists all users + +/admin/artist/new +- create new artist/user form + +/admin/artist/ +- edit artist profile + +/admin/artist//delete +- delete artist from db + +/admin/tags +- lists tags that have been created +- click into tag goes to /admin/works?tag= + +/admin/licenses +- lists available licenses +- ability to add or delete licenses + +/admin/settings +- + diff --git a/victoria/admin/routes.py b/victoria/admin/routes.py index 49f8b69..e721075 100644 --- a/victoria/admin/routes.py +++ b/victoria/admin/routes.py @@ -7,8 +7,24 @@ from victoria.admin.utils import send_otp_email admin = Blueprint('admin', __name__) +@admin.route("/admin/login", methods=['GET', 'POST']) +@login_required +def admin_dashboard(): + return render_template('admin.html', title='Admin Dashboard') + @admin.route("/admin", methods=['GET', 'POST']) +@admin.route("/admin/dashboard", methods=['GET', 'POST']) @login_required def admin_dashboard(): return render_template('admin.html', title='Admin Dashboard') +@admin.route("/admin", methods=['GET', 'POST']) +@login_required +def admin_dashboard(): + return render_template('admin.html', title='Admin Dashboard') + +@admin.route("/admin", methods=['GET', 'POST']) +@login_required +def admin_dashboard(): + return render_template('admin.html', title='Admin Dashboard') + -- cgit