Autoadmin: Incorporate the autoadmin app

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>
This commit is contained in:
Roberto Rosario
2018-12-07 03:09:59 -04:00
parent 28a1ecb685
commit 8039dfa30a
53 changed files with 2584 additions and 30 deletions
+29
View File
@@ -0,0 +1,29 @@
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from mayan.apps.smart_settings import Namespace
from .literals import DEFAULT_EMAIL, DEFAULT_PASSWORD, DEFAULT_USERNAME
namespace = Namespace(name='autoadmin', label=_('Auto administrator'))
setting_email = namespace.add_setting(
global_name='AUTOADMIN_EMAIL', default=DEFAULT_EMAIL,
help_text=_(
'Sets the email of the automatically created super user account.'
)
)
setting_password = namespace.add_setting(
global_name='AUTOADMIN_PASSWORD', default=DEFAULT_PASSWORD,
help_text=_(
'The password of the automatically created super user account. '
'If it is equal to None, the password is randomly generated.'
)
)
setting_username = namespace.add_setting(
global_name='AUTOADMIN_USERNAME', default=DEFAULT_USERNAME,
help_text=_(
'The username of the automatically created super user account.'
)
)