Merge branch 'features/explicit_app_paths' into versions/next

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-07 20:17:45 -04:00
705 changed files with 15620 additions and 2345 deletions

6
.isort.cfg Normal file
View File

@@ -0,0 +1,6 @@
[settings]
default_section = THIRDPARTY
known_first_party = mayan
known_django = django
multi_line_output = 5
sections = FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

View File

@@ -13,6 +13,12 @@ source_lang = en
source_file = mayan/apps/appearance/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.autoadmin-2-0]
file_filter = mayan/apps/autoadmin/locale/<lang>/LC_MESSAGES/django.po
source_lang = en
source_file = mayan/apps/autoadmin/locale/en/LC_MESSAGES/django.po
type = PO
[mayan-edms.authentication-2-0]
file_filter = mayan/apps/authentication/locale/<lang>/LC_MESSAGES/django.po
source_lang = en

View File

@@ -111,7 +111,61 @@
The maximum size of the document cache is controlled
by the new DOCUMENTS_CACHE_MAXIMUM_SIZE setting.
This setting defaults to 500 megabytes.
- Add support for post edit callbacks to settings. This
callback willl execute when a settings's value is changed.
- Switch to full app paths. Instead of inserting the path
of the apps into the Python app, the apps are now
referenced by their full import path. This avoid app name
clashes with external or native Python libraries.
Example: Mayan statistics app vs. Python new statistics library.
Every app reference is now prepended with 'mayan.apps'.
Existing config.yml files need to be updated manually.
- Added a colorized console log formatter. New log formatter
that colors the output depending on the log level of the
message. The default palette handles: INFO, SUCCESS, ERROR,
DEBUG and CRITICAL.
- Decreased the thumbnail fade-in duration. Reduce the
document thumbnail fadein animation length to speed up
display of resolved thumbnails. Seems to reduce browser
load in FireFox.
- Document stubs are now filtered from the search results.
- Replaced deprecated string_concat in preparation for an
eventual Django 2.x upgrade.
- Removed the converter's base64 image support as it was
no longer being used by any stock app.
- Removed the SIGNATURES_GPG_HOME settings. The GPG keys
are no longer stored in disk but in the database itself
making this setting obsolete. This changed happened
several versions ago and this removal doesn't affect
any code path.
- Added two new settings to the django_gpg app:
SIGNATURES_GPG_BACKEND and SIGNATURES_GPG_BACKEND_ARGUMENTS.
These settings allow changing the GPG backend that the
app will use.
- Removed the settings SIGNATURES_GPG_PATH. The path to the
GPG binary is now passed via the
SIGNATURES_GPG_BACKEND_ARGUMENTS.
- Renamed the setting ``SIGNATURES_STORAGE_BACKEND`` to
``DOCUMENT_SIGNATURES_STORAGE_BACKEND`` and the setting
``SIGNATURES_STORAGE_BACKEND_ARGUMENTS`` to
``DOCUMENT_SIGNATURES_STORAGE_BACKEND_ARGUMENTS``. This
change differentiates them from the setting from the
django_gpg app.
- Updated the django_gpg app to work with the latest
version of the python-gnupg package (0.4.3).
- Set sensible default path for binaries by detecting
the operating system.
- The HOME_VIEW setting is not a Django setting but a setting
from the common app. The HOME_VIEW has been moved to the
COMMON namespace and renamed to COMMON_HOME_VIEW.
- New link added to display the events of the current user.
- Incorporate the django-autoadmin app and convert it
into a Mayan app. With change adds the new settings:
"COMMON_AUTOADMIN_EMAIL", "AUTOADMIN_PASSWORD", and
"AUTOADMIN_USERNAME".
- Changed the use of the list/zip combinarion to generate
the full list of metadata lookup choices to a generator.
3.1.9 (2018-11-01)
==================
- Convert the furl instance to text to allow serializing it into

View File

