kpsul/kfet/apps.py
Aurélien Delobelle df7594a105 Move KFetConfigForm to kfet.config
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.
2017-10-12 13:53:48 +02:00

16 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)