diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index 96bce55..6e8f76e 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/__pycache__/urls.cpython-311.pyc b/config/__pycache__/urls.cpython-311.pyc index 0b85e94..05127bd 100644 Binary files a/config/__pycache__/urls.cpython-311.pyc and b/config/__pycache__/urls.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index 291d043..b3db9aa 100644 --- a/config/settings.py +++ b/config/settings.py @@ -133,9 +133,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/5.2/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'pt-br' -TIME_ZONE = 'UTC' +TIME_ZONE = 'America/Sao_Paulo' USE_I18N = True @@ -180,3 +180,5 @@ if EMAIL_USE_SSL: # https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' +MEDIA_URL = 'media/' +MEDIA_ROOT = BASE_DIR / 'media' diff --git a/config/urls.py b/config/urls.py index bcfc074..cccd18f 100644 --- a/config/urls.py +++ b/config/urls.py @@ -27,3 +27,4 @@ urlpatterns = [ if settings.DEBUG: urlpatterns += static("/assets/", document_root=settings.BASE_DIR / "assets") urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) \ No newline at end of file diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392..f674c63 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..7ade31e 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..53aa62a 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..d95d966 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..037e470 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,17 @@ from django.contrib import admin +from .models import MockupProject, MockupResult -# Register your models here. +class MockupResultInline(admin.TabularInline): + model = MockupResult + extra = 0 + +@admin.register(MockupProject) +class MockupProjectAdmin(admin.ModelAdmin): + list_display = ('title', 'user', 'status', 'created_at') + list_filter = ('status', 'gender', 'body_type') + search_fields = ('title', 'user__username') + inlines = [MockupResultInline] + +@admin.register(MockupResult) +class MockupResultAdmin(admin.ModelAdmin): + list_display = ('project', 'view_type', 'created_at') \ No newline at end of file diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..2f490c0 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,53 @@ +# Generated by Django 5.2.7 on 2026-01-30 16:53 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='MockupProject', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=255, verbose_name='Título do Projeto')), + ('main_image', models.ImageField(upload_to='mockups/uploads/', verbose_name='Imagem Principal')), + ('complementary_image_1', models.ImageField(blank=True, null=True, upload_to='mockups/uploads/')), + ('complementary_image_2', models.ImageField(blank=True, null=True, upload_to='mockups/uploads/')), + ('gender', models.CharField(choices=[('M', 'Masculino'), ('F', 'Feminino'), ('N', 'Não-binário')], default='F', max_length=1, verbose_name='Gênero')), + ('skin_tone', models.CharField(choices=[('light', 'Claro'), ('medium', 'Médio'), ('dark', 'Escuro')], default='medium', max_length=20, verbose_name='Tom de Pele')), + ('age', models.IntegerField(default=25, verbose_name='Idade')), + ('body_type', models.CharField(choices=[('plus', 'Plus-size'), ('slim', 'Magro'), ('athletic', 'Atlético'), ('muscular', 'Musculoso')], default='athletic', max_length=20, verbose_name='Tipo de Corpo')), + ('format', models.CharField(choices=[('9:16', '9:16 (Vertical)'), ('16:9', '16:9 (Horizontal)')], default='9:16', max_length=5, verbose_name='Formato')), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('status', models.CharField(default='pending', max_length=20)), + ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': 'Projeto de Mockup', + 'verbose_name_plural': 'Projetos de Mockup', + }, + ), + migrations.CreateModel( + name='MockupResult', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('image', models.ImageField(upload_to='mockups/results/')), + ('view_type', models.CharField(max_length=10)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='results', to='core.mockupproject')), + ], + options={ + 'verbose_name': 'Resultado do Mockup', + 'verbose_name_plural': 'Resultados dos Mockups', + }, + ), + ] 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..792a6b0 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..ffd9ed5 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,56 @@ from django.db import models +from django.contrib.auth.models import User -# Create your models here. +class MockupProject(models.Model): + GENDER_CHOICES = [ + ('M', 'Masculino'), + ('F', 'Feminino'), + ('N', 'Não-binário'), + ] + SKIN_TONE_CHOICES = [ + ('light', 'Claro'), + ('medium', 'Médio'), + ('dark', 'Escuro'), + ] + BODY_TYPE_CHOICES = [ + ('plus', 'Plus-size'), + ('slim', 'Magro'), + ('athletic', 'Atlético'), + ('muscular', 'Musculoso'), + ] + FORMAT_CHOICES = [ + ('9:16', '9:16 (Vertical)'), + ('16:9', '16:9 (Horizontal)'), + ] + + user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) + title = models.CharField(max_length=255, verbose_name="Título do Projeto") + main_image = models.ImageField(upload_to='mockups/uploads/', verbose_name="Imagem Principal") + complementary_image_1 = models.ImageField(upload_to='mockups/uploads/', null=True, blank=True) + complementary_image_2 = models.ImageField(upload_to='mockups/uploads/', null=True, blank=True) + + gender = models.CharField(max_length=1, choices=GENDER_CHOICES, default='F', verbose_name="Gênero") + skin_tone = models.CharField(max_length=20, choices=SKIN_TONE_CHOICES, default='medium', verbose_name="Tom de Pele") + age = models.IntegerField(default=25, verbose_name="Idade") + body_type = models.CharField(max_length=20, choices=BODY_TYPE_CHOICES, default='athletic', verbose_name="Tipo de Corpo") + format = models.CharField(max_length=5, choices=FORMAT_CHOICES, default='9:16', verbose_name="Formato") + + created_at = models.DateTimeField(auto_now_add=True) + status = models.CharField(max_length=20, default='pending') + + class Meta: + verbose_name = "Projeto de Mockup" + verbose_name_plural = "Projetos de Mockup" + + def __str__(self): + return self.title + +class MockupResult(models.Model): + project = models.ForeignKey(MockupProject, on_delete=models.CASCADE, related_name='results') + image = models.ImageField(upload_to='mockups/results/') + view_type = models.CharField(max_length=10) # front, side, back + created_at = models.DateTimeField(auto_now_add=True) + + class Meta: + verbose_name = "Resultado do Mockup" + verbose_name_plural = "Resultados dos Mockups" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..197f43d 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,122 @@ - +
-Comece enviando sua primeira peça de roupa.
+ CRIAR MEU PRIMEIRO MOCKUP +Crie fotos profissionais para seu catálogo e redes sociais sem precisar de modelos ou estúdios caros. Tecnologia AI de alta fidelidade para o mercado brasileiro.
+Gerado por AI
+ Modelo: Feminino, 25 anos, Atlético +AppWizzy AI is collecting your requirements and applying the first changes.
-This page will refresh automatically as the plan is implemented.
-
- Runtime: Django {{ django_version }} · Python {{ python_version }}
- — UTC {{ current_time|date:"Y-m-d H:i:s" }}
-
Simples, rápido e ultra-realista.
+Suba as fotos das suas peças reais. Sem truques, apenas a sua criação.
+Escolha o modelo, idade, tom de pele e biotipo que melhor representa sua marca.
+Em minutos, receba 3 mockups (frente, lado e costas) prontos para uso em HD.
+Junte-se a centenas de marcas brasileiras que já usam FashionMock AI.
+ CRIAR MEU PRIMEIRO MOCKUP +Entre na sua conta FashionMock AI
+
+ Gênero: {{ project.get_gender_display }}
+ Tom de Pele: {{ project.get_skin_tone_display }}
+ Idade: {{ project.age }} anos
+ Biotipo: {{ project.get_body_type_display }}
+
Nossa AI está vestindo os modelos e ajustando a iluminação. Isso levará cerca de 60 segundos.
+