diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 8c4b496..3efa90c 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/pexels.cpython-311.pyc b/core/__pycache__/pexels.cpython-311.pyc new file mode 100644 index 0000000..c9dbc46 Binary files /dev/null and b/core/__pycache__/pexels.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index fbac9b4..b7cf384 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 984f4c3..ddf0125 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/migrations/0005_project_duration_project_estimated_budget_and_more.py b/core/migrations/0005_project_duration_project_estimated_budget_and_more.py new file mode 100644 index 0000000..087e4a8 --- /dev/null +++ b/core/migrations/0005_project_duration_project_estimated_budget_and_more.py @@ -0,0 +1,33 @@ +# Generated by Django 5.2.7 on 2026-02-16 02:12 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0004_cgiasset_physical_description_project_category_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='project', + name='duration', + field=models.CharField(blank=True, default='120 min', max_length=50), + ), + migrations.AddField( + model_name='project', + name='estimated_budget', + field=models.CharField(blank=True, default='$150M', max_length=100), + ), + migrations.AddField( + model_name='project', + name='rating', + field=models.CharField(default='PG-13', max_length=10), + ), + migrations.AddField( + model_name='scene', + name='image_url', + field=models.CharField(blank=True, max_length=500), + ), + ] diff --git a/core/migrations/__pycache__/0005_project_duration_project_estimated_budget_and_more.cpython-311.pyc b/core/migrations/__pycache__/0005_project_duration_project_estimated_budget_and_more.cpython-311.pyc new file mode 100644 index 0000000..072b818 Binary files /dev/null and b/core/migrations/__pycache__/0005_project_duration_project_estimated_budget_and_more.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index b24f06b..9a958fb 100644 --- a/core/models.py +++ b/core/models.py @@ -42,6 +42,11 @@ class Project(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) is_ai_generated = models.BooleanField(default=False) + + # New fields for "Super Production" + estimated_budget = models.CharField(max_length=100, blank=True, default="$150M") + rating = models.CharField(max_length=10, default="PG-13") + duration = models.CharField(max_length=50, blank=True, default="120 min") def save(self, *args, **kwargs): if not self.slug: @@ -66,6 +71,7 @@ class Scene(models.Model): title = models.CharField(max_length=255) description = models.TextField() visual_prompt = models.TextField(blank=True) + image_url = models.CharField(max_length=500, blank=True) class Meta: ordering = ['number'] @@ -120,4 +126,4 @@ class CgiAsset(models.Model): assigned_artist = models.CharField(max_length=100, blank=True) def __str__(self): - return f"{self.name} ({self.get_asset_type_display()})" \ No newline at end of file + return f"{self.name} ({self.get_asset_type_display()})" diff --git a/core/pexels.py b/core/pexels.py new file mode 100644 index 0000000..3be1c33 --- /dev/null +++ b/core/pexels.py @@ -0,0 +1,42 @@ +import os +import requests +from pathlib import Path + +API_KEY = os.getenv("PEXELS_KEY", "Vc99rnmOhHhJAbgGQoKLZtsaIVfkeownoQNbTj78VemUjKh08ZYRbf18") +CACHE_DIR = Path("static/images/pexels") + +def fetch_first(query: str, orientation: str = "landscape") -> dict | None: + if not API_KEY: + return None + + headers = {"Authorization": API_KEY} + url = "https://api.pexels.com/v1/search" + params = {"query": query, "orientation": orientation, "per_page": 1, "page": 1} + + try: + resp = requests.get(url, headers=headers, params=params, timeout=15) + resp.raise_for_status() + data = resp.json() + + photo = (data.get("photos") or [None])[0] + if not photo: + return None + + src = photo["src"].get("large2x") or photo["src"].get("large") or photo["src"].get("original") + CACHE_DIR.mkdir(parents=True, exist_ok=True) + target = CACHE_DIR / f"{photo['id']}.jpg" + + if src: + img_resp = requests.get(src, timeout=15) + img_resp.raise_for_status() + target.write_bytes(img_resp.content) + + return { + "id": photo["id"], + "local_path": f"images/pexels/{photo['id']}.jpg", + "photographer": photo.get("photographer"), + "photographer_url": photo.get("photographer_url"), + } + except Exception as e: + print(f"Error fetching from Pexels: {e}") + return None diff --git a/core/templates/base.html b/core/templates/base.html index e035667..5d2a961 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -49,6 +49,41 @@ .shadow-neon { box-shadow: 0 0 15px rgba(0, 229, 255, 0.2); } + .text-gradient-neon { + background: linear-gradient(45deg, var(--electric-cyan), var(--neon-purple)); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } + .btn-neon-purple { + background: var(--neon-purple); + color: white; + border: none; + box-shadow: 0 0 15px rgba(112, 0, 255, 0.3); + transition: all 0.3s ease; + } + .btn-neon-purple:hover { + background: #8221ff; + color: white; + box-shadow: 0 0 25px rgba(112, 0, 255, 0.5); + transform: scale(1.05); + } + .btn-outline-cyan { + border: 2px solid var(--electric-cyan); + color: var(--electric-cyan); + background: transparent; + transition: all 0.3s ease; + } + .btn-outline-cyan:hover { + background: var(--electric-cyan); + color: var(--bg-deep); + box-shadow: 0 0 20px rgba(0, 229, 255, 0.4); + } + .glass-card { + background: rgba(255, 255, 255, 0.05); + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 1.5rem; + } {% block extra_head %}{% endblock %} @@ -67,10 +102,13 @@ Command Center