change: add new model and fix migrations
This commit is contained in:
@@ -72,4 +72,9 @@ class ContactUsAdmin(admin.ModelAdmin):
|
||||
|
||||
@admin.register(models.News)
|
||||
class NewsAdmin(TranslationAdmin):
|
||||
list_display = ['title', 'text', 'image']
|
||||
list_display = ['title', 'text', 'image']
|
||||
|
||||
|
||||
@admin.register(models.Country)
|
||||
class CountryAdmin(admin.ModelAdmin):
|
||||
list_display = ['name']
|
||||
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 5.2 on 2025-08-26 12:25
|
||||
# Generated by Django 5.2 on 2025-08-27 15:49
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
@@ -46,6 +46,19 @@ class Migration(migrations.Migration):
|
||||
'verbose_name_plural': 'bannerlar',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Country',
|
||||
fields=[
|
||||
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||||
('created_at', models.DateField(auto_now_add=True)),
|
||||
('updated_at', models.DateField(auto_now=True)),
|
||||
('name', models.CharField(max_length=200)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Davlat',
|
||||
'verbose_name_plural': 'Davlatlar',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='News',
|
||||
fields=[
|
||||
@@ -85,11 +98,12 @@ class Migration(migrations.Migration):
|
||||
('image', models.ImageField(upload_to='service/images/')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
'verbose_name': 'Xizmatlar',
|
||||
'verbose_name_plural': 'Xizmatlarimiz',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SiteConfir',
|
||||
name='SiteConfig',
|
||||
fields=[
|
||||
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||||
('created_at', models.DateField(auto_now_add=True)),
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Generated by Django 5.2 on 2025-08-26 12:26
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('common', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameModel(
|
||||
old_name='SiteConfir',
|
||||
new_name='SiteConfig',
|
||||
),
|
||||
]
|
||||
@@ -1,17 +0,0 @@
|
||||
# Generated by Django 5.2 on 2025-08-26 14:00
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('common', '0002_rename_siteconfir_siteconfig'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='service',
|
||||
options={'verbose_name': 'Xizmatlar', 'verbose_name_plural': 'Xizmatlarimiz'},
|
||||
),
|
||||
]
|
||||
@@ -1,27 +0,0 @@
|
||||
# Generated by Django 5.2 on 2025-08-27 15:43
|
||||
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('common', '0003_alter_service_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Country',
|
||||
fields=[
|
||||
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||||
('created_at', models.DateField(auto_now_add=True)),
|
||||
('updated_at', models.DateField(auto_now=True)),
|
||||
('name', models.CharField(max_length=200)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Davlat',
|
||||
'verbose_name_plural': 'Davlatlar',
|
||||
},
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user