fix: cfp app config was not loaded
This commit is contained in:
parent
323fb74475
commit
8fb064ac8c
|
@ -0,0 +1 @@
|
|||
default_app_config = 'cfp.apps.CFPConfig'
|
|
@ -3,15 +3,17 @@ from django.dispatch import receiver
|
|||
from django.contrib.sites.models import Site
|
||||
from django.conf import settings
|
||||
|
||||
from ponyconf.decorators import disable_for_loaddata
|
||||
from .models import Conference
|
||||
|
||||
|
||||
@receiver(post_save, sender=Site, dispatch_uid="Create Conference for Site")
|
||||
@disable_for_loaddata
|
||||
def create_conference(sender, instance, **kwargs):
|
||||
Conference.objects.get_or_create(site=instance)
|
||||
conference, created = Conference.objects.get_or_create(site=instance)
|
||||
|
||||
|
||||
# connected in apps.py
|
||||
def call_first_site_post_save(apps, **kwargs):
|
||||
try:
|
||||
site = Site.objects.get(id=getattr(settings, 'SITE_ID', 1))
|
||||
|
|
Loading…
Reference in New Issue