diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392..e2fd994 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index e061640..69a6b19 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 5a69659..f74125d 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 2a36fd6..500c278 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index 8c38f3f..d081776 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,28 @@ from django.contrib import admin +from .models import Project, PipelineStep, CgiAsset -# Register your models here. +class PipelineStepInline(admin.TabularInline): + model = PipelineStep + extra = 1 + +class CgiAssetInline(admin.TabularInline): + model = CgiAsset + extra = 1 + +@admin.register(Project) +class ProjectAdmin(admin.ModelAdmin): + list_display = ('title', 'project_type', 'status', 'created_at') + list_filter = ('project_type', 'status') + search_fields = ('title', 'description') + prepopulated_fields = {'slug': ('title',)} + inlines = [PipelineStepInline, CgiAssetInline] + +@admin.register(PipelineStep) +class PipelineStepAdmin(admin.ModelAdmin): + list_display = ('project', 'name', 'progress', 'is_completed') + list_filter = ('name', 'is_completed') + +@admin.register(CgiAsset) +class CgiAssetAdmin(admin.ModelAdmin): + list_display = ('name', 'project', 'asset_type', 'is_realistic') + list_filter = ('asset_type', 'is_realistic') diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..017933c --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,54 @@ +# Generated by Django 5.2.7 on 2026-02-16 00:18 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=255)), + ('slug', models.SlugField(blank=True, unique=True)), + ('project_type', models.CharField(choices=[('MOVIE', 'Feature Film'), ('SERIES', 'TV Series'), ('SHORT', 'Short Film')], default='MOVIE', max_length=10)), + ('status', models.CharField(choices=[('PRE', 'Pre-Production'), ('PROD', 'Production'), ('POST', 'Post-Production'), ('DONE', 'Completed')], default='PRE', max_length=10)), + ('description', models.TextField(blank=True)), + ('thumbnail_url', models.URLField(blank=True, help_text='URL to a representative image')), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='PipelineStep', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(choices=[('CONCEPT', 'Concept & Storyboard'), ('MODELING', '3D Modeling'), ('RIGGING', 'Rigging'), ('ANIMATION', 'Animation'), ('LIGHTING', 'Lighting & FX'), ('RENDERING', 'Rendering'), ('COMPOSITING', 'Compositing')], max_length=20)), + ('progress', models.PositiveIntegerField(default=0, help_text='Progress from 0 to 100')), + ('is_completed', models.BooleanField(default=False)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='steps', to='core.project')), + ], + options={ + 'ordering': ['id'], + }, + ), + migrations.CreateModel( + name='CgiAsset', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('asset_type', models.CharField(choices=[('CHAR', 'Character'), ('PROP', 'Prop'), ('ENV', 'Environment')], max_length=10)), + ('is_realistic', models.BooleanField(default=True)), + ('current_stage', models.CharField(default='Modeling', max_length=100)), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assets', to='core.project')), + ], + ), + ] diff --git a/core/migrations/0002_alter_pipelinestep_name.py b/core/migrations/0002_alter_pipelinestep_name.py new file mode 100644 index 0000000..149bab4 --- /dev/null +++ b/core/migrations/0002_alter_pipelinestep_name.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.7 on 2026-02-16 00:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='pipelinestep', + name='name', + field=models.CharField(choices=[('SCRIPT', 'Roteiro & Storyboard'), ('CONCEPT', 'Concept Art'), ('ANIMATIC', 'Animatic'), ('MODELING', 'Modelagem 3D'), ('TEXTURING', 'Texturização'), ('RIGGING', 'Rigging'), ('ANIMATION', 'Animação'), ('LIGHTING', 'Iluminação'), ('FX', 'Simulação (FX)'), ('RENDERING', 'Renderização'), ('COMPOSITING', 'Composição'), ('EDITING', 'Edição & Sonoplastia')], max_length=20), + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..24d0cb5 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/migrations/__pycache__/0002_alter_pipelinestep_name.cpython-311.pyc b/core/migrations/__pycache__/0002_alter_pipelinestep_name.cpython-311.pyc new file mode 100644 index 0000000..9da1ddb Binary files /dev/null and b/core/migrations/__pycache__/0002_alter_pipelinestep_name.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..9b7a9e0 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,77 @@ from django.db import models +from django.utils.text import slugify -# Create your models here. +class Project(models.Model): + TYPES = ( + ('MOVIE', 'Feature Film'), + ('SERIES', 'TV Series'), + ('SHORT', 'Short Film'), + ) + STATUS_CHOICES = ( + ('PRE', 'Pre-Production'), + ('PROD', 'Production'), + ('POST', 'Post-Production'), + ('DONE', 'Completed'), + ) + + title = models.CharField(max_length=255) + slug = models.SlugField(unique=True, blank=True) + project_type = models.CharField(max_length=10, choices=TYPES, default='MOVIE') + status = models.CharField(max_length=10, choices=STATUS_CHOICES, default='PRE') + description = models.TextField(blank=True) + thumbnail_url = models.URLField(blank=True, help_text="URL to a representative image") + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + def save(self, *args, **kwargs): + if not self.slug: + self.slug = slugify(self.title) + super().save(*args, **kwargs) + + def __str__(self): + return self.title + +class PipelineStep(models.Model): + STAGES = ( + # Pre-Production + ('SCRIPT', 'Roteiro & Storyboard'), + ('CONCEPT', 'Concept Art'), + ('ANIMATIC', 'Animatic'), + # Production + ('MODELING', 'Modelagem 3D'), + ('TEXTURING', 'Texturização'), + ('RIGGING', 'Rigging'), + ('ANIMATION', 'Animação'), + ('LIGHTING', 'Iluminação'), + ('FX', 'Simulação (FX)'), + # Post-Production + ('RENDERING', 'Renderização'), + ('COMPOSITING', 'Composição'), + ('EDITING', 'Edição & Sonoplastia'), + ) + project = models.ForeignKey(Project, related_name='steps', on_delete=models.CASCADE) + name = models.CharField(max_length=20, choices=STAGES) + progress = models.PositiveIntegerField(default=0, help_text="Progress from 0 to 100") + is_completed = models.BooleanField(default=False) + updated_at = models.DateTimeField(auto_now=True) + + class Meta: + ordering = ['id'] + + def __str__(self): + return f"{self.project.title} - {self.get_name_display()}" + +class CgiAsset(models.Model): + ASSET_TYPES = ( + ('CHAR', 'Character'), + ('PROP', 'Prop'), + ('ENV', 'Environment'), + ) + project = models.ForeignKey(Project, related_name='assets', on_delete=models.CASCADE) + name = models.CharField(max_length=255) + asset_type = models.CharField(max_length=10, choices=ASSET_TYPES) + is_realistic = models.BooleanField(default=True) + current_stage = models.CharField(max_length=100, default='Modeling') + + def __str__(self): + return f"{self.name} ({self.get_asset_type_display()})" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..a656bcd 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,74 @@ -
- -