PEP8 and code style cleanups.

This commit is contained in:
Roberto Rosario
2016-06-30 21:30:01 -04:00
parent aa56e8ae14
commit b6161e9d92
36 changed files with 38 additions and 84 deletions

View File

@@ -12,9 +12,15 @@ class Command(management.BaseCommand):
def handle(self, *args, **options):
management.call_command('createsettings', interactive=False)
try:
result = management.call_command('migrate', interactive=False)
except OperationalError as exception:
self.stderr.write(self.style.NOTICE('Unable to migrate the database. The initialsetup command is to be used only on new installations. To upgrade existing installations use the performupgrade command.'))
management.call_command('migrate', interactive=False)
except OperationalError:
self.stderr.write(
self.style.NOTICE(
'Unable to migrate the database. The initialsetup command '
'is to be used only on new installations. To upgrade '
'existing installations use the performupgrade command.'
)
)
raise
management.call_command('createautoadmin', interactive=False)
management.call_command('createorganizationadmin', interactive=False)