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.auth.admin import UserAdmin as BaseUserAdmin
from unfold.admin import ModelAdmin, TabularInline
from unfold.contrib.filters.admin import ChoicesDropdownFilter, RelatedDropdownFilter
from simple_history.admin import SimpleHistoryAdmin
from igny8_core.admin.base import AccountAdminMixin, Igny8ModelAdmin
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 = [
# Declare the fields in Django schema so migrations can use them
# These fields already exist in DB, so state_operations syncs Django's understanding
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.AddField(
model_name='aimodelconfig',
name='landscape_size',
field=models.CharField(
blank=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',
field=models.CharField(
blank=True,
default='1024x1024',
help_text="Square image size for this model (e.g., '1024x1024')",
max_length=20,
),
),
migrations.AddField(
model_name='aimodelconfig',
name='valid_sizes',
field=models.JSONField(
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
],
# Add the fields to the database
migrations.AddField(
model_name='aimodelconfig',
name='landscape_size',
field=models.CharField(
blank=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',
field=models.CharField(
blank=True,
default='1024x1024',
help_text="Square image size for this model (e.g., '1024x1024')",
max_length=20,
),
),
migrations.AddField(
model_name='aimodelconfig',
name='valid_sizes',
field=models.JSONField(
blank=True,
default=list,
help_text="List of valid sizes for this model (e.g., ['1024x1024', '1792x1024'])",
),
),
]