@@ -9,13 +9,13 @@ import sh
APP_LIST = (
'acls', 'appearance', 'authentication', 'cabinets', 'checkouts', 'common',
'converter', 'django_gpg', 'document_comments', 'document_indexing',
'document_parsing', 'document_signatures', 'document_states', 'documents',
'dynamic_search', 'events', 'linking', 'lock_manager', 'mayan_statistics',
'mailer', 'metadata', 'mirroring', 'motd', 'navigation', 'ocr', 'permissions',
'rest_api', 'smart_settings', 'sources', 'storage', 'tags', 'task_manager',
'user_management'
'acls', 'appearance', 'authentication', 'autoadmin', 'cabinets',
'checkouts', 'common', 'converter', 'django_gpg', 'document_comments',
'document_indexing', 'document_parsing', 'document_signatures',
'document_states', 'documents', 'dynamic_search', 'events', 'linking',
'lock_manager', 'mayan_statistics', 'mailer', 'metadata', 'mirroring',
'motd', 'navigation', 'ocr', 'permissions', 'rest_api', 'smart_settings',
'sources', 'storage', 'tags', 'task_manager', 'user_management'
)
LANGUAGE_LIST = (

View File

@@ -9,10 +9,10 @@ Changes
* Improve index mirroring value clean up code to remove the spaces at the
starts and at the end of directories. Closes again GitLab issue #520
Thanks to TheOneValen @ for the report.
Thanks to @TheOneValen for the report.
* Improve index mirroring cache class to use the hash of the keys
instead of the literal keys. Avoid warning about invalid key
characters. Closes GitLab issue #518. Thanks to TheOneValen @ for the
characters. Closes GitLab issue #518. Thanks to @TheOneValen for the
report.
* Only render the Template API view for authenticated users.
Thanks rgarcia for the report.

View File

@@ -12,10 +12,10 @@ Changes
* Remove duplicate YAML loading of environment variables.
* Don't load development apps if they are already loaded.
* Make sure all key used as input for the cache key hash are
bytes and not unicode. GitLab issue #520. Thanks to TheOneValen
@TheOneValen for the report.
bytes and not unicode. GitLab issue #520. Thanks to @TheOneValen for
the report.
* Ignore document stub from the index mirror. GitLab issue
#520. Thanks to TheOneValen @TheOneValen for the report.
#520. Thanks to @TheOneValen for the report.
* Fix for the Docker image INSTALL_FLAG path. Thanks to
Mark Maglana @relaxdiego for the report and to Hamish Farroq @farroq_HAM
for the patch. GitLab issue #525.

View File

@@ -8,7 +8,8 @@ Changes
-------
* Convert the furl instance to text to allow serializing it into
JSON to be passed as arguments to the background task.
JSON and be passed as arguments to the background task. Fixes
metadata assignment issues when uploading new documents.
Removals
--------

View File

@@ -2,4 +2,4 @@ from __future__ import unicode_literals
from .classes import ModelPermission # NOQA
default_app_config = 'acls.apps.ACLsApp'
default_app_config = 'mayan.apps.acls.apps.ACLsApp'

View File

@@ -2,7 +2,6 @@ from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import get_object_or_404
from rest_framework import generics
from .models import AccessControlList

View File

@@ -2,16 +2,18 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig, menu_object, menu_sidebar
from navigation import SourceColumn
from mayan.apps.common import MayanAppConfig, menu_object, menu_sidebar
from mayan.apps.navigation import SourceColumn
from .links import link_acl_create, link_acl_delete, link_acl_permissions
class ACLsApp(MayanAppConfig):
app_namespace = 'acls'
app_url = 'acls'
has_rest_api = True
has_tests = True
name = 'acls'
name = 'mayan.apps.acls'
verbose_name = _('ACLs')
def ready(self):

View File

@@ -1,4 +1,4 @@
from __future__ import unicode_literals, absolute_import
from __future__ import absolute_import, unicode_literals
import logging

View File

@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
from appearance.classes import Icon
from mayan.apps.appearance.classes import Icon
icon_acl_list = Icon(driver_name='fontawesome', symbol='lock')
icon_acl_new = Icon(driver_name='fontawesome', symbol='plus')

View File

@@ -3,10 +3,10 @@ from __future__ import unicode_literals
from django.apps import apps
from django.utils.translation import ugettext_lazy as _
from navigation import Link
from mayan.apps.navigation import Link
from .icons import icon_acl_list, icon_acl_new
from .permissions import permission_acl_view, permission_acl_edit
from .permissions import permission_acl_edit, permission_acl_view
def get_kwargs_factory(variable_name):

View File

@@ -6,14 +6,15 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import PermissionDenied
from django.db import models
from django.db.models import Q
from django.utils.translation import ugettext, ugettext_lazy as _
from django.utils.translation import ugettext
from django.utils.translation import ugettext_lazy as _
from common.utils import return_attrib, return_related
from permissions import Permission
from permissions.models import StoredPermission
from mayan.apps.common.utils import return_attrib, return_related
from mayan.apps.permissions import Permission
from mayan.apps.permissions.models import StoredPermission
from .exceptions import PermissionNotValidForClass
from .classes import ModelPermission
from .exceptions import PermissionNotValidForClass
logger = logging.getLogger(__name__)

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.db import migrations, models
class Migration(migrations.Migration):

View File

@@ -8,7 +8,7 @@ from django.db import models
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from permissions.models import Role, StoredPermission
from mayan.apps.permissions.models import Role, StoredPermission
from .managers import AccessControlListManager

View File

@@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from permissions import PermissionNamespace
from mayan.apps.permissions import PermissionNamespace
namespace = PermissionNamespace('acls', _('Access control lists'))

View File

@@ -9,10 +9,12 @@ from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from rest_framework.reverse import reverse
from common.serializers import ContentTypeSerializer
from permissions import Permission
from permissions.models import Role, StoredPermission
from permissions.serializers import PermissionSerializer, RoleSerializer
from mayan.apps.common.serializers import ContentTypeSerializer
from mayan.apps.permissions import Permission
from mayan.apps.permissions.models import Role, StoredPermission
from mayan.apps.permissions.serializers import (
PermissionSerializer, RoleSerializer
)
from .models import AccessControlList

View File

@@ -2,8 +2,8 @@ from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from document_states.tests.test_actions import ActionTestCase
from documents.permissions import permission_document_view
from mayan.apps.document_states.tests.test_actions import ActionTestCase
from mayan.apps.documents.permissions import permission_document_view
from ..workflow_actions import GrantAccessAction, RevokeAccessAction

View File

@@ -5,10 +5,10 @@ from django.test import override_settings
from rest_framework import status
from documents.permissions import permission_document_view
from documents.tests import DocumentTestMixin
from permissions.tests.literals import TEST_ROLE_LABEL
from rest_api.tests import BaseAPITestCase
from mayan.apps.documents.permissions import permission_document_view
from mayan.apps.documents.tests import DocumentTestMixin
from mayan.apps.permissions.tests.literals import TEST_ROLE_LABEL
from mayan.apps.rest_api.tests import BaseAPITestCase
from ..models import AccessControlList
from ..permissions import permission_acl_view

View File

@@ -3,10 +3,10 @@ from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.urls import reverse
from documents.tests import GenericDocumentViewTestCase
from mayan.apps.documents.tests import GenericDocumentViewTestCase
from ..links import (
link_acl_delete, link_acl_list, link_acl_create, link_acl_permissions
link_acl_create, link_acl_delete, link_acl_list, link_acl_permissions
)
from ..models import AccessControlList
from ..permissions import permission_acl_edit, permission_acl_view

View File

@@ -3,12 +3,12 @@ from __future__ import absolute_import, unicode_literals
from django.core.exceptions import PermissionDenied
from django.test import override_settings
from common.tests import BaseTestCase
from documents.models import Document, DocumentType
from documents.permissions import permission_document_view
from documents.tests import (
TEST_SMALL_DOCUMENT_PATH, TEST_DOCUMENT_TYPE_LABEL,
TEST_DOCUMENT_TYPE_2_LABEL
from mayan.apps.common.tests import BaseTestCase
from mayan.apps.documents.models import Document, DocumentType
from mayan.apps.documents.permissions import permission_document_view
from mayan.apps.documents.tests import (
TEST_DOCUMENT_TYPE_2_LABEL, TEST_DOCUMENT_TYPE_LABEL,
TEST_SMALL_DOCUMENT_PATH
)
from ..models import AccessControlList

View File

@@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
from django.contrib.contenttypes.models import ContentType
from documents.tests import GenericDocumentViewTestCase
from mayan.apps.documents.tests import GenericDocumentViewTestCase
from ..models import AccessControlList
from ..permissions import permission_acl_edit, permission_acl_view

View File

@@ -11,12 +11,12 @@ from django.urls import reverse
from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy as _
from common.views import (
from mayan.apps.common.views import (
AssignRemoveView, SingleObjectCreateView, SingleObjectDeleteView,
SingleObjectListView
)
from permissions import PermissionNamespace, Permission
from permissions.models import StoredPermission
from mayan.apps.permissions import Permission, PermissionNamespace
from mayan.apps.permissions.models import StoredPermission
from .classes import ModelPermission
from .icons import icon_acl_list

View File

@@ -7,10 +7,10 @@ from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from acls.models import AccessControlList
from document_states.classes import WorkflowAction
from permissions.classes import Permission
from permissions.models import Role
from mayan.apps.acls.models import AccessControlList
from mayan.apps.document_states.classes import WorkflowAction
from mayan.apps.permissions.classes import Permission
from mayan.apps.permissions.models import Role
from .classes import ModelPermission
from .permissions import permission_acl_edit

View File

@@ -1,3 +1,3 @@
from __future__ import unicode_literals
default_app_config = 'appearance.apps.AppearanceApp'
default_app_config = 'mayan.apps.appearance.apps.AppearanceApp'

View File

@@ -2,13 +2,13 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig
from mayan.apps.common import MayanAppConfig
from .licenses import * # NOQA
class AppearanceApp(MayanAppConfig):
name = 'appearance'
name = 'mayan.apps.appearance'
verbose_name = _('Appearance')
def ready(self):

View File

@@ -1,6 +1,6 @@
from __future__ import unicode_literals
from common.classes import Package
from mayan.apps.common.classes import Package
Package(label='Bootstrap', license_text='''
The MIT License (MIT)

View File

@@ -2,7 +2,7 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from smart_settings import Namespace
from mayan.apps.smart_settings import Namespace
from .literals import DEFAULT_MAXIMUM_TITLE_LENGTH

View File

@@ -43,7 +43,7 @@ class MayanImage {
$('.lazy-load').one('load', function() {
$(this).hide();
$(this).fadeIn(300);
$(this).fadeIn(200);
$(this).siblings('.spinner-container').remove();
$(this).removeClass('lazy-load pull-left');
clearTimeout(MayanImage.timer);
@@ -52,7 +52,7 @@ class MayanImage {
$('.lazy-load-carousel').one('load', function() {
$(this).hide();
$(this).fadeIn(300);
$(this).fadeIn(200);
$(this).siblings('.spinner-container').remove();
$(this).removeClass('lazy-load-carousel pull-left');
});

View File

@@ -60,14 +60,14 @@
{% smart_setting 'COMMON_PROJECT_TITLE' as setting_project_title %}
{% project_information '__title__' as project_title %}
{% get_icon 'common.icons.icon_documentation' as icon_documentation %}
{% get_icon 'common.icons.icon_forum' as icon_forum %}
{% get_icon 'common.icons.icon_social_facebook' as icon_social_facebook %}
{% get_icon 'common.icons.icon_social_paypal' as icon_social_paypal %}
{% get_icon 'common.icons.icon_social_twitter' as icon_social_twitter %}
{% get_icon 'common.icons.icon_social_instagram' as icon_social_instagram %}
{% get_icon 'common.icons.icon_source_code' as icon_source_code %}
{% get_icon 'common.icons.icon_wiki' as icon_wiki %}
{% get_icon 'mayan.apps.common.icons.icon_documentation' as icon_documentation %}
{% get_icon 'mayan.apps.common.icons.icon_forum' as icon_forum %}
{% get_icon 'mayan.apps.common.icons.icon_social_facebook' as icon_social_facebook %}
{% get_icon 'mayan.apps.common.icons.icon_social_paypal' as icon_social_paypal %}
{% get_icon 'mayan.apps.common.icons.icon_social_twitter' as icon_social_twitter %}
{% get_icon 'mayan.apps.common.icons.icon_social_instagram' as icon_social_instagram %}
{% get_icon 'mayan.apps.common.icons.icon_source_code' as icon_source_code %}
{% get_icon 'mayan.apps.common.icons.icon_wiki' as icon_wiki %}
<div class="well">
<h3 class="text-center">{{ setting_project_title }}</h3>

View File

@@ -44,7 +44,7 @@
<div class="well center-block">
<div class="row">
<div class="col-xs-12">
<form action="{% url 'search:results' search_model='documents.DocumentPageResult' %}" method="get" role="search">
<form action="{% url 'search:results' search_model='documents.DocumentPageSearchResult' %}" method="get" role="search">
<div class="input-group">
<input class="form-control" name="q" placeholder="{% trans 'Search pages' %}" type="text" value="{{ search_terms|default:'' }}">
<span class="input-group-btn">

View File

@@ -13,28 +13,7 @@
{% block project_name %}{% endblock %}
{% block content_plain %}
{% autoadmin_properties %}
{% if autoadmin_properties.account %}
<div class="row">
<div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3">
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">{% trans "First time login" %}</h3>
</div>
<div class="panel-body">
{% smart_setting 'COMMON_PROJECT_TITLE' as project_title %}
<p>{% blocktrans %}You have just finished installing <strong>{{ project_title }}</strong>, congratulations!{% endblocktrans %}</p>
<p>{% trans 'Login using the following credentials:' %}</p>
<p>{% blocktrans with autoadmin_properties.account as account %}Username: <strong>{{ account }}</strong>{% endblocktrans %}</p>
<p>{% blocktrans with autoadmin_properties.account.email as email %}Email: <strong>{{ email }}</strong>{% endblocktrans %}</p>
<p>{% blocktrans with autoadmin_properties.password as password %}Password: <strong>{{ password }}</strong>{% endblocktrans %}</p>
<p>{% trans 'Be sure to change the password to increase security and to disable this message.' %}</p>
</div>
</div>
</div>
</div>
{% endif %}
{% autoadmin_partial %}
{% motd %}
<div class="row">

View File

@@ -1,7 +1,7 @@
{% load common_tags %}
{% load navigation_tags %}
{% if link|get_type == "<class 'navigation.classes.Menu'>" %}
{% if link|get_type == "<class 'mayan.apps.navigation.classes.Menu'>" %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true">
{% if link.icon %}

View File

@@ -1,3 +1,3 @@
from __future__ import unicode_literals
default_app_config = 'authentication.apps.AuthenticationApp'
default_app_config = 'mayan.apps.authentication.apps.AuthenticationApp'

View File

@@ -4,8 +4,8 @@ import logging
from django.utils.translation import ugettext_lazy as _
from common import MayanAppConfig, menu_user
from navigation.classes import Separator
from mayan.apps.common import MayanAppConfig, menu_user
from mayan.apps.navigation.classes import Separator
from .links import link_logout, link_password_change
@@ -13,8 +13,10 @@ logger = logging.getLogger(__name__)
class AuthenticationApp(MayanAppConfig):
app_namespace = 'authentication'
app_url = 'authentication'
has_tests = True
name = 'authentication'
name = 'mayan.apps.authentication'
verbose_name = _('Authentication')
def ready(self):

View File

@@ -7,7 +7,7 @@ from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm
from django.utils.translation import ugettext_lazy as _
from common.widgets import EmailInput
from mayan.apps.common.widgets import EmailInput
class EmailAuthenticationForm(forms.Form):

View File

@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
from appearance.classes import Icon
from mayan.apps.appearance.classes import Icon
icon_logout = Icon(driver_name='fontawesome', symbol='sign-out-alt')
icon_password_change = Icon(driver_name='fontawesome', symbol='key')

View File

@@ -2,7 +2,7 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from navigation import Link
from mayan.apps.navigation import Link
from .icons import icon_logout, icon_password_change

View File

@@ -2,7 +2,7 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from smart_settings import Namespace
from mayan.apps.smart_settings import Namespace
from .literals import DEFAULT_LOGIN_METHOD, DEFAULT_MAXIMUM_SESSION_LENGTH

View File

@@ -1,3 +1,3 @@
from __future__ import unicode_literals
TEST_EMAIL_AUTHENTICATION_BACKEND = 'authentication.auth.email_auth_backend.EmailAuthBackend'
TEST_EMAIL_AUTHENTICATION_BACKEND = 'mayan.apps.authentication.auth.email_auth_backend.EmailAuthBackend'

View File

@@ -5,11 +5,11 @@ from django.core import mail
from django.test import override_settings
from django.urls import reverse
from common.tests import GenericViewTestCase
from smart_settings.classes import Namespace
from user_management.tests.literals import (
TEST_ADMIN_EMAIL, TEST_ADMIN_PASSWORD, TEST_USER_PASSWORD_EDITED,
TEST_ADMIN_USERNAME
from mayan.apps.common.tests import GenericViewTestCase
from mayan.apps.smart_settings.classes import Namespace
from mayan.apps.user_management.tests.literals import (
TEST_ADMIN_EMAIL, TEST_ADMIN_PASSWORD, TEST_ADMIN_USERNAME,
TEST_USER_PASSWORD_EDITED
)
from ..settings import setting_maximum_session_length

View File

@@ -10,7 +10,6 @@ from .views import (
password_reset_done_view, password_reset_view
)
urlpatterns = [
url(r'^login/$', login_view, name='login_view'),
url(

View File

@@ -4,8 +4,8 @@ from django.conf import settings
from django.contrib import messages
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.views import (
login, password_change, password_reset, password_reset_confirm,
password_reset_complete, password_reset_done
login, password_change, password_reset, password_reset_complete,
password_reset_confirm, password_reset_done
)
from django.http import HttpResponseRedirect
from django.shortcuts import redirect, resolve_url
@@ -15,8 +15,10 @@ from django.utils.translation import ugettext_lazy as _
from stronghold.decorators import public
from common.settings import setting_project_title, setting_project_url
import mayan
from mayan.apps.common.settings import (
setting_home_view, setting_project_title, setting_project_url
)
from .forms import EmailAuthenticationForm, UsernameAuthenticationForm
from .settings import setting_login_method, setting_maximum_session_length
@@ -84,7 +86,7 @@ def password_change_view(request):
'Changing the password is not allowed for this account.'
)
)
return HttpResponseRedirect(reverse(settings.HOME_VIEW))
return HttpResponseRedirect(reverse(setting_home_view.view))
return password_change(
request, extra_context=extra_context,

View File

@@ -0,0 +1,3 @@
from __future__ import unicode_literals
default_app_config = 'mayan.apps.autoadmin.apps.AutoAdminAppConfig'

View File

@@ -0,0 +1,7 @@
from __future__ import unicode_literals
from django.contrib import admin
from .models import AutoAdminSingleton
admin.site.register(AutoAdminSingleton)

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
)

View File

View File

@@ -0,0 +1,55 @@
"""
Authentication adapters for Allauth
"""
try:
from allauth.account.adapter import DefaultAccountAdapter
except ImportError:
print('ERROR: This authentication adapter requires django-allauth.')
raise
from django.conf import settings
from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
ADMIN_EMAIL_ADDRESSES = [email for name, email in settings.ADMINS]
class AutoadminAccountAdapter(DefaultAccountAdapter):
"""
Allauth account adapter that enables automatic grant of admin permissions
to users signing up having their email address listed in the ``ADMINS``
Django settings. Django settings needed to activate this feature:
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.sites',
'allauth',
'allauth.account',
'allauth.socialaccount',
]
ACCOUNT_ADAPTER = 'autoadmin.auth.allauth.AutoadminAccountAdapter'
See also:
- http://django-allauth.readthedocs.io/en/latest/configuration.html
- http://django-allauth.readthedocs.io/en/latest/advanced.html#admin
"""
def confirm_email(self, request, email_address):
"""
Give superuser privileges automagically if the email address of a
user confirming their email is listed in ``settings.ADMINS``.
"""
super(AutoadminAccountAdapter,
self).confirm_email(request, email_address)
if email_address.email in ADMIN_EMAIL_ADDRESSES:
user = email_address.user
user.is_staff = user.is_superuser = True
user.save()
messages.add_message(
request, messages.INFO,
_('Welcome Admin! You have been given superuser privileges. '
'Use them with caution.')
)

View File

@@ -0,0 +1,20 @@
from __future__ import unicode_literals
from django.apps import apps
def handler_auto_admin_account_password_change(sender, instance, **kwargs):
AutoAdminSingleton = apps.get_model(
app_label='autoadmin', model_name='AutoAdminSingleton'
)
auto_admin_properties, created = AutoAdminSingleton.objects.get_or_create()
if instance == auto_admin_properties.account and \
instance.password != auto_admin_properties.password_hash:
# Only delete the auto admin properties when the password
# has been changed
auto_admin_properties.account = None
auto_admin_properties.password = None
auto_admin_properties.password_hash = None
auto_admin_properties.save()

View File

@@ -0,0 +1,5 @@
from __future__ import unicode_literals
DEFAULT_EMAIL = 'autoadmin@example.com'
DEFAULT_PASSWORD = None
DEFAULT_USERNAME = 'admin'

View File

@@ -0,0 +1,96 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,97 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n"
"%100<12 || n%100>=14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n"
"%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,95 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,97 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
"%100>=11 && n%100<=14)? 2 : 3);\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-12-07 02:23-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: apps.py:16 settings.py:9
msgid "Auto administrator"
msgstr ""
#: auth/allauth.py:53
msgid ""
"Welcome Admin! You have been given superuser privileges. Use them with "
"caution."
msgstr ""
#: models.py:64
msgid "Account"
msgstr ""
#: models.py:67
msgid "Password"
msgstr ""
#: models.py:70
msgid "Password hash"
msgstr ""
#: models.py:76
msgid "Autoadmin properties"
msgstr ""
#: settings.py:14
msgid "Sets the email of the automatically created super user account."
msgstr ""
#: settings.py:20
msgid ""
"The password of the automatically created super user account. If it is equal "
"to None, the password is randomly generated."
msgstr ""
#: settings.py:27
msgid "The username of the automatically created super user account."
msgstr ""
#: templates/autoadmin/credentials.html:11
msgid "First time login"
msgstr ""
#: templates/autoadmin/credentials.html:16
#, python-format
msgid ""
"You have just finished installing <strong>%(project_title)s</strong>, "
"congratulations!"
msgstr ""
#: templates/autoadmin/credentials.html:17
msgid "Login using the following credentials:"
msgstr ""
#: templates/autoadmin/credentials.html:18
#, python-format
msgid "Username: <strong>%(account)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:19
#, python-format
msgid "Email: <strong>%(email)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:20
#, python-format
msgid "Password: <strong>%(password)s</strong>"
msgstr ""
#: templates/autoadmin/credentials.html:21
msgid ""
"Be sure to change the password to increase security and to disable this "
"message."
msgstr ""

View File

@@ -0,0 +1,12 @@
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()

View File

@@ -0,0 +1,57 @@
from __future__ import unicode_literals
import logging
from django.contrib.auth import get_user_model
from django.core import management
from django.db import models
from .settings import setting_email, setting_password, setting_username
logger = logging.getLogger(__name__)
class AutoAdminSingletonManager(models.Manager):
def create_autoadmin(self):
UserModel = get_user_model()
if setting_password.value is None:
password = UserModel.objects.make_random_password()
else:
password = setting_password.value
try:
UserModel.objects.get(
**{UserModel.USERNAME_FIELD: setting_username.value}
)
except UserModel.DoesNotExist:
logger.info(
'Creating superuser -- login: %s, email: %s, password: %s',
setting_username.value, setting_email.value, password
)
management.call_command(
'createsuperuser',
**{
UserModel.USERNAME_FIELD: setting_username.value,
'email': setting_email.value,
'interactive': False
}
)
account = UserModel.objects.get(
**{UserModel.USERNAME_FIELD: setting_username.value}
)
account.set_password(raw_password=password)
account.save()
# Store the auto admin password properties to display the
# first login message
auto_admin_properties, created = self.get_or_create() # NOQA
auto_admin_properties.account = account
auto_admin_properties.password = password
auto_admin_properties.password_hash = account.password
auto_admin_properties.save()
else:
logger.error(
'Super admin user already exists. -- login: %s',
setting_username.value
)

View File

@@ -0,0 +1,49 @@
from __future__ import unicode_literals
from django.conf import settings
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='AutoAdminSingleton',
fields=[
(
'id', models.AutoField(
verbose_name='ID', serialize=False, auto_created=True,
primary_key=True
)
),
(
'password', models.CharField(
max_length=128, null=True, verbose_name='Password',
blank=True
)
),
(
'password_hash', models.CharField(
max_length=128, null=True,
verbose_name='Password hash', blank=True
)
),
(
'account', models.ForeignKey(
verbose_name='Account', blank=True,
to=settings.AUTH_USER_MODEL, null=True,
on_delete=models.CASCADE
)
),
],
options={
'verbose_name': 'Autoadmin properties',
'verbose_name_plural': 'Autoadmin properties',
},
bases=(models.Model,),
),
]

View File

@@ -0,0 +1,27 @@
from __future__ import unicode_literals
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from solo.models import SingletonModel
from .managers import AutoAdminSingletonManager
class AutoAdminSingleton(SingletonModel):
account = models.ForeignKey(
blank=True, null=True, on_delete=models.CASCADE,
to=settings.AUTH_USER_MODEL, verbose_name=_('Account'),
)
password = models.CharField(
blank=True, max_length=128, null=True, verbose_name=_('Password')
)
password_hash = models.CharField(
blank=True, max_length=128, null=True, verbose_name=_('Password hash')
)
objects = AutoAdminSingletonManager()
class Meta:
verbose_name = verbose_name_plural = _('Autoadmin properties')

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.'
)
)

View File

@@ -0,0 +1,27 @@
{% load i18n %}
{% load smart_settings_tags %}
{% if autoadmin_properties.account %}
<div class="row">
<div class="col-xs-10 col-xs-offset-1 col-sm-8 col-sm-offset-2 col-md-6 col-md-offset-3 col-lg-4 col-lg-offset-4">
<br>
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">{% trans 'First time login' %}</h3>
</div>
<div class="panel-body">
<div class="content login">
{% smart_setting 'COMMON_PROJECT_TITLE' as project_title %}
<p>{% blocktrans %}You have just finished installing <strong>{{ project_title }}</strong>, congratulations!{% endblocktrans %}</p>
<p>{% trans 'Login using the following credentials:' %}</p>
<p>{% blocktrans with autoadmin_properties.account as account %}Username: <strong>{{ account }}</strong>{% endblocktrans %}</p>
<p>{% blocktrans with autoadmin_properties.account.email as email %}Email: <strong>{{ email }}</strong>{% endblocktrans %}</p>
<p>{% blocktrans with autoadmin_properties.password as password %}Password: <strong>{{ password }}</strong>{% endblocktrans %}</p>
<p>{% trans 'Be sure to change the password to increase security and to disable this message.' %}</p>
</div>
</div>
</div>
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,25 @@
from __future__ import unicode_literals
from django.template import Library
from ..models import AutoAdminSingleton
register = Library()
@register.simple_tag(takes_context=True)
def autoadmin_properties(context):
try:
context['autoadmin_properties'] = AutoAdminSingleton.objects.get()
except AutoAdminSingleton.DoesNotExist:
context['autoadmin_properties'] = None
return ''
@register.inclusion_tag('autoadmin/credentials.html')
def autoadmin_partial():
try:
return {'autoadmin_properties': AutoAdminSingleton.objects.get()}
except AutoAdminSingleton.DoesNotExist:
return {'autoadmin_properties': None}

View File

View File

@@ -0,0 +1,7 @@
from __future__ import unicode_literals
TEST_ADMIN_USER_EMAIL = 'testemail@example.com'
TEST_ADMIN_USER_PASSWORD = 'test admin user password'
TEST_ADMIN_USER_USERNAME = 'test_admin_user_username'
TEST_FIRST_TIME_LOGIN_TEXT = 'First time login'
TEST_MOCK_VIEW_TEXT = 'mock view text'

View File

@@ -0,0 +1,28 @@
from __future__ import unicode_literals
from django.contrib.auth import get_user_model
from django.core import management
from django.test import TestCase
from mayan.apps.common.tests.utils import mute_stdout
from ..models import AutoAdminSingleton
class AutoAdminManagementCommandTestCase(TestCase):
def setUp(self):
with mute_stdout():
management.call_command('createautoadmin')
def tearDown(self):
AutoAdminSingleton.objects.all().delete()
def test_autoadmin_creation(self):
autoadmin = AutoAdminSingleton.objects.get()
user = get_user_model().objects.first()
self.assertEqual(AutoAdminSingleton.objects.count(), 1)
self.assertEqual(autoadmin.account, user)
self.assertEqual(autoadmin.account.email, user.email)
self.assertEqual(autoadmin.password_hash, user.password)

View File

@@ -0,0 +1,43 @@
from __future__ import unicode_literals
import logging
from django.test import TestCase
from mayan.apps.common.tests.utils import mute_stdout
from ..models import AutoAdminSingleton
from ..settings import setting_username
from .literals import TEST_ADMIN_USER_PASSWORD
class AutoAdminHandlerTestCase(TestCase):
def test_post_admin_creation(self):
logging.disable(logging.INFO)
with mute_stdout():
AutoAdminSingleton.objects.create_autoadmin()
self.assertEqual(
AutoAdminSingleton.objects.get().account.username,
setting_username.value
)
user = AutoAdminSingleton.objects.get().account
user.set_password(TEST_ADMIN_USER_PASSWORD)
user.save(update_fields=['password'])
self.assertEqual(AutoAdminSingleton.objects.get().account, None)
def test_double_creation(self):
with mute_stdout():
AutoAdminSingleton.objects.create_autoadmin()
self.assertEqual(AutoAdminSingleton.objects.count(), 1)
logging.disable(logging.ERROR)
AutoAdminSingleton.objects.create_autoadmin()
self.assertEqual(AutoAdminSingleton.objects.count(), 1)

View File

@@ -0,0 +1,45 @@
from __future__ import unicode_literals
from django.test import TestCase
from django.urls import reverse
from mayan.apps.common.settings import setting_home_view
from mayan.apps.common.tests.utils import mute_stdout
from ..models import AutoAdminSingleton
from .literals import TEST_FIRST_TIME_LOGIN_TEXT, TEST_MOCK_VIEW_TEXT
class AutoAdminViewCase(TestCase):
def setUp(self):
with mute_stdout():
AutoAdminSingleton.objects.create_autoadmin()
def _request_home_view(self):
return self.client.get(
reverse(setting_home_view.value), follow=True
)
def test_login_302_view(self):
response = self._request_home_view()
self.assertContains(
response=response, text=TEST_FIRST_TIME_LOGIN_TEXT,
status_code=200
)
def test_login_ok_view(self):
autoadmin = AutoAdminSingleton.objects.get()
logged_in = self.client.login(
username=autoadmin.account,
password=autoadmin.password
)
self.assertTrue(logged_in)
response = self._request_home_view()
self.assertNotContains(
response=response, text=TEST_MOCK_VIEW_TEXT,
status_code=200
)

View File

@@ -1,3 +1,3 @@
from __future__ import unicode_literals
default_app_config = 'cabinets.apps.CabinetsApp'
default_app_config = 'mayan.apps.cabinets.apps.CabinetsApp'

View File

@@ -2,10 +2,10 @@ from __future__ import unicode_literals
from django.contrib import admin
from .models import Cabinet
from mptt.admin import MPTTModelAdmin
from .models import Cabinet
@admin.register(Cabinet)
class CabinetAdmin(MPTTModelAdmin):

View File

@@ -5,11 +5,11 @@ from django.shortcuts import get_object_or_404
from rest_framework import generics
from rest_framework.response import Response
from acls.models import AccessControlList
from documents.models import Document
from documents.permissions import permission_document_view
from rest_api.filters import MayanObjectPermissionsFilter
from rest_api.permissions import MayanPermission
from mayan.apps.acls.models import AccessControlList
from mayan.apps.documents.models import Document
from mayan.apps.documents.permissions import permission_document_view
from mayan.apps.rest_api.filters import MayanObjectPermissionsFilter
from mayan.apps.rest_api.permissions import MayanPermission
from .models import Cabinet
from .permissions import (

View File

@@ -3,22 +3,23 @@ from __future__ import unicode_literals
from django.apps import apps
from django.utils.translation import ugettext_lazy as _
from acls import ModelPermission
from acls.permissions import permission_acl_edit, permission_acl_view
from common import (
from mayan.apps.acls import ModelPermission
from mayan.apps.acls.permissions import (
permission_acl_edit, permission_acl_view
)
from mayan.apps.common import (
MayanAppConfig, menu_facet, menu_main, menu_multi_item, menu_object,
menu_sidebar
)
from documents.search import document_page_search, document_search
from navigation import SourceColumn
from mayan.apps.documents.search import document_page_search, document_search
from mayan.apps.navigation import SourceColumn
from .links import (
link_cabinet_list, link_document_cabinet_list,
link_document_cabinet_remove, link_cabinet_add_document,
link_cabinet_add_multiple_documents, link_cabinet_child_add,
link_cabinet_create, link_cabinet_delete, link_cabinet_edit,
link_cabinet_view, link_custom_acl_list,
link_multiple_document_cabinet_remove
link_cabinet_add_document, link_cabinet_add_multiple_documents,
link_cabinet_child_add, link_cabinet_create, link_cabinet_delete,
link_cabinet_edit, link_cabinet_list, link_cabinet_view,
link_custom_acl_list, link_document_cabinet_list,
link_document_cabinet_remove, link_multiple_document_cabinet_remove
)
from .menus import menu_cabinets
from .permissions import (
@@ -30,9 +31,11 @@ from .widgets import widget_document_cabinets
class CabinetsApp(MayanAppConfig):
app_namespace = 'cabinets'
app_url = 'cabinets'
has_rest_api = True
has_tests = True
name = 'cabinets'
name = 'mayan.apps.cabinets'
verbose_name = _('Cabinets')
def ready(self):

View File

@@ -2,7 +2,7 @@ from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from events import EventTypeNamespace
from mayan.apps.events import EventTypeNamespace
namespace = EventTypeNamespace(name='cabinets', label=_('Cabinets'))

View File

@@ -5,7 +5,7 @@ import logging
from django import forms
from django.utils.translation import ugettext_lazy as _
from acls.models import AccessControlList
from mayan.apps.acls.models import AccessControlList
from .models import Cabinet

View File

@@ -1,6 +1,6 @@
from __future__ import absolute_import, unicode_literals
from appearance.classes import Icon
from mayan.apps.appearance.classes import Icon
icon_cabinet = Icon(driver_name='fontawesome', symbol='columns')
icon_cabinet_add = Icon(driver_name='fontawesome', symbol='plus')

View File

@@ -4,9 +4,9 @@ import copy
from django.utils.translation import ugettext_lazy as _
from acls.links import link_acl_list
from documents.permissions import permission_document_view
from navigation import Link, get_cascade_condition
from mayan.apps.acls.links import link_acl_list
from mayan.apps.documents.permissions import permission_document_view
from mayan.apps.navigation import Link, get_cascade_condition
from .icons import (
icon_cabinet_add, icon_cabinet_child_add, icon_cabinet_create,
@@ -15,7 +15,7 @@ from .icons import (
from .permissions import (
permission_cabinet_add_document, permission_cabinet_create,
permission_cabinet_delete, permission_cabinet_edit,
permission_cabinet_view, permission_cabinet_remove_document
permission_cabinet_remove_document, permission_cabinet_view
)
# Document links

View File

@@ -2,7 +2,7 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from navigation import Menu, get_cascade_condition
from mayan.apps.navigation import Menu, get_cascade_condition
from .icons import icon_cabinet_list
from .permissions import permission_cabinet_create, permission_cabinet_view

View File

@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-24 07:37
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.db import migrations, models
import mptt.fields

Some files were not shown because too many files have changed in this diff Show More