Incorporate the external django-autoadmin app as a core app and convert it into a Mayan app. This change adds the new settings: "COMMON_AUTOADMIN_EMAIL", "AUTOADMIN_PASSWORD", and "AUTOADMIN_USERNAME". Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
13 lines
338 B
Python
13 lines
338 B
Python
from __future__ import unicode_literals
|
|
|
|
from django.core.management.base import BaseCommand
|
|
|
|
from ...models import AutoAdminSingleton
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Used to create a superuser with a secure and automatic password.'
|
|
|
|
def handle(self, *args, **options):
|
|
AutoAdminSingleton.objects.create_autoadmin()
|