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
+7 -7
View File
@@ -22,7 +22,7 @@ content %}
class="block bg-gray-800 rounded-lg shadow-lg overflow-hidden hover:shadow-2xl transition-shadow duration-300 relative"
data-pending-video-id="{{ video.id }}"
>
<a href="{{ url_for('video_detail', video_id=video.id) }}">
<a href="{{ url_for('gallery.video_detail', video_id=video.id) }}">
<div class="p-4">
<p class="font-bold text-lg truncate">{{ video.prompt }}</p>
<p class="text-sm text-gray-400">
@@ -62,7 +62,7 @@ content %}
>
{% for image in generated_images %}
<a
href="{{ url_for('image_detail', image_id=image.id) }}"
href="{{ url_for('gallery.image_detail', image_id=image.id) }}"
class="block bg-gray-800 rounded-lg shadow-lg overflow-hidden hover:shadow-2xl transition-shadow duration-300"
>
<img
@@ -86,7 +86,7 @@ content %}
<p class="text-gray-400">
You haven't generated any images yet.
<a
href="{{ url_for('generate_image') }}"
href="{{ url_for('generate.image') }}"
class="text-blue-400 hover:underline"
>Generate one now</a
>.
@@ -105,7 +105,7 @@ content %}
>
{% for video in completed_videos %}
<a
href="{{ url_for('video_detail', video_id=video.id) }}"
href="{{ url_for('gallery.video_detail', video_id=video.id) }}"
class="block bg-gray-800 rounded-lg shadow-lg overflow-hidden hover:shadow-2xl transition-shadow duration-300"
>
{% if video.video_url %}
@@ -154,7 +154,7 @@ content %}
<p class="text-gray-400">
You haven't generated any videos yet.
<a
href="{{ url_for('generate_video') }}"
href="{{ url_for('generate.video') }}"
class="text-blue-400 hover:underline"
>Generate one now</a
>.
@@ -173,11 +173,11 @@ content %}
>
{% for image in uploads %}
<a
href="{{ url_for('upload_detail', image_id=image.id) }}"
href="{{ url_for('gallery.upload_detail', image_id=image.id) }}"
class="block bg-gray-800 rounded-lg shadow-lg overflow-hidden hover:shadow-2xl transition-shadow duration-300"
>
<img
src="{{ url_for('serve_uploaded_image', image_id=image.id) }}"
src="{{ url_for('gallery.serve_uploaded_image', image_id=image.id) }}"
alt="{{ image.filename }}"
class="w-full h-48 object-cover"
/>