mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 02:36:02 +02:00
Remove load fixtures signal on migrate, add load command to docker compose, add DEBUG env check to load.py
This commit is contained in:
parent
7b8eee7b2f
commit
9ca424d30c
3 changed files with 10 additions and 15 deletions
|
@ -1,6 +1,5 @@
|
|||
import logging
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management import call_command
|
||||
from django.db.models.signals import post_save, post_migrate
|
||||
from django.dispatch import receiver
|
||||
|
@ -56,12 +55,3 @@ def handle_profile(sender, instance, **kwargs):
|
|||
f" Picking #{contacts[0].id} for User #{instance.id}."
|
||||
)
|
||||
|
||||
|
||||
@receiver(post_migrate)
|
||||
def handle_loaddata(**kwargs):
|
||||
"""Attempt to load test fixtures when in DEBUG mode."""
|
||||
if settings.DEBUG:
|
||||
try:
|
||||
call_command("load")
|
||||
except Exception as e:
|
||||
logger.warning(e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue