summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar cel <cel@blos.sm>2022-05-04 16:15:39 +0100
committerLibravatar cel <cel@blos.sm>2022-05-04 16:15:39 +0100
commitd473ffe12f72109bc304ca341571a10cc4cf8f38 (patch)
treee86ee04fda5a84ec8f1371f01b56bb768d77b4ec
parentae6433151de7b5a4cba6193cb1367649f412f704 (diff)
downloadvictoria-d473ffe12f72109bc304ca341571a10cc4cf8f38.tar.gz
victoria-d473ffe12f72109bc304ca341571a10cc4cf8f38.tar.bz2
victoria-d473ffe12f72109bc304ca341571a10cc4cf8f38.zip
added routes doc
-rw-r--r--routes.txt111
-rw-r--r--victoria/admin/routes.py16
2 files changed, 127 insertions, 0 deletions
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/<tag.tag>
+/about
+/series
+/series/<series_id>
+(/artists
+/artist/<artist_id>
+/artist/<artist_id>/contact)
+/contact
+/works
+/work/<work_id>
+/license/<license>
+
+## admin
+
+/admin/login
+/admin/login?token=<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_id>
+- work edit page
+- option to delete work
+- shows which series work is in
+- shows which tags work is in
+- form
+
+/admin/work/<work_id>/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_id>
+- 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/<series_id>/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/<artist_id>
+- edit artist profile
+
+/admin/artist/<artist_id>/delete
+- delete artist from db
+
+/admin/tags
+- lists tags that have been created
+- click into tag goes to /admin/works?tag=<tag.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')
+