2023-02-02 10:06:23 -05:00
|
|
|
from django.apps import AppConfig
|
2023-08-31 13:05:04 -04:00
|
|
|
from django.db import models
|
|
|
|
from django.db.migrations.operations import AlterModelOptions
|
|
|
|
|
|
|
|
from utilities.migration import custom_deconstruct
|
|
|
|
|
|
|
|
# Ignore verbose_name & verbose_name_plural Meta options when calculating model migrations
|
|
|
|
AlterModelOptions.ALTER_OPTION_KEYS.remove('verbose_name')
|
|
|
|
AlterModelOptions.ALTER_OPTION_KEYS.remove('verbose_name_plural')
|
|
|
|
|
|
|
|
# Use our custom destructor to ignore certain attributes when calculating field migrations
|
|
|
|
models.Field.deconstruct = custom_deconstruct
|
2023-02-02 10:06:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
class CoreConfig(AppConfig):
|
|
|
|
name = "core"
|
|
|
|
|
|
|
|
def ready(self):
|
|
|
|
from . import data_backends, search
|
2023-03-30 11:32:59 -07:00
|
|
|
from core.api import schema # noqa: E402
|