Initial commit
This commit is contained in:
25
env/lib/python3.10/site-packages/wagtail/migrations/0054_initial_locale.py
vendored
Normal file
25
env/lib/python3.10/site-packages/wagtail/migrations/0054_initial_locale.py
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generated by Django 2.2.10 on 2020-07-13 10:13
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations
|
||||
|
||||
from wagtail.coreutils import get_supported_content_language_variant
|
||||
|
||||
|
||||
def initial_locale(apps, schema_editor):
|
||||
Locale = apps.get_model("wagtailcore.Locale")
|
||||
|
||||
Locale.objects.create(
|
||||
language_code=get_supported_content_language_variant(settings.LANGUAGE_CODE),
|
||||
)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("wagtailcore", "0053_locale_model"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(initial_locale, migrations.RunPython.noop),
|
||||
]
|
||||
Reference in New Issue
Block a user