forked from DGNum/gestioCOF
df7594a105
Import in `ready` method of kfet app config of `kfet.forms` may be annoying because it starts executing `__init__` methods of fields. Causing failures if these methods does DB calls, as `ready` may be called before applying migrations.
15 lines
341 B
Python
15 lines
341 B
Python
# -*- coding: utf-8 -*-
|
|
from django.apps import AppConfig
|
|
|
|
|
|
class KFetConfig(AppConfig):
|
|
name = 'kfet'
|
|
verbose_name = "Application K-Fêt"
|
|
|
|
def ready(self):
|
|
self.register_config()
|
|
|
|
def register_config(self):
|
|
import djconfig
|
|
from .config import KFetConfigForm
|
|
djconfig.register(KFetConfigForm)
|