Add blueprints for authentication, admin, dashboard, gallery, generation, and profile routes

- Created `__init__.py` for blueprint registration.
- Implemented `auth.py` for user authentication (login, register, logout).
- Added `admin.py` for admin functionalities (user management, stats).
- Developed `dashboard.py` for user dashboard displaying user info and generated content.
- Created `gallery.py` for managing and displaying images and videos.
- Implemented `generate.py` for text, image, and video generation functionalities.
- Added `profile.py` for user profile management.
- Updated templates to reflect new route structures and improve navigation.
This commit is contained in:
2026-05-30 19:39:30 +02:00
parent 02fc5995db
commit f43b13f625
20 changed files with 667 additions and 617 deletions
+6 -6
View File
@@ -3,7 +3,7 @@ endblock %} {% block content %}
<div class="card">
<h1>Welcome{% if user.get('email') %}, {{ user.email }}{% endif %}</h1>
<p>Role: <strong>{{ user.get('role', 'user') }}</strong></p>
<a href="{{ url_for('generate') }}" class="btn">Start generating</a>
<a href="{{ url_for('generate.index') }}" class="btn">Start generating</a>
</div>
{% if pending_videos %}
@@ -12,7 +12,7 @@ endblock %} {% block content %}
<div class="image-grid">
{% for vid in pending_videos %}
<a
href="{{ url_for('video_detail', video_id=vid.id) }}"
href="{{ url_for('gallery.video_detail', video_id=vid.id) }}"
class="image-grid-item"
>
<div
@@ -39,7 +39,7 @@ endblock %} {% block content %}
<div class="image-grid">
{% for img in generated_images %}
<a
href="{{ url_for('image_detail', image_id=img.id) }}"
href="{{ url_for('gallery.image_detail', image_id=img.id) }}"
class="image-grid-item"
>
<img
@@ -62,7 +62,7 @@ endblock %} {% block content %}
<div class="image-grid">
{% for vid in completed_videos %}
<a
href="{{ url_for('video_detail', video_id=vid.id) }}"
href="{{ url_for('gallery.video_detail', video_id=vid.id) }}"
class="image-grid-item"
>
{% if vid.video_url %}
@@ -97,11 +97,11 @@ endblock %} {% block content %}
<div class="image-grid">
{% for img in images %}
<a
href="{{ url_for('upload_detail', image_id=img.id) }}"
href="{{ url_for('gallery.upload_detail', image_id=img.id) }}"
class="image-grid-item"
>
<img
src="{{ url_for('serve_uploaded_image', image_id=img.id) }}"
src="{{ url_for('gallery.serve_uploaded_image', image_id=img.id) }}"
alt="{{ img.filename }}"
class="generated-image"
loading="lazy"