Merge branch 'hotfix/v0.12.2' into development
Conflicts: apps/common/__init__.py apps/documents/forms.py apps/feedback/__init__.py apps/history/__init__.py apps/main/__init__.py apps/scheduler/api.py apps/sources/models.py docs/releases/index.rst requirements/production.txt settings.py urls.py
This commit is contained in:
@@ -2,12 +2,15 @@ from __future__ import absolute_import
|
||||
|
||||
import tempfile
|
||||
|
||||
from south.signals import post_migrate
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.auth import models as auth_models
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.auth.management import create_superuser
|
||||
from django.dispatch import receiver
|
||||
from django.db.models.signals import post_syncdb
|
||||
from django.conf import settings
|
||||
from django.db.models.signals import post_save
|
||||
|
||||
from navigation.api import bind_links, register_top_menu, Link
|
||||
from project_setup.api import register_setup
|
||||
@@ -19,6 +22,7 @@ from .conf import settings as common_settings
|
||||
from .utils import validate_path
|
||||
from .links import (password_change_view, current_user_details,
|
||||
current_user_edit, about_view, license_view, admin_site, sentry)
|
||||
from .models import AutoAdminSingleton
|
||||
|
||||
bind_links(['about_view', 'license_view'], [about_view, license_view], menu_name='secondary_menu')
|
||||
bind_links(['current_user_details', 'current_user_edit', 'password_change_view'], [current_user_details, current_user_edit, password_change_view], menu_name='secondary_menu')
|
||||
@@ -26,8 +30,8 @@ bind_links(['current_user_details', 'current_user_edit', 'password_change_view']
|
||||
register_top_menu('about', link=Link(text=_(u'about'), view='about_view', sprite='information'), position=-1)
|
||||
|
||||
|
||||
@receiver(post_syncdb, dispatch_uid='create_superuser_processor', sender=auth_models)
|
||||
def create_superuser_processor(sender, **kwargs):
|
||||
@receiver(post_migrate, dispatch_uid='create_superuser')
|
||||
def create_superuser(sender, **kwargs):
|
||||
"""
|
||||
From https://github.com/lambdalisue/django-qwert/blob/master/qwert/autoscript/__init__.py
|
||||
From http://stackoverflow.com/questions/1466827/ --
|
||||
@@ -39,17 +43,33 @@ def create_superuser_processor(sender, **kwargs):
|
||||
Create our own admin super user automatically.
|
||||
"""
|
||||
|
||||
if AUTO_CREATE_ADMIN:
|
||||
if AUTO_CREATE_ADMIN and kwargs['app'] == 'common':
|
||||
try:
|
||||
auth_models.User.objects.get(username=AUTO_ADMIN_USERNAME)
|
||||
except auth_models.User.DoesNotExist:
|
||||
print '*' * 80
|
||||
print 'Creating super admin user -- login: %s, password: %s' % (AUTO_ADMIN_USERNAME, AUTO_ADMIN_PASSWORD)
|
||||
print '*' * 80
|
||||
assert auth_models.User.objects.create_superuser(AUTO_ADMIN_USERNAME, 'x@x.com', AUTO_ADMIN_PASSWORD)
|
||||
assert auth_models.User.objects.create_superuser(AUTO_ADMIN_USERNAME, 'autoadmin@autoadmin.com', AUTO_ADMIN_PASSWORD)
|
||||
admin = auth_models.User.objects.get(username=AUTO_ADMIN_USERNAME)
|
||||
# Store the auto admin password properties to display the first login message
|
||||
auto_admin_properties = AutoAdminSingleton.objects.get()
|
||||
auto_admin_properties.account = admin
|
||||
auto_admin_properties.password = AUTO_ADMIN_PASSWORD
|
||||
auto_admin_properties.password_hash = admin.password
|
||||
auto_admin_properties.save()
|
||||
else:
|
||||
print 'Super admin user already exists. -- login: %s' % AUTO_ADMIN_USERNAME
|
||||
|
||||
|
||||
@receiver(post_save, dispatch_uid='auto_admin_account_passwd_change', sender=User)
|
||||
def auto_admin_account_passwd_change(sender, instance, **kwargs):
|
||||
auto_admin_properties = AutoAdminSingleton.objects.get()
|
||||
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.delete(force=True)
|
||||
|
||||
|
||||
if (validate_path(TEMPORARY_DIRECTORY) == False) or (not TEMPORARY_DIRECTORY):
|
||||
setattr(common_settings, 'TEMPORARY_DIRECTORY', tempfile.mkdtemp())
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Configuration options for the common app"""
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from smart_settings.api import Setting, SettingNamespace
|
||||
|
||||
@@ -49,7 +50,7 @@ Setting(
|
||||
namespace=namespace,
|
||||
name=u'AUTO_ADMIN_PASSWORD',
|
||||
global_name=u'COMMON_AUTO_ADMIN_PASSWORD',
|
||||
default=u'admin',
|
||||
default=User.objects.make_random_password(),
|
||||
)
|
||||
|
||||
Setting(
|
||||
|
||||
BIN
apps/common/locale/de_DE/LC_MESSAGES/django.mo
Normal file
BIN
apps/common/locale/de_DE/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
335
apps/common/locale/de_DE/LC_MESSAGES/django.po
Normal file
335
apps/common/locale/de_DE/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,335 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||
"POT-Creation-Date: 2012-06-17 18:08-0400\n"
|
||||
"PO-Revision-Date: 2011-09-30 04:55+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: German (Germany) (http://www.transifex.net/projects/p/mayan-edms/language/de_DE/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: de_DE\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
#: __init__.py:22
|
||||
msgid "change password"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:23
|
||||
msgid "user details"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:24
|
||||
msgid "edit details"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:28 __init__.py:33
|
||||
msgid "about"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:29
|
||||
msgid "license"
|
||||
msgstr ""
|
||||
|
||||
#: forms.py:101
|
||||
msgid "Selection"
|
||||
msgstr ""
|
||||
|
||||
#: forms.py:133
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#: forms.py:144
|
||||
msgid ""
|
||||
"Please enter a correct email and password. Note that the password fields is "
|
||||
"case-sensitive."
|
||||
msgstr ""
|
||||
|
||||
#: forms.py:146
|
||||
msgid "This account is inactive."
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:24
|
||||
msgid "A5"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:25
|
||||
msgid "A4"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:26
|
||||
msgid "A3"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:27
|
||||
msgid "B5"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:28
|
||||
msgid "B4"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:29
|
||||
msgid "Letter"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:30
|
||||
msgid "Legal"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:31
|
||||
msgid "Ledger"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:38
|
||||
msgid "Portrait"
|
||||
msgstr ""
|
||||
|
||||
#: literals.py:39
|
||||
msgid "Landscape"
|
||||
msgstr ""
|
||||
|
||||
#: models.py:16
|
||||
msgid "lock field"
|
||||
msgstr ""
|
||||
|
||||
#: models.py:43
|
||||
msgid "Anonymous user"
|
||||
msgstr ""
|
||||
|
||||
#: models.py:46 models.py:47
|
||||
msgid "anonymous user"
|
||||
msgstr ""
|
||||
|
||||
#: utils.py:295
|
||||
msgid "function found"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:36
|
||||
msgid "No action selected."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:40
|
||||
msgid "Must select at least one item."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:88
|
||||
#, python-format
|
||||
msgid "%(selection)s added successfully added to %(right_list_title)s."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:94 views.py:121
|
||||
#, python-format
|
||||
msgid "Unable to add %(selection)s to %(right_list_title)s."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:115
|
||||
#, python-format
|
||||
msgid "%(selection)s added successfully removed from %(right_list_title)s."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:136
|
||||
msgid "Add"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:147
|
||||
msgid "Remove"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:170
|
||||
msgid "current user details"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:187
|
||||
msgid "E-mail conflict, another user has that same email."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:190
|
||||
msgid "Current user's details updated."
|
||||
msgstr ""
|
||||
|
||||
#: views.py:199
|
||||
msgid "edit current user details"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:230
|
||||
msgid "License"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:239
|
||||
msgid "Current user password change"
|
||||
msgstr ""
|
||||
|
||||
#: views.py:254 templates/password_change_done.html:5
|
||||
msgid "Your password has been successfully changed."
|
||||
msgstr ""
|
||||
|
||||
#: widgets.py:58
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
#: conf/settings.py:15
|
||||
msgid ""
|
||||
"Temporary directory used site wide to store thumbnails, previews and "
|
||||
"temporary files. If none is specified, one will be created using "
|
||||
"tempfile.mkdtemp()"
|
||||
msgstr ""
|
||||
|
||||
#: conf/settings.py:65
|
||||
msgid ""
|
||||
"Controls the mechanism used to authenticated user. Options are: username, "
|
||||
"email"
|
||||
msgstr ""
|
||||
|
||||
#: conf/settings.py:74
|
||||
msgid "Allow non authenticated users, access to all views"
|
||||
msgstr ""
|
||||
|
||||
#: templates/403.html:3 templates/403.html.py:7
|
||||
msgid "Insufficient permissions"
|
||||
msgstr ""
|
||||
|
||||
#: templates/403.html:9
|
||||
msgid "You don't have enough permissions for this operation."
|
||||
msgstr ""
|
||||
|
||||
#: templates/404.html:3 templates/404.html.py:7
|
||||
msgid "Page not found"
|
||||
msgstr ""
|
||||
|
||||
#: templates/404.html:9
|
||||
msgid "Sorry, but the requested page could not be found."
|
||||
msgstr ""
|
||||
|
||||
#: templates/calculate_form_title.html:11
|
||||
#, python-format
|
||||
msgid "Details for %(object_name)s: %(object)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/calculate_form_title.html:13
|
||||
#, python-format
|
||||
msgid "Details for: %(object)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/calculate_form_title.html:18
|
||||
#, python-format
|
||||
msgid "Edit %(object_name)s:"
|
||||
msgstr ""
|
||||
|
||||
#: templates/calculate_form_title.html:20
|
||||
msgid "Edit"
|
||||
msgstr ""
|
||||
|
||||
#: templates/calculate_form_title.html:24
|
||||
#, python-format
|
||||
msgid "Create new %(object_name)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/calculate_form_title.html:26
|
||||
msgid "Create"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_assign_remove.html:3
|
||||
#, python-format
|
||||
msgid "Assign %(title)s %(object)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_confirm.html:3 templates/generic_confirm.html.py:18
|
||||
msgid "Confirm"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_confirm.html:16
|
||||
msgid "Confirm delete"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_confirm.html:32
|
||||
msgid "form icon"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_confirm.html:40
|
||||
#, python-format
|
||||
msgid "Are you sure you wish to delete %(object_name)s: %(object)s?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_confirm.html:42
|
||||
#, python-format
|
||||
msgid "Are you sure you wish to delete: %(object)s?"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_confirm.html:50
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_confirm.html:54
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_form_instance.html:37
|
||||
#: templates/generic_form_subtemplate.html:56
|
||||
msgid "required"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_form_subtemplate.html:80
|
||||
#: templates/generic_form_subtemplate.html:82
|
||||
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||
#: templates/generic_list_horizontal_subtemplate.html:90
|
||||
#: templates/generic_list_subtemplate.html:52
|
||||
#: templates/generic_list_subtemplate.html:178
|
||||
msgid "Save"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_form_subtemplate.html:80
|
||||
#: templates/generic_form_subtemplate.html:82
|
||||
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||
#: templates/generic_list_horizontal_subtemplate.html:90
|
||||
#: templates/generic_list_subtemplate.html:52
|
||||
#: templates/generic_list_subtemplate.html:178
|
||||
msgid "Submit"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_form_subtemplate.html:87
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
||||
#, python-format
|
||||
msgid "List of %(stripped_title)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_list_horizontal_subtemplate.html:23
|
||||
#: templates/generic_list_subtemplate.html:24
|
||||
#, python-format
|
||||
msgid ""
|
||||
"List of %(title)s (%(start)s - %(end)s out of %(total)s) (Page "
|
||||
"%(page_number)s of %(total_pages)s)"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_list_horizontal_subtemplate.html:25
|
||||
#: templates/generic_list_subtemplate.html:26
|
||||
#, python-format
|
||||
msgid "List of %(title)s (%(total)s)"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_list_subtemplate.html:72
|
||||
msgid "Identifier"
|
||||
msgstr ""
|
||||
|
||||
#: templates/generic_list_subtemplate.html:152
|
||||
#, python-format
|
||||
msgid "There are no %(stripped_title)s"
|
||||
msgstr ""
|
||||
|
||||
#: templates/login.html:5
|
||||
msgid "Login"
|
||||
msgstr ""
|
||||
|
||||
#: templates/password_change_done.html:3 templates/password_change_form.html:3
|
||||
#: templates/password_change_form.html:5
|
||||
msgid "Password change"
|
||||
msgstr ""
|
||||
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-02-12 15:20-0400\n"
|
||||
"POT-Creation-Date: 2012-06-17 19:02-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"
|
||||
@@ -17,23 +17,23 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: __init__.py:20
|
||||
#: __init__.py:22
|
||||
msgid "change password"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:21
|
||||
#: __init__.py:23
|
||||
msgid "user details"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:22
|
||||
#: __init__.py:24
|
||||
msgid "edit details"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:26 __init__.py:31
|
||||
#: __init__.py:28 __init__.py:33
|
||||
msgid "about"
|
||||
msgstr ""
|
||||
|
||||
#: __init__.py:27
|
||||
#: __init__.py:29
|
||||
msgid "license"
|
||||
msgstr ""
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,41 +1,40 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
#
|
||||
# Translators:
|
||||
# Roberto Rosario <roberto.rosario.gonzalez@gmail.com>, 2011, 2012.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-02-12 15:20-0400\n"
|
||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||
"POT-Creation-Date: 2012-06-17 18:08-0400\n"
|
||||
"PO-Revision-Date: 2012-02-02 18:39+0000\n"
|
||||
"Last-Translator: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>\n"
|
||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
|
||||
"mayan-edms/team/es/)\n"
|
||||
"Language: es\n"
|
||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/mayan-edms/language/es/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: es\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
#: __init__.py:20
|
||||
#: __init__.py:22
|
||||
msgid "change password"
|
||||
msgstr "cambiar contraseña"
|
||||
|
||||
#: __init__.py:21
|
||||
#: __init__.py:23
|
||||
msgid "user details"
|
||||
msgstr "detalles de usuario"
|
||||
|
||||
#: __init__.py:22
|
||||
#: __init__.py:24
|
||||
msgid "edit details"
|
||||
msgstr "editar detalles"
|
||||
|
||||
#: __init__.py:26 __init__.py:31
|
||||
#: __init__.py:28 __init__.py:33
|
||||
msgid "about"
|
||||
msgstr "sobre"
|
||||
|
||||
#: __init__.py:27
|
||||
#: __init__.py:29
|
||||
msgid "license"
|
||||
msgstr "licencia"
|
||||
|
||||
@@ -51,10 +50,7 @@ msgstr "E-mail"
|
||||
msgid ""
|
||||
"Please enter a correct email and password. Note that the password fields is "
|
||||
"case-sensitive."
|
||||
msgstr ""
|
||||
"Por favor entre la dirección de correo electrónico y la contraseña "
|
||||
"correctas. Tenga en cuenta que los campos de contraseña distingue entre "
|
||||
"mayúsculas y minúsculas."
|
||||
msgstr "Por favor entre la dirección de correo electrónico y la contraseña correctas. Tenga en cuenta que los campos de contraseña distingue entre mayúsculas y minúsculas."
|
||||
|
||||
#: forms.py:146
|
||||
msgid "This account is inactive."
|
||||
@@ -153,9 +149,7 @@ msgstr "detalles del usuario corriente"
|
||||
|
||||
#: views.py:187
|
||||
msgid "E-mail conflict, another user has that same email."
|
||||
msgstr ""
|
||||
"Conflicto de correo electrónica, otro usuario tiene ese mismo correo "
|
||||
"electrónico."
|
||||
msgstr "Conflicto de correo electrónica, otro usuario tiene ese mismo correo electrónico."
|
||||
|
||||
#: views.py:190
|
||||
msgid "Current user's details updated."
|
||||
@@ -184,25 +178,19 @@ msgstr "Ninguno"
|
||||
#: conf/settings.py:15
|
||||
msgid ""
|
||||
"Temporary directory used site wide to store thumbnails, previews and "
|
||||
"temporary files. If none is specified, one will be created using tempfile."
|
||||
"mkdtemp()"
|
||||
msgstr ""
|
||||
"Directorio temporal utilizado por todo el sitio para almacenar imágenes en "
|
||||
"miniatura, vistas previas y los archivos temporales. Si no se especifica "
|
||||
"ninguno, se creará utilizando tempfile.mkdtemp ()"
|
||||
"temporary files. If none is specified, one will be created using "
|
||||
"tempfile.mkdtemp()"
|
||||
msgstr "Directorio temporal utilizado por todo el sitio para almacenar imágenes en miniatura, vistas previas y los archivos temporales. Si no se especifica ninguno, se creará utilizando tempfile.mkdtemp ()"
|
||||
|
||||
#: conf/settings.py:65
|
||||
msgid ""
|
||||
"Controls the mechanism used to authenticated user. Options are: username, "
|
||||
"email"
|
||||
msgstr ""
|
||||
"Controla el mecanismo utilizado para el usuario autenticado. Las opciones "
|
||||
"son: 'username' nombre de usuario, 'email' correo electrónico"
|
||||
msgstr "Controla el mecanismo utilizado para el usuario autenticado. Las opciones son: 'username' nombre de usuario, 'email' correo electrónico"
|
||||
|
||||
#: conf/settings.py:74
|
||||
msgid "Allow non authenticated users, access to all views"
|
||||
msgstr ""
|
||||
"Permita a los usuarios no autenticados, el acceso a todas las pantallas"
|
||||
msgstr "Permita a los usuarios no autenticados, el acceso a todas las pantallas"
|
||||
|
||||
#: templates/403.html:3 templates/403.html.py:7
|
||||
msgid "Insufficient permissions"
|
||||
@@ -321,9 +309,7 @@ msgstr "Lista de %(stripped_title)s "
|
||||
msgid ""
|
||||
"List of %(title)s (%(start)s - %(end)s out of %(total)s) (Page "
|
||||
"%(page_number)s of %(total_pages)s)"
|
||||
msgstr ""
|
||||
"Lista de %(title)s (%(start)s - %(end)s de %(total)s) (Página "
|
||||
"%(page_number)s de %(total_pages)s)"
|
||||
msgstr "Lista de %(title)s (%(start)s - %(end)s de %(total)s) (Página %(page_number)s de %(total_pages)s)"
|
||||
|
||||
#: templates/generic_list_horizontal_subtemplate.html:25
|
||||
#: templates/generic_list_subtemplate.html:26
|
||||
|
||||
Binary file not shown.
@@ -3,6 +3,7 @@
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Translators:
|
||||
# Carlo Zanatto <>, 2012.
|
||||
# <pierpaolo.baldan@gmail.com>, 2011.
|
||||
# Pierpaolo Baldan <pierpaolo.baldan@gmail.com>, 2012.
|
||||
# Roberto Rosario <roberto.rosario.gonzalez@gmail.com>, 2012.
|
||||
@@ -10,9 +11,9 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||
"POT-Creation-Date: 2012-02-12 15:20-0400\n"
|
||||
"PO-Revision-Date: 2012-03-21 13:21+0000\n"
|
||||
"Last-Translator: Pierpaolo Baldan <pierpaolo.baldan@gmail.com>\n"
|
||||
"POT-Creation-Date: 2012-06-17 18:08-0400\n"
|
||||
"PO-Revision-Date: 2012-06-08 07:46+0000\n"
|
||||
"Last-Translator: Carlo Zanatto <>\n"
|
||||
"Language-Team: Italian (http://www.transifex.net/projects/p/mayan-edms/language/it/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
@@ -20,23 +21,23 @@ msgstr ""
|
||||
"Language: it\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
#: __init__.py:20
|
||||
#: __init__.py:22
|
||||
msgid "change password"
|
||||
msgstr "cambia password"
|
||||
|
||||
#: __init__.py:21
|
||||
#: __init__.py:23
|
||||
msgid "user details"
|
||||
msgstr "dettaglio utente"
|
||||
|
||||
#: __init__.py:22
|
||||
#: __init__.py:24
|
||||
msgid "edit details"
|
||||
msgstr "modifica dettagli"
|
||||
|
||||
#: __init__.py:26 __init__.py:31
|
||||
#: __init__.py:28 __init__.py:33
|
||||
msgid "about"
|
||||
msgstr "a rigurdo"
|
||||
msgstr "informazioni"
|
||||
|
||||
#: __init__.py:27
|
||||
#: __init__.py:29
|
||||
msgid "license"
|
||||
msgstr "licenza"
|
||||
|
||||
@@ -120,7 +121,7 @@ msgstr "Nessuna azione selezionata"
|
||||
|
||||
#: views.py:40
|
||||
msgid "Must select at least one item."
|
||||
msgstr "Devi selezionare un item"
|
||||
msgstr "Devi selezionare un elemento"
|
||||
|
||||
#: views.py:88
|
||||
#, python-format
|
||||
@@ -294,7 +295,7 @@ msgstr "Salva"
|
||||
#: templates/generic_list_subtemplate.html:52
|
||||
#: templates/generic_list_subtemplate.html:178
|
||||
msgid "Submit"
|
||||
msgstr "Sottometti"
|
||||
msgstr "Conferma"
|
||||
|
||||
#: templates/generic_form_subtemplate.html:87
|
||||
msgid "Cancel"
|
||||
|
||||
Binary file not shown.
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||
"POT-Creation-Date: 2012-02-12 15:20-0400\n"
|
||||
"POT-Creation-Date: 2012-06-17 18:08-0400\n"
|
||||
"PO-Revision-Date: 2012-02-21 15:17+0000\n"
|
||||
"Last-Translator: mic <winterfall24@gmail.com>\n"
|
||||
"Language-Team: Polish (http://www.transifex.net/projects/p/mayan-edms/language/pl/)\n"
|
||||
@@ -21,23 +21,23 @@ msgstr ""
|
||||
"Language: pl\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
|
||||
#: __init__.py:20
|
||||
#: __init__.py:22
|
||||
msgid "change password"
|
||||
msgstr "zmień hasło"
|
||||
|
||||
#: __init__.py:21
|
||||
#: __init__.py:23
|
||||
msgid "user details"
|
||||
msgstr "szczegóły konta użytkownika"
|
||||
|
||||
#: __init__.py:22
|
||||
#: __init__.py:24
|
||||
msgid "edit details"
|
||||
msgstr "edytuj szczegóły"
|
||||
|
||||
#: __init__.py:26 __init__.py:31
|
||||
#: __init__.py:28 __init__.py:33
|
||||
msgid "about"
|
||||
msgstr "informacje o"
|
||||
|
||||
#: __init__.py:27
|
||||
#: __init__.py:29
|
||||
msgid "license"
|
||||
msgstr "licencja"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||
"POT-Creation-Date: 2012-02-12 15:20-0400\n"
|
||||
"POT-Creation-Date: 2012-06-17 18:08-0400\n"
|
||||
"PO-Revision-Date: 2012-02-21 15:07+0000\n"
|
||||
"Last-Translator: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>\n"
|
||||
"Language-Team: Portuguese (http://www.transifex.net/projects/p/mayan-edms/language/pt/)\n"
|
||||
@@ -19,23 +19,23 @@ msgstr ""
|
||||
"Language: pt\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
|
||||
#: __init__.py:20
|
||||
#: __init__.py:22
|
||||
msgid "change password"
|
||||
msgstr "alterar a senha"
|
||||
|
||||
#: __init__.py:21
|
||||
#: __init__.py:23
|
||||
msgid "user details"
|
||||
msgstr "detalhes do usuário"
|
||||
|
||||
#: __init__.py:22
|
||||
#: __init__.py:24
|
||||
msgid "edit details"
|
||||
msgstr "editar detalhes"
|
||||
|
||||
#: __init__.py:26 __init__.py:31
|
||||
#: __init__.py:28 __init__.py:33
|
||||
msgid "about"
|
||||
msgstr "sobre"
|
||||
|
||||
#: __init__.py:27
|
||||
#: __init__.py:29
|
||||
msgid "license"
|
||||
msgstr "licença"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -1,42 +1,40 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
#
|
||||
# Translators:
|
||||
# Sergey Glita <gsv70@mail.ru>, 2011.
|
||||
# Sergey Glita <gsv70@mail.ru>, 2011, 2012.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Mayan EDMS\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-02-12 15:20-0400\n"
|
||||
"PO-Revision-Date: 2012-02-02 18:18+0000\n"
|
||||
"Last-Translator: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>\n"
|
||||
"Language-Team: Russian (http://www.transifex.net/projects/p/mayan-edms/team/"
|
||||
"ru/)\n"
|
||||
"Language: ru\n"
|
||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||
"POT-Creation-Date: 2012-06-17 18:08-0400\n"
|
||||
"PO-Revision-Date: 2012-02-03 06:36+0000\n"
|
||||
"Last-Translator: Sergey Glita <gsv70@mail.ru>\n"
|
||||
"Language-Team: Russian (http://www.transifex.net/projects/p/mayan-edms/language/ru/)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
"Language: ru\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
|
||||
|
||||
#: __init__.py:20
|
||||
#: __init__.py:22
|
||||
msgid "change password"
|
||||
msgstr "Изменение пароля"
|
||||
|
||||
#: __init__.py:21
|
||||
#: __init__.py:23
|
||||
msgid "user details"
|
||||
msgstr "сведения о пользователе"
|
||||
|
||||
#: __init__.py:22
|
||||
#: __init__.py:24
|
||||
msgid "edit details"
|
||||
msgstr "изменение сведений"
|
||||
|
||||
#: __init__.py:26 __init__.py:31
|
||||
#: __init__.py:28 __init__.py:33
|
||||
msgid "about"
|
||||
msgstr "инфо"
|
||||
|
||||
#: __init__.py:27
|
||||
#: __init__.py:29
|
||||
msgid "license"
|
||||
msgstr "лицензия"
|
||||
|
||||
@@ -52,9 +50,7 @@ msgstr "Email"
|
||||
msgid ""
|
||||
"Please enter a correct email and password. Note that the password fields is "
|
||||
"case-sensitive."
|
||||
msgstr ""
|
||||
"Пожалуйста, введите правильный адрес электронной почты и пароль с учетом "
|
||||
"регистра."
|
||||
msgstr "Пожалуйста, введите правильный адрес электронной почты и пароль с учетом регистра."
|
||||
|
||||
#: forms.py:146
|
||||
msgid "This account is inactive."
|
||||
@@ -102,15 +98,15 @@ msgstr "Пейзаж"
|
||||
|
||||
#: models.py:16
|
||||
msgid "lock field"
|
||||
msgstr ""
|
||||
msgstr "блокировка поля"
|
||||
|
||||
#: models.py:43
|
||||
msgid "Anonymous user"
|
||||
msgstr ""
|
||||
msgstr "Анонимный пользователь"
|
||||
|
||||
#: models.py:46 models.py:47
|
||||
msgid "anonymous user"
|
||||
msgstr ""
|
||||
msgstr "анонимный пользователь"
|
||||
|
||||
#: utils.py:295
|
||||
msgid "function found"
|
||||
@@ -153,7 +149,7 @@ msgstr "данные пользователя"
|
||||
|
||||
#: views.py:187
|
||||
msgid "E-mail conflict, another user has that same email."
|
||||
msgstr ""
|
||||
msgstr "Другой пользователь укеазал тот же е-мейл."
|
||||
|
||||
#: views.py:190
|
||||
msgid "Current user's details updated."
|
||||
@@ -169,7 +165,7 @@ msgstr "Лицензия"
|
||||
|
||||
#: views.py:239
|
||||
msgid "Current user password change"
|
||||
msgstr ""
|
||||
msgstr "Изменить пароль пользователя"
|
||||
|
||||
#: views.py:254 templates/password_change_done.html:5
|
||||
msgid "Your password has been successfully changed."
|
||||
@@ -182,24 +178,19 @@ msgstr "Ни один"
|
||||
#: conf/settings.py:15
|
||||
msgid ""
|
||||
"Temporary directory used site wide to store thumbnails, previews and "
|
||||
"temporary files. If none is specified, one will be created using tempfile."
|
||||
"mkdtemp()"
|
||||
msgstr ""
|
||||
"Временный каталог, используемый сайтом для хранения миниатюр, превью и "
|
||||
"временных файлов. Если он не указан, он будет создан с использованием "
|
||||
"tempfile.mkdtemp ()"
|
||||
"temporary files. If none is specified, one will be created using "
|
||||
"tempfile.mkdtemp()"
|
||||
msgstr "Временный каталог, используемый сайтом для хранения миниатюр, превью и временных файлов. Если он не указан, он будет создан с использованием tempfile.mkdtemp ()"
|
||||
|
||||
#: conf/settings.py:65
|
||||
msgid ""
|
||||
"Controls the mechanism used to authenticated user. Options are: username, "
|
||||
"email"
|
||||
msgstr ""
|
||||
"Управление механизмом, используемым для аутентификации пользователя. "
|
||||
"Возможные варианты: имя пользователя, адрес электронной почты"
|
||||
msgstr "Управление механизмом, используемым для аутентификации пользователя. Возможные варианты: имя пользователя, адрес электронной почты"
|
||||
|
||||
#: conf/settings.py:74
|
||||
msgid "Allow non authenticated users, access to all views"
|
||||
msgstr ""
|
||||
msgstr "Разрешить, не прошедшим проверку, пользователям доступ ко всем представлениям"
|
||||
|
||||
#: templates/403.html:3 templates/403.html.py:7
|
||||
msgid "Insufficient permissions"
|
||||
@@ -305,7 +296,7 @@ msgstr "Выполнить"
|
||||
|
||||
#: templates/generic_form_subtemplate.html:87
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Отменить"
|
||||
|
||||
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
||||
#, python-format
|
||||
@@ -318,9 +309,7 @@ msgstr "Список \"%(stripped_title)s\""
|
||||
msgid ""
|
||||
"List of %(title)s (%(start)s - %(end)s out of %(total)s) (Page "
|
||||
"%(page_number)s of %(total_pages)s)"
|
||||
msgstr ""
|
||||
"Список %(title)s (%(start)s - %(end)s из %(total)s) (Page %(page_number)s из "
|
||||
"%(total_pages)s)"
|
||||
msgstr "Список %(title)s (%(start)s - %(end)s из %(total)s) (Page %(page_number)s из %(total_pages)s)"
|
||||
|
||||
#: templates/generic_list_horizontal_subtemplate.html:25
|
||||
#: templates/generic_list_subtemplate.html:26
|
||||
|
||||
32
apps/common/migrations/0001_initial.py
Normal file
32
apps/common/migrations/0001_initial.py
Normal file
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding model 'AnonymousUserSingleton'
|
||||
db.create_table('common_anonymoususersingleton', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('lock_id', self.gf('django.db.models.fields.CharField')(default=1, unique=True, max_length=1)),
|
||||
))
|
||||
db.send_create_signal('common', ['AnonymousUserSingleton'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'AnonymousUserSingleton'
|
||||
db.delete_table('common_anonymoususersingleton')
|
||||
|
||||
|
||||
models = {
|
||||
'common.anonymoususersingleton': {
|
||||
'Meta': {'object_name': 'AnonymousUserSingleton'},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['common']
|
||||
77
apps/common/migrations/0002_auto__add_autoadminsingleton.py
Normal file
77
apps/common/migrations/0002_auto__add_autoadminsingleton.py
Normal file
@@ -0,0 +1,77 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding model 'AutoAdminSingleton'
|
||||
db.create_table('common_autoadminsingleton', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('lock_id', self.gf('django.db.models.fields.CharField')(default=1, unique=True, max_length=1)),
|
||||
('original_auto_admin_password', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
||||
('auto_admin', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True)),
|
||||
))
|
||||
db.send_create_signal('common', ['AutoAdminSingleton'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'AutoAdminSingleton'
|
||||
db.delete_table('common_autoadminsingleton')
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
|
||||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
|
||||
},
|
||||
'auth.permission': {
|
||||
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
|
||||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||
},
|
||||
'auth.user': {
|
||||
'Meta': {'object_name': 'User'},
|
||||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
||||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
|
||||
},
|
||||
'common.anonymoususersingleton': {
|
||||
'Meta': {'object_name': 'AnonymousUserSingleton'},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'})
|
||||
},
|
||||
'common.autoadminsingleton': {
|
||||
'Meta': {'object_name': 'AutoAdminSingleton'},
|
||||
'auto_admin': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}),
|
||||
'original_auto_admin_password': ('django.db.models.fields.BooleanField', [], {'default': 'True'})
|
||||
},
|
||||
'contenttypes.contenttype': {
|
||||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
||||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['common']
|
||||
@@ -0,0 +1,97 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Deleting field 'AutoAdminSingleton.original_auto_admin_password'
|
||||
db.delete_column('common_autoadminsingleton', 'original_auto_admin_password')
|
||||
|
||||
# Deleting field 'AutoAdminSingleton.auto_admin'
|
||||
db.delete_column('common_autoadminsingleton', 'auto_admin_id')
|
||||
|
||||
# Adding field 'AutoAdminSingleton.auto_admin_account'
|
||||
db.add_column('common_autoadminsingleton', 'auto_admin_account',
|
||||
self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='auto_admin_account', null=True, to=orm['auth.User']),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'AutoAdminSingleton.auto_admin_password'
|
||||
db.add_column('common_autoadminsingleton', 'auto_admin_password',
|
||||
self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Adding field 'AutoAdminSingleton.original_auto_admin_password'
|
||||
db.add_column('common_autoadminsingleton', 'original_auto_admin_password',
|
||||
self.gf('django.db.models.fields.BooleanField')(default=True),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'AutoAdminSingleton.auto_admin'
|
||||
db.add_column('common_autoadminsingleton', 'auto_admin',
|
||||
self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Deleting field 'AutoAdminSingleton.auto_admin_account'
|
||||
db.delete_column('common_autoadminsingleton', 'auto_admin_account_id')
|
||||
|
||||
# Deleting field 'AutoAdminSingleton.auto_admin_password'
|
||||
db.delete_column('common_autoadminsingleton', 'auto_admin_password')
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
|
||||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
|
||||
},
|
||||
'auth.permission': {
|
||||
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
|
||||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||
},
|
||||
'auth.user': {
|
||||
'Meta': {'object_name': 'User'},
|
||||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
||||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
|
||||
},
|
||||
'common.anonymoususersingleton': {
|
||||
'Meta': {'object_name': 'AnonymousUserSingleton'},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'})
|
||||
},
|
||||
'common.autoadminsingleton': {
|
||||
'Meta': {'object_name': 'AutoAdminSingleton'},
|
||||
'auto_admin_account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||
'auto_admin_password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'})
|
||||
},
|
||||
'contenttypes.contenttype': {
|
||||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
||||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['common']
|
||||
@@ -0,0 +1,106 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Deleting field 'AutoAdminSingleton.auto_admin_password'
|
||||
db.delete_column('common_autoadminsingleton', 'auto_admin_password')
|
||||
|
||||
# Deleting field 'AutoAdminSingleton.auto_admin_account'
|
||||
db.delete_column('common_autoadminsingleton', 'auto_admin_account_id')
|
||||
|
||||
# Adding field 'AutoAdminSingleton.account'
|
||||
db.add_column('common_autoadminsingleton', 'account',
|
||||
self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='auto_admin_account', null=True, to=orm['auth.User']),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'AutoAdminSingleton.password'
|
||||
db.add_column('common_autoadminsingleton', 'password',
|
||||
self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'AutoAdminSingleton.password_hash'
|
||||
db.add_column('common_autoadminsingleton', 'password_hash',
|
||||
self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Adding field 'AutoAdminSingleton.auto_admin_password'
|
||||
db.add_column('common_autoadminsingleton', 'auto_admin_password',
|
||||
self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Adding field 'AutoAdminSingleton.auto_admin_account'
|
||||
db.add_column('common_autoadminsingleton', 'auto_admin_account',
|
||||
self.gf('django.db.models.fields.related.ForeignKey')(related_name='auto_admin_account', null=True, to=orm['auth.User'], blank=True),
|
||||
keep_default=False)
|
||||
|
||||
# Deleting field 'AutoAdminSingleton.account'
|
||||
db.delete_column('common_autoadminsingleton', 'account_id')
|
||||
|
||||
# Deleting field 'AutoAdminSingleton.password'
|
||||
db.delete_column('common_autoadminsingleton', 'password')
|
||||
|
||||
# Deleting field 'AutoAdminSingleton.password_hash'
|
||||
db.delete_column('common_autoadminsingleton', 'password_hash')
|
||||
|
||||
|
||||
models = {
|
||||
'auth.group': {
|
||||
'Meta': {'object_name': 'Group'},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
|
||||
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
|
||||
},
|
||||
'auth.permission': {
|
||||
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
|
||||
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||
},
|
||||
'auth.user': {
|
||||
'Meta': {'object_name': 'User'},
|
||||
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
|
||||
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
|
||||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
|
||||
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
|
||||
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
|
||||
},
|
||||
'common.anonymoususersingleton': {
|
||||
'Meta': {'object_name': 'AnonymousUserSingleton'},
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'})
|
||||
},
|
||||
'common.autoadminsingleton': {
|
||||
'Meta': {'object_name': 'AutoAdminSingleton'},
|
||||
'account': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'auto_admin_account'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'lock_id': ('django.db.models.fields.CharField', [], {'default': '1', 'unique': 'True', 'max_length': '1'}),
|
||||
'password': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'}),
|
||||
'password_hash': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'})
|
||||
},
|
||||
'contenttypes.contenttype': {
|
||||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
||||
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['common']
|
||||
0
apps/common/migrations/__init__.py
Normal file
0
apps/common/migrations/__init__.py
Normal file
@@ -2,6 +2,7 @@ from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ugettext
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
SINGLETON_LOCK_ID = 1
|
||||
|
||||
@@ -21,8 +22,9 @@ class Singleton(models.Model):
|
||||
self.id = 1
|
||||
super(Singleton, self).save(*args, **kwargs)
|
||||
|
||||
def delete(self):
|
||||
pass
|
||||
def delete(self, force=False, *args, **kwargs):
|
||||
if force:
|
||||
return super(Singleton, self).delete(*args, **kwargs)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
@@ -45,3 +47,12 @@ class AnonymousUserSingleton(Singleton):
|
||||
class Meta:
|
||||
verbose_name = _(u'anonymous user')
|
||||
verbose_name_plural = _(u'anonymous user')
|
||||
|
||||
|
||||
class AutoAdminSingleton(Singleton):
|
||||
account = models.ForeignKey(User, null=True, blank=True, related_name='auto_admin_account', verbose_name=_(u'account'))
|
||||
password = models.CharField(null=True, blank=True, verbose_name=_(u'password'), max_length=128)
|
||||
password_hash = models.CharField(null=True, blank=True, verbose_name=_(u'password hash'), max_length=128)
|
||||
|
||||
class Meta:
|
||||
verbose_name = verbose_name_plural = _(u'auto admin properties')
|
||||
|
||||
12
apps/common/templatetags/autoadmin_tags.py
Normal file
12
apps/common/templatetags/autoadmin_tags.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from django.template import Library
|
||||
from django.utils.importlib import import_module
|
||||
|
||||
from common.models import AutoAdminSingleton
|
||||
|
||||
register = Library()
|
||||
|
||||
|
||||
@register.simple_tag(takes_context=True)
|
||||
def auto_admin_properties(context):
|
||||
context['auto_admin_properties'] = AutoAdminSingleton.objects.get()
|
||||
return u''
|
||||
Reference in New Issue
Block a user