cmsintegrate management command
This commit is contained in:
parent
8fc605f5b5
commit
2b27d56e54
1 changed files with 13 additions and 0 deletions
13
datacenterlight/management/commands/cmsintegrate.py
Normal file
13
datacenterlight/management/commands/cmsintegrate.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from django.core.management.base import BaseCommand
|
||||
from datacenterlight.cms_models import CMSIntegration
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = '''Creates cms integration objects for datacenterlight'''
|
||||
|
||||
def handle(self, *args, **options):
|
||||
obj, created = CMSIntegration.objects.get_or_create(name='default')
|
||||
if created:
|
||||
print('created the default CMSIntegration object')
|
||||
else:
|
||||
print('default CMSIntegration object already exists')
|
Loading…
Reference in a new issue