Observação: Clique em Salvar no editor Flatlogic p
This commit is contained in:
parent
48f72b9bfb
commit
a13d1c0105
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -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')
|
||||
|
||||
54
core/migrations/0001_initial.py
Normal file
54
core/migrations/0001_initial.py
Normal file
@ -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')),
|
||||
],
|
||||
),
|
||||
]
|
||||
18
core/migrations/0002_alter_pipelinestep_name.py
Normal file
18
core/migrations/0002_alter_pipelinestep_name.py
Normal file
@ -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),
|
||||
),
|
||||
]
|
||||
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
Binary file not shown.
@ -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()})"
|
||||
@ -1,25 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
||||
{% if project_description %}
|
||||
<meta name="description" content="{{ project_description }}">
|
||||
<meta property="og:description" content="{{ project_description }}">
|
||||
<meta property="twitter:description" content="{{ project_description }}">
|
||||
{% endif %}
|
||||
{% if project_image_url %}
|
||||
<meta property="og:image" content="{{ project_image_url }}">
|
||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||
{% endif %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
||||
{% block head %}{% endblock %}
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}CGI Studio{% endblock %}</title>
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@300;500;700;900&display=swap" rel="stylesheet">
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={% now 'U' %}">
|
||||
<style>
|
||||
:root {
|
||||
--accent-cyan: #00e5ff;
|
||||
--accent-purple: #7000ff;
|
||||
--bg-deep: #0a0a0c;
|
||||
}
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
background-color: var(--bg-deep);
|
||||
color: #f8f9fa;
|
||||
}
|
||||
h1, h2, h3, h4, .outfit {
|
||||
font-family: 'Outfit', sans-serif;
|
||||
}
|
||||
.navbar-brand {
|
||||
font-family: 'Outfit', sans-serif;
|
||||
font-weight: 900;
|
||||
letter-spacing: 1px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
{% block extra_head %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark studio-navbar sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{% url 'home' %}">
|
||||
<span class="text-cyan">CGI</span> STUDIO
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'home' %}">Command Center</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin/">Admin Panel</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer class="py-5 mt-5 border-top border-secondary border-opacity-10">
|
||||
<div class="container text-center">
|
||||
<p class="text-muted small">© 2026 CGI Virtual Studio. Powered by AI Pipeline.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -1,145 +1,181 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ project_name }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@keyframes bg-pan {
|
||||
0% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2.5rem 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
|
||||
font-weight: 700;
|
||||
margin: 0 0 1.2rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
.loader {
|
||||
margin: 1.5rem auto;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border: 4px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.runtime code {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
padding: 0.15rem 0.45rem;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.75;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% block title %}Command Center | Studio CGI Virtual{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your app…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
<section class="hero-section">
|
||||
<div class="container text-center">
|
||||
<div class="mb-4">
|
||||
<span class="badge bg-purple bg-opacity-10 text-purple px-3 py-2 rounded-pill small border border-purple border-opacity-25">NEXT-GEN CGI PIPELINE</span>
|
||||
</div>
|
||||
<h1 class="display-3 mb-4 outfit">Studio de Cinema <span class="text-cyan">Virtual</span></h1>
|
||||
<p class="lead text-muted mb-5 mx-auto" style="max-width: 800px;">
|
||||
A fábrica digital para super-produções. Gerencie do roteiro à renderização em um fluxo de produção rigoroso e colaborativo.
|
||||
</p>
|
||||
<div class="d-flex justify-content-center gap-3">
|
||||
<a href="#productions" class="btn btn-cyan">Acessar Produções</a>
|
||||
<a href="/admin/core/project/add/" class="btn btn-outline-light px-4 py-2 border-opacity-25 rounded-3">Nova Super-Produção +</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
|
||||
<p class="runtime">
|
||||
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
|
||||
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
|
||||
</footer>
|
||||
</section>
|
||||
|
||||
<section id="productions" class="py-5">
|
||||
<div class="container">
|
||||
<div class="row g-4 mb-5">
|
||||
<div class="col-md-4">
|
||||
<div class="stats-card">
|
||||
<span class="text-muted d-block mb-1 small text-uppercase fw-bold">Total de Projetos</span>
|
||||
<span class="display-5 fw-bold outfit">{{ total_projects }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="stats-card">
|
||||
<span class="text-muted d-block mb-1 small text-uppercase fw-bold">Produções Ativas</span>
|
||||
<span class="display-5 fw-bold outfit text-cyan">{{ active_productions }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="stats-card">
|
||||
<span class="text-muted d-block mb-1 small text-uppercase fw-bold">Obras Finalizadas</span>
|
||||
<span class="display-5 fw-bold outfit text-purple">{{ completed_projects }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-end mb-4">
|
||||
<div>
|
||||
<h2 class="h3 mb-0 outfit section-title">Produções em Andamento</h2>
|
||||
<p class="text-muted small">Status em tempo real do pipeline CGI</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-4">
|
||||
{% for project in projects %}
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="project-card">
|
||||
<div class="d-flex justify-content-between align-items-start mb-3">
|
||||
<span class="pipeline-badge badge-{{ project.status|lower }}">{{ project.get_status_display }}</span>
|
||||
<span class="text-muted small fw-bold">{{ project.get_project_type_display }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="h4 mb-3 outfit">
|
||||
<a href="{% url 'project_detail' project.slug %}" class="text-white text-decoration-none hover-cyan transition">
|
||||
{{ project.title }}
|
||||
</a>
|
||||
</h3>
|
||||
|
||||
<p class="text-muted small mb-4 flex-grow-1">
|
||||
{{ project.description|default:"Sem descrição definida para esta super-produção."|truncatewords:20 }}
|
||||
</p>
|
||||
|
||||
<div class="pipeline-summary mt-4">
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<span class="text-muted small fw-bold">Progresso do Pipeline</span>
|
||||
{% with last_step=project.steps.last %}
|
||||
<span class="text-cyan small fw-bold">{{ last_step.progress|default:0 }}%</span>
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="progress mb-3">
|
||||
{% with last_step=project.steps.last %}
|
||||
<div class="progress-bar" role="progressbar" style="width: {{ last_step.progress|default:0 }}%"></div>
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
<div class="d-flex flex-wrap gap-1 mt-3">
|
||||
{% for step in project.steps.all|slice:":4" %}
|
||||
<span class="badge {% if step.is_completed %}bg-cyan text-black{% else %}bg-secondary bg-opacity-10 text-muted border border-secondary border-opacity-25{% endif %} rounded-pill" style="font-size: 0.6rem;">
|
||||
{{ step.get_name_display }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
{% if project.steps.count > 4 %}
|
||||
<span class="text-muted small" style="font-size: 0.6rem;">+{{ project.steps.count|add:"-4" }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{% url 'project_detail' project.slug %}" class="stretched-link"></a>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-12 text-center py-5">
|
||||
<div class="opacity-25 mb-4">
|
||||
<svg width="80" height="80" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1">
|
||||
<path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path>
|
||||
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<h3 class="h4 outfit">Nenhuma produção ativa</h3>
|
||||
<p class="text-muted mb-4">Comece sua primeira super-produção 3D agora.</p>
|
||||
<a href="/admin/core/project/add/" class="btn btn-cyan">Iniciar Projeto</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="py-5 bg-white bg-opacity-05">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<h2 class="display-5 outfit mb-4">Pipeline <span class="text-purple">CGI Profissional</span></h2>
|
||||
<p class="text-muted mb-4">Nosso estúdio segue o fluxo de trabalho dos maiores estúdios de Hollywood, garantindo qualidade em cada quadro.</p>
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-6">
|
||||
<div class="p-3 border border-white border-opacity-10 rounded-3 h-100">
|
||||
<h4 class="h6 outfit text-cyan">Pré-produção</h4>
|
||||
<p class="small text-muted mb-0">Roteiro, Concept Art e Animatic para definir a alma do filme.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="p-3 border border-white border-opacity-10 rounded-3 h-100">
|
||||
<h4 class="h6 outfit text-cyan">Produção</h4>
|
||||
<p class="small text-muted mb-0">Modelagem, Rigging e Animação com personagens realistas.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="p-3 border border-white border-opacity-10 rounded-3 h-100">
|
||||
<h4 class="h6 outfit text-cyan">Iluminação & FX</h4>
|
||||
<p class="small text-muted mb-0">Simulação de partículas, fluidos e luzes cinematográficas.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="p-3 border border-white border-opacity-10 rounded-3 h-100">
|
||||
<h4 class="h6 outfit text-cyan">Pós-produção</h4>
|
||||
<p class="small text-muted mb-0">Renderização em render farm e composição final.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 mt-5 mt-lg-0">
|
||||
<div class="position-relative">
|
||||
<div class="bg-purple bg-opacity-20 position-absolute top-50 start-50 translate-middle rounded-circle blur-3xl" style="width: 300px; height: 300px;"></div>
|
||||
<div class="project-card p-5 position-relative z-1 border-opacity-10 shadow-lg">
|
||||
<div class="d-flex align-items-center mb-4">
|
||||
<div class="flex-shrink-0 me-3">
|
||||
<div class="bg-cyan rounded-circle" style="width: 12px; height: 12px;"></div>
|
||||
</div>
|
||||
<h4 class="h5 mb-0 outfit">Status da Render Farm</h4>
|
||||
</div>
|
||||
<div class="asset-list-item d-flex justify-content-between align-items-center mb-2">
|
||||
<span class="small text-muted">Nodes Ativos</span>
|
||||
<span class="small outfit fw-bold">128 / 128</span>
|
||||
</div>
|
||||
<div class="asset-list-item d-flex justify-content-between align-items-center mb-2">
|
||||
<span class="small text-muted">CPU Load</span>
|
||||
<span class="small outfit fw-bold">94%</span>
|
||||
</div>
|
||||
<div class="asset-list-item d-flex justify-content-between align-items-center mb-4">
|
||||
<span class="small text-muted">Tempo Estimado</span>
|
||||
<span class="small outfit fw-bold text-cyan">04:12:33</span>
|
||||
</div>
|
||||
<div class="progress" style="height: 4px;">
|
||||
<div class="progress-bar" style="width: 75%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
103
core/templates/core/project_detail.html
Normal file
103
core/templates/core/project_detail.html
Normal file
@ -0,0 +1,103 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ project.title }} | Pipeline Detail{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="hero-section py-5">
|
||||
<div class="container">
|
||||
<nav aria-label="breadcrumb" class="mb-4">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'home' %}" class="text-cyan text-decoration-none">Command Center</a></li>
|
||||
<li class="breadcrumb-item active text-muted" aria-current="page">{{ project.title }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-8">
|
||||
<span class="pipeline-badge badge-{{ project.status|lower }} mb-3 d-inline-block">{{ project.get_status_display }}</span>
|
||||
<h1 class="display-4 outfit mb-3">{{ project.title }}</h1>
|
||||
<p class="lead text-muted">{{ project.description }}</p>
|
||||
</div>
|
||||
<div class="col-lg-4 text-lg-end">
|
||||
<div class="stats-card bg-opacity-10 border-opacity-10">
|
||||
<span class="text-muted small text-uppercase d-block mb-1">Global Delivery</span>
|
||||
<span class="display-6 outfit fw-bold text-cyan">
|
||||
{% with last_step=project.steps.last %}{{ last_step.progress|default:0 }}{% endwith %}%
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="row g-5">
|
||||
<div class="col-lg-8">
|
||||
<h3 class="h4 outfit mb-4 section-title">CGI Production Pipeline</h3>
|
||||
|
||||
<div class="pipeline-flow">
|
||||
{% for step in steps %}
|
||||
<div class="project-card p-4 mb-3 border-opacity-10">
|
||||
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="bg-cyan bg-opacity-10 text-cyan rounded-circle d-flex align-items-center justify-content-center me-3" style="width: 32px; height: 32px; font-size: 0.8rem; font-weight: bold;">
|
||||
{{ forloop.counter }}
|
||||
</div>
|
||||
<h4 class="h6 mb-0 outfit">{{ step.get_name_display }}</h4>
|
||||
</div>
|
||||
{% if step.is_completed %}
|
||||
<span class="badge bg-cyan text-black rounded-pill">COMPLETO</span>
|
||||
{% else %}
|
||||
<span class="text-muted small">{{ step.progress }}%</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="progress" style="height: 4px;">
|
||||
<div class="progress-bar {% if step.is_completed %}bg-cyan{% endif %}" style="width: {{ step.progress }}%"></div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="text-center py-5 border border-dashed border-secondary border-opacity-25 rounded-4">
|
||||
<p class="text-muted">Pipeline não inicializado. Configure as etapas no Admin.</p>
|
||||
<a href="/admin/core/pipelinestep/add/?project={{ project.id }}" class="btn btn-sm btn-outline-cyan">Adicionar Etapa +</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-4">
|
||||
<div class="sticky-top" style="top: 100px;">
|
||||
<h3 class="h4 outfit mb-4 section-title">Assets Digitais</h3>
|
||||
<div class="assets-container">
|
||||
{% for asset in assets %}
|
||||
<div class="asset-list-item d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span class="d-block outfit fw-bold small">{{ asset.name }}</span>
|
||||
<span class="text-muted" style="font-size: 0.7rem;">{{ asset.get_asset_type_display }} • {{ asset.current_stage }}</span>
|
||||
</div>
|
||||
{% if asset.is_realistic %}
|
||||
<span class="badge bg-purple bg-opacity-10 text-purple border border-purple border-opacity-25" style="font-size: 0.6rem;">REALISTA</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% empty %}
|
||||
<p class="text-muted small">Nenhum asset (personagens/cenários) vinculado.</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="mt-5 p-4 bg-purple bg-opacity-05 rounded-4 border border-purple border-opacity-10">
|
||||
<h5 class="h6 outfit text-purple mb-3">Diretrizes de Qualidade</h5>
|
||||
<ul class="list-unstyled small text-muted">
|
||||
<li class="mb-2">✓ Topologia limpa para rigging</li>
|
||||
<li class="mb-2">✓ Texturas 4K/8K PBR</li>
|
||||
<li class="mb-2">✓ Iluminação física (PBR)</li>
|
||||
<li>✓ Renderização em EXR Multi-camada</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@ -1,7 +1,7 @@
|
||||
from django.urls import path
|
||||
|
||||
from .views import home
|
||||
from .views import home, project_detail
|
||||
|
||||
urlpatterns = [
|
||||
path("", home, name="home"),
|
||||
]
|
||||
path("project/<slug:slug>/", project_detail, name="project_detail"),
|
||||
]
|
||||
@ -2,24 +2,36 @@ import os
|
||||
import platform
|
||||
|
||||
from django import get_version as django_version
|
||||
from django.shortcuts import render
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from django.utils import timezone
|
||||
from .models import Project, PipelineStep, CgiAsset
|
||||
|
||||
|
||||
def home(request):
|
||||
"""Render the landing screen with loader and environment details."""
|
||||
host_name = request.get_host().lower()
|
||||
agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic"
|
||||
now = timezone.now()
|
||||
"""Render the CGI Studio Command Center."""
|
||||
projects = Project.objects.prefetch_related('steps').all()
|
||||
|
||||
# Simple statistics for the dashboard
|
||||
total_projects = projects.count()
|
||||
active_productions = projects.filter(status='PROD').count()
|
||||
completed_projects = projects.filter(status='DONE').count()
|
||||
|
||||
context = {
|
||||
"project_name": "New Style",
|
||||
"agent_brand": agent_brand,
|
||||
"django_version": django_version(),
|
||||
"python_version": platform.python_version(),
|
||||
"current_time": now,
|
||||
"host_name": host_name,
|
||||
"project_description": os.getenv("PROJECT_DESCRIPTION", ""),
|
||||
"project_image_url": os.getenv("PROJECT_IMAGE_URL", ""),
|
||||
"projects": projects,
|
||||
"total_projects": total_projects,
|
||||
"active_productions": active_productions,
|
||||
"completed_projects": completed_projects,
|
||||
"current_time": timezone.now(),
|
||||
}
|
||||
return render(request, "core/index.html", context)
|
||||
|
||||
def project_detail(request, slug):
|
||||
"""Render the detailed pipeline for a specific production."""
|
||||
project = get_object_or_404(Project.objects.prefetch_related('steps', 'assets'), slug=slug)
|
||||
|
||||
context = {
|
||||
"project": project,
|
||||
"steps": project.steps.all(),
|
||||
"assets": project.assets.all(),
|
||||
}
|
||||
return render(request, "core/project_detail.html", context)
|
||||
54
populate_demo.py
Normal file
54
populate_demo.py
Normal file
@ -0,0 +1,54 @@
|
||||
from core.models import Project, PipelineStep, CgiAsset
|
||||
|
||||
def run():
|
||||
# Clear existing data
|
||||
PipelineStep.objects.all().delete()
|
||||
CgiAsset.objects.all().delete()
|
||||
Project.objects.all().delete()
|
||||
|
||||
# Create a Movie Project
|
||||
p1 = Project.objects.create(
|
||||
title="O Último Guardião",
|
||||
project_type="MOVIE",
|
||||
status="PROD",
|
||||
description="Um épico de ficção científica sobre o último protetor de uma civilização esquecida. Foco em CGI fotorrealista e ambientes vastos."
|
||||
)
|
||||
|
||||
steps = [
|
||||
('SCRIPT', 100, True),
|
||||
('CONCEPT', 100, True),
|
||||
('ANIMATIC', 100, True),
|
||||
('MODELING', 85, False),
|
||||
('TEXTURING', 60, False),
|
||||
('RIGGING', 40, False),
|
||||
('ANIMATION', 20, False),
|
||||
('LIGHTING', 10, False),
|
||||
('FX', 5, False),
|
||||
]
|
||||
|
||||
for name, progress, completed in steps:
|
||||
PipelineStep.objects.create(
|
||||
project=p1,
|
||||
name=name,
|
||||
progress=progress,
|
||||
is_completed=completed
|
||||
)
|
||||
|
||||
CgiAsset.objects.create(project=p1, name="Kaelen (Herói)", asset_type="CHAR", is_realistic=True, current_stage="Rigging")
|
||||
CgiAsset.objects.create(project=p1, name="Cidade Flutuante", asset_type="ENV", is_realistic=True, current_stage="Texturing")
|
||||
|
||||
# Create a Series Project
|
||||
p2 = Project.objects.create(
|
||||
title="Crônicas de Cyber-Rio",
|
||||
project_type="SERIES",
|
||||
status="PRE",
|
||||
description="Série de animação estilizada ambientada em um Rio de Janeiro futurista. Mistura de 2D e 3D."
|
||||
)
|
||||
|
||||
PipelineStep.objects.create(project=p2, name="SCRIPT", progress=100, is_completed=True)
|
||||
PipelineStep.objects.create(project=p2, name="CONCEPT", progress=40, is_completed=False)
|
||||
|
||||
print("Demo data created successfully!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
@ -1,4 +1,116 @@
|
||||
/* Custom styles for the application */
|
||||
body {
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
/* CGI Studio Custom Styling */
|
||||
:root {
|
||||
--bg-deep: #0a0a0c;
|
||||
--bg-card: #141417;
|
||||
--accent-cyan: #00e5ff;
|
||||
--accent-purple: #7000ff;
|
||||
--text-muted: #888891;
|
||||
--glass-bg: rgba(10, 10, 12, 0.8);
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--bg-deep);
|
||||
color: #f8f9fa;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.text-cyan { color: var(--accent-cyan); }
|
||||
.text-purple { color: var(--accent-purple); }
|
||||
|
||||
.studio-navbar {
|
||||
background: var(--glass-bg);
|
||||
backdrop-filter: blur(20px);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.hero-section {
|
||||
padding: 140px 0 100px;
|
||||
background:
|
||||
radial-gradient(circle at 10% 20%, rgba(0, 229, 255, 0.05) 0%, transparent 40%),
|
||||
radial-gradient(circle at 90% 80%, rgba(112, 0, 255, 0.05) 0%, transparent 40%);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.display-3 {
|
||||
font-weight: 800;
|
||||
letter-spacing: -2px;
|
||||
}
|
||||
|
||||
.btn-cyan {
|
||||
background: var(--accent-cyan);
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
border: none;
|
||||
padding: 14px 32px;
|
||||
border-radius: 12px;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.9rem;
|
||||
letter-spacing: 0.5px;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.btn-cyan:hover {
|
||||
background: #4df1ff;
|
||||
box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
|
||||
transform: translateY(-2px);
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.project-card {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
border-radius: 24px;
|
||||
padding: 32px;
|
||||
transition: all 0.4s ease;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.project-card:hover {
|
||||
border-color: rgba(0, 229, 255, 0.3);
|
||||
background: #1a1a1f;
|
||||
transform: translateY(-8px);
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.stats-card {
|
||||
background: rgba(255, 255, 255, 0.02);
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
padding: 28px;
|
||||
border-radius: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pipeline-badge {
|
||||
padding: 6px 14px;
|
||||
border-radius: 30px;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.badge-pre { background: rgba(136, 136, 145, 0.1); color: #888891; border: 1px solid rgba(136, 136, 145, 0.2); }
|
||||
.badge-prod { background: rgba(112, 0, 255, 0.1); color: #b780ff; border: 1px solid rgba(112, 0, 255, 0.2); }
|
||||
.badge-post { background: rgba(0, 229, 255, 0.1); color: #00e5ff; border: 1px solid rgba(0, 229, 255, 0.2); }
|
||||
.badge-done { background: rgba(0, 255, 149, 0.1); color: #00ff95; border: 1px solid rgba(0, 255, 149, 0.2); }
|
||||
|
||||
.progress {
|
||||
height: 8px;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-weight: 800;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user