This commit is contained in:
IGNY8 VPS (Salman)
2026-01-12 09:42:31 +00:00
parent e9f02f5e9f
commit a3e75e654e
2 changed files with 30 additions and 37 deletions

View File

@@ -5,6 +5,7 @@ from django import forms
from django.contrib import admin, messages from django.contrib import admin, messages
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from unfold.admin import ModelAdmin, TabularInline from unfold.admin import ModelAdmin, TabularInline
from unfold.contrib.filters.admin import ChoicesDropdownFilter, RelatedDropdownFilter
from simple_history.admin import SimpleHistoryAdmin from simple_history.admin import SimpleHistoryAdmin
from igny8_core.admin.base import AccountAdminMixin, Igny8ModelAdmin from igny8_core.admin.base import AccountAdminMixin, Igny8ModelAdmin
from .models import User, Account, Plan, Subscription, Site, Sector, SiteUserAccess, Industry, IndustrySector, SeedKeyword, PasswordResetToken from .models import User, Account, Plan, Subscription, Site, Sector, SiteUserAccess, Industry, IndustrySector, SeedKeyword, PasswordResetToken

View File

@@ -10,42 +10,34 @@ class Migration(migrations.Migration):
] ]
operations = [ operations = [
# Declare the fields in Django schema so migrations can use them # Add the fields to the database
# These fields already exist in DB, so state_operations syncs Django's understanding migrations.AddField(
migrations.SeparateDatabaseAndState( model_name='aimodelconfig',
state_operations=[ name='landscape_size',
migrations.AddField( field=models.CharField(
model_name='aimodelconfig', blank=True,
name='landscape_size', help_text="Landscape image size for this model (e.g., '1792x1024', '1280x768')",
field=models.CharField( max_length=20,
blank=True, null=True,
help_text="Landscape image size for this model (e.g., '1792x1024', '1280x768')", ),
max_length=20, ),
null=True, migrations.AddField(
), model_name='aimodelconfig',
), name='square_size',
migrations.AddField( field=models.CharField(
model_name='aimodelconfig', blank=True,
name='square_size', default='1024x1024',
field=models.CharField( help_text="Square image size for this model (e.g., '1024x1024')",
blank=True, max_length=20,
default='1024x1024', ),
help_text="Square image size for this model (e.g., '1024x1024')", ),
max_length=20, migrations.AddField(
), model_name='aimodelconfig',
), name='valid_sizes',
migrations.AddField( field=models.JSONField(
model_name='aimodelconfig', blank=True,
name='valid_sizes', default=list,
field=models.JSONField( help_text="List of valid sizes for this model (e.g., ['1024x1024', '1792x1024'])",
blank=True, ),
default=list,
help_text="List of valid sizes for this model (e.g., ['1024x1024', '1792x1024'])",
),
),
],
database_operations=[
# No DB operations - fields already exist via direct SQL
],
), ),
] ]