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
+23
View File
@@ -0,0 +1,23 @@
from __future__ import unicode_literals
from django.conf import settings
from django.db.models.signals import post_save
from django.utils.translation import ugettext_lazy as _
from mayan.apps.common import MayanAppConfig
from .handlers import handler_auto_admin_account_password_change
class AutoAdminAppConfig(MayanAppConfig):
has_tests = True
name = 'mayan.apps.autoadmin'
verbose_name = _('Auto administrator')
def ready(self):
super(AutoAdminAppConfig, self).ready()
post_save.connect(
dispatch_uid='auto_admin_account_password_change',
receiver=handler_auto_admin_account_password_change,
sender=settings.AUTH_USER_MODEL
)