Remove autoadmin code and move it to the external django-autoadmin package
This commit is contained in:
@@ -10,7 +10,8 @@ from django.utils.crypto import get_random_string
|
||||
class Command(management.BaseCommand):
|
||||
help = 'Gets Mayan EDMS ready to be used (initializes database, creates a secret key, etc).'
|
||||
|
||||
def _generate_secret_key(self):
|
||||
@staticmethod
|
||||
def _generate_secret_key():
|
||||
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
|
||||
return get_random_string(50, chars)
|
||||
|
||||
@@ -26,7 +27,8 @@ class Command(management.BaseCommand):
|
||||
'',
|
||||
'from .base import *',
|
||||
'',
|
||||
"SECRET_KEY = '{0}'".format(self._generate_secret_key()),
|
||||
"SECRET_KEY = '{0}'".format(Command._generate_secret_key()),
|
||||
'',
|
||||
]))
|
||||
management.call_command('syncdb', migrate=True, interactive=False)
|
||||
management.call_command('migrate', interactive=False)
|
||||
management.call_command('createautoadmin', interactive=False)
|
||||
|
||||
Reference in New Issue
Block a user