Refactor fixtures from JSON to Python

This commit is contained in:
Seamus Johnston 2022-12-21 10:05:03 -06:00
parent ba7c0b9e8d
commit df265b10f8
No known key found for this signature in database
GPG key ID: 2F21225985069105
10 changed files with 426 additions and 270 deletions

View file

@ -0,0 +1,18 @@
import logging
from django.core.management.base import BaseCommand
from auditlog.context import disable_auditlog # type: ignore
from registrar.fixtures import UserFixture, DomainApplicationFixture
logger = logging.getLogger(__name__)
class Command(BaseCommand):
def handle(self, *args, **options):
# django-auditlog has some bugs with fixtures
# https://github.com/jazzband/django-auditlog/issues/17
with disable_auditlog():
UserFixture.load()
DomainApplicationFixture.load()
logger.info("All fixtures loaded.")