Installation app doesn't require signal processors anymore
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django import apps
|
||||
from django.db.models.signals import post_migrate
|
||||
from django.db.utils import DatabaseError
|
||||
from django.dispatch import receiver
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
@@ -15,18 +14,11 @@ from .links import link_menu_link, link_namespace_details, link_namespace_list
|
||||
from .models import Installation
|
||||
|
||||
|
||||
def create_installation_instance(sender, **kwargs):
|
||||
if kwargs.get('app') == 'installation':
|
||||
Installation.objects.get_or_create()
|
||||
|
||||
|
||||
class InstallationApp(apps.AppConfig):
|
||||
name = 'installation'
|
||||
verbose_name = _('Installation')
|
||||
|
||||
def ready(self):
|
||||
post_migrate.connect(create_installation_instance, dispatch_uid='create_installation_instance')
|
||||
|
||||
register_model_list_columns(PropertyNamespace, [
|
||||
{
|
||||
'name': _('Label'),
|
||||
|
||||
Reference in New Issue
Block a user