Merge branch 'development' into feature/ACL_support
Conflicts: requirements/development.txt requirements/production.txt urls.py
56
.tx/config
@@ -2,47 +2,64 @@
|
|||||||
source_file = apps/converter/locale/en/LC_MESSAGES/django.po
|
source_file = apps/converter/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/converter/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/converter/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/converter/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/converter/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-common]
|
[mayan-edms.apps-common]
|
||||||
source_file = apps/common/locale/en/LC_MESSAGES/django.po
|
source_file = apps/common/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/common/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/common/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/common/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/common/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-permissions]
|
[mayan-edms.apps-permissions]
|
||||||
source_file = apps/permissions/locale/en/LC_MESSAGES/django.po
|
source_file = apps/permissions/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/permissions/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/permissions/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/permissions/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/permissions/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-sources]
|
[mayan-edms.apps-sources]
|
||||||
source_file = apps/sources/locale/en/LC_MESSAGES/django.po
|
source_file = apps/sources/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/sources/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/sources/locale/es/LC_MESSAGES/django.po
|
||||||
trans.pt = apps/sources/locale/pt/LC_MESSAGES/django.po
|
trans.pt = apps/sources/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/sources/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-document_indexing]
|
[mayan-edms.apps-document_indexing]
|
||||||
source_file = apps/document_indexing/locale/en/LC_MESSAGES/django.po
|
source_file = apps/document_indexing/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/document_indexing/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/document_indexing/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/document_indexing/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/document_indexing/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-user_management]
|
[mayan-edms.apps-user_management]
|
||||||
source_file = apps/user_management/locale/en/LC_MESSAGES/django.po
|
source_file = apps/user_management/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/user_management/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/user_management/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/user_management/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/user_management/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-main]
|
[mayan-edms.apps-main]
|
||||||
source_file = apps/main/locale/en/LC_MESSAGES/django.po
|
source_file = apps/main/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/main/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/main/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/main/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/main/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-ocr]
|
[mayan-edms.apps-ocr]
|
||||||
source_file = apps/ocr/locale/en/LC_MESSAGES/django.po
|
source_file = apps/ocr/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/ocr/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/ocr/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/ocr/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/ocr/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-project_setup]
|
[mayan-edms.apps-project_setup]
|
||||||
source_file = apps/project_setup/locale/en/LC_MESSAGES/django.po
|
source_file = apps/project_setup/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/project_setup/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/project_setup/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/project_setup/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/project_setup/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[main]
|
[main]
|
||||||
host = https://www.transifex.net
|
host = https://www.transifex.net
|
||||||
@@ -51,56 +68,89 @@ host = https://www.transifex.net
|
|||||||
source_file = apps/folders/locale/en/LC_MESSAGES/django.po
|
source_file = apps/folders/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/folders/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/folders/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/folders/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/folders/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-history]
|
[mayan-edms.apps-history]
|
||||||
source_file = apps/history/locale/en/LC_MESSAGES/django.po
|
source_file = apps/history/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/history/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/history/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/history/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/history/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-dynamic_search]
|
[mayan-edms.apps-dynamic_search]
|
||||||
source_file = apps/dynamic_search/locale/en/LC_MESSAGES/django.po
|
source_file = apps/dynamic_search/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/dynamic_search/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/dynamic_search/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/dynamic_search/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/dynamic_search/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-smart_settings]
|
[mayan-edms.apps-smart_settings]
|
||||||
source_file = apps/smart_settings/locale/en/LC_MESSAGES/django.po
|
source_file = apps/smart_settings/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/smart_settings/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/smart_settings/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/smart_settings/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/smart_settings/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-navigation]
|
[mayan-edms.apps-navigation]
|
||||||
source_file = apps/navigation/locale/en/LC_MESSAGES/django.po
|
source_file = apps/navigation/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/navigation/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/navigation/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/navigation/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/navigation/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-tags]
|
[mayan-edms.apps-tags]
|
||||||
source_file = apps/tags/locale/en/LC_MESSAGES/django.po
|
source_file = apps/tags/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/tags/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/tags/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/tags/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/tags/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-documents]
|
[mayan-edms.apps-documents]
|
||||||
source_file = apps/documents/locale/en/LC_MESSAGES/django.po
|
source_file = apps/documents/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/documents/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/documents/locale/es/LC_MESSAGES/django.po
|
||||||
trans.pt = apps/documents/locale/pt/LC_MESSAGES/django.po
|
trans.pt = apps/documents/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/documents/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-project_tools]
|
[mayan-edms.apps-project_tools]
|
||||||
source_file = apps/project_tools/locale/en/LC_MESSAGES/django.po
|
source_file = apps/project_tools/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/project_tools/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/project_tools/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/project_tools/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/project_tools/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-grouping]
|
[mayan-edms.apps-linking]
|
||||||
source_file = apps/grouping/locale/en/LC_MESSAGES/django.po
|
source_file = apps/linking/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/grouping/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/linking/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/linking/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/linking/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-document_comments]
|
[mayan-edms.apps-document_comments]
|
||||||
source_file = apps/document_comments/locale/en/LC_MESSAGES/django.po
|
source_file = apps/document_comments/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/document_comments/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/document_comments/locale/es/LC_MESSAGES/django.po
|
||||||
trans.pt = apps/document_comments/locale/pt/LC_MESSAGES/django.po
|
trans.pt = apps/document_comments/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/document_comments/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
[mayan-edms.apps-metadata]
|
[mayan-edms.apps-metadata]
|
||||||
source_file = apps/metadata/locale/en/LC_MESSAGES/django.po
|
source_file = apps/metadata/locale/en/LC_MESSAGES/django.po
|
||||||
source_lang = en
|
source_lang = en
|
||||||
trans.es = apps/metadata/locale/es/LC_MESSAGES/django.po
|
trans.es = apps/metadata/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/metadata/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/metadata/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
|
[mayan-edms.apps-web_theme]
|
||||||
|
source_file = apps/web_theme/locale/en/LC_MESSAGES/django.po
|
||||||
|
source_lang = en
|
||||||
|
trans.es = apps/web_theme/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/web_theme/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/web_theme/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|
||||||
|
[mayan-edms.apps-django_gpg]
|
||||||
|
source_file = apps/django_gpg/locale/en/LC_MESSAGES/django.po
|
||||||
|
source_lang = en
|
||||||
|
trans.es = apps/django_gpg/locale/es/LC_MESSAGES/django.po
|
||||||
|
trans.pt = apps/django_gpg/locale/pt/LC_MESSAGES/django.po
|
||||||
|
trans.ru = apps/django_gpg/locale/ru/LC_MESSAGES/django.po
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
VERSION = (0, 1, 1)
|
|
||||||
__version__ = '.'.join(map(str, VERSION))
|
|
||||||
|
|
||||||
import os.path
|
|
||||||
from mimetypes import guess_type
|
|
||||||
|
|
||||||
from django.http import Http404
|
|
||||||
|
|
||||||
def _lazy_load(fn):
|
|
||||||
_cached = []
|
|
||||||
def _decorated():
|
|
||||||
if not _cached:
|
|
||||||
_cached.append(fn())
|
|
||||||
return _cached[0]
|
|
||||||
return _decorated
|
|
||||||
|
|
||||||
|
|
||||||
@_lazy_load
|
|
||||||
def _get_sendfile():
|
|
||||||
from django.utils.importlib import import_module
|
|
||||||
from django.conf import settings
|
|
||||||
from django.core.exceptions import ImproperlyConfigured
|
|
||||||
|
|
||||||
backend = getattr(settings, 'SENDFILE_BACKEND', None)
|
|
||||||
if not backend:
|
|
||||||
raise ImproperlyConfigured('You must specify a valued for SENDFILE_BACKEND')
|
|
||||||
module = import_module(backend)
|
|
||||||
return module.sendfile
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def sendfile(request, filename, attachment=False, attachment_filename=None):
|
|
||||||
'''
|
|
||||||
create a response to send file using backend configured in SENDFILE_BACKEND
|
|
||||||
|
|
||||||
if attachment is True the content-disposition header will be set with either
|
|
||||||
the filename given or else the attachment_filename (of specified). This
|
|
||||||
will typically prompt the user to download the file, rather than view it.
|
|
||||||
'''
|
|
||||||
_sendfile = _get_sendfile()
|
|
||||||
|
|
||||||
if not os.path.exists(filename):
|
|
||||||
raise Http404('"%s" does not exist' % filename)
|
|
||||||
|
|
||||||
mimetype, encoding = guess_type(filename)
|
|
||||||
if mimetype is None:
|
|
||||||
mimetype = 'application/octet-stream'
|
|
||||||
|
|
||||||
response = _sendfile(request, filename, mimetype=mimetype)
|
|
||||||
if attachment:
|
|
||||||
attachment_filename = attachment_filename or os.path.basename(filename)
|
|
||||||
response['Content-Disposition'] = 'attachment; filename=%s' % attachment_filename
|
|
||||||
|
|
||||||
response['Content-length'] = os.path.getsize(filename)
|
|
||||||
response['Content-Type'] = mimetype
|
|
||||||
if encoding:
|
|
||||||
response['Content-Encoding'] = encoding
|
|
||||||
|
|
||||||
return response
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
from django.views.static import serve
|
|
||||||
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
def sendfile(request, filename, **kwargs):
|
|
||||||
'''
|
|
||||||
Send file using django dev static file server.
|
|
||||||
|
|
||||||
DO NOT USE IN PRODUCTION
|
|
||||||
this is only to be used when developing and is provided
|
|
||||||
for convenience only
|
|
||||||
'''
|
|
||||||
dirname = os.path.dirname(filename)
|
|
||||||
basename = os.path.basename(filename)
|
|
||||||
return serve(request, basename, dirname)
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
from django.http import HttpResponse
|
|
||||||
|
|
||||||
from django.conf import settings
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
def _convert_file_to_url(filename):
|
|
||||||
# CURRENTLY NOT WORKING
|
|
||||||
# mod_wsgi wants a relative URL not a filename
|
|
||||||
# so apache does an internal redirect
|
|
||||||
|
|
||||||
relpath = os.path.relpath(filename, settings.SENDFILE_ROOT)
|
|
||||||
|
|
||||||
url = [settings.SENDFILE_URL]
|
|
||||||
|
|
||||||
while relpath:
|
|
||||||
relpath, head = os.path.split(relpath)
|
|
||||||
url.insert(1, head)
|
|
||||||
|
|
||||||
return u''.join(url)
|
|
||||||
|
|
||||||
def sendfile(request, filename, **kwargs):
|
|
||||||
response = HttpResponse()
|
|
||||||
response['Location'] = _convert_file_to_url(filename)
|
|
||||||
# need to destroy get_host() to stop django
|
|
||||||
# rewriting our location to include http, so that
|
|
||||||
# mod_wsgi is able to do the internal redirect
|
|
||||||
request.get_host = lambda: ''
|
|
||||||
|
|
||||||
return response
|
|
||||||
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
import os
|
|
||||||
import stat
|
|
||||||
import re
|
|
||||||
from email.Utils import parsedate_tz, mktime_tz
|
|
||||||
|
|
||||||
from django.core.files.base import File
|
|
||||||
from django.http import HttpResponse, HttpResponseNotModified
|
|
||||||
from django.utils.http import http_date
|
|
||||||
|
|
||||||
def sendfile(request, filename, **kwargs):
|
|
||||||
# Respect the If-Modified-Since header.
|
|
||||||
statobj = os.stat(filename)
|
|
||||||
mimetype = kwargs.get('mimetype', 'application/octet-stream')
|
|
||||||
|
|
||||||
if not was_modified_since(request.META.get('HTTP_IF_MODIFIED_SINCE'),
|
|
||||||
statobj[stat.ST_MTIME], statobj[stat.ST_SIZE]):
|
|
||||||
return HttpResponseNotModified(mimetype=mimetype)
|
|
||||||
|
|
||||||
|
|
||||||
response = HttpResponse(File(file(filename, 'rb')))
|
|
||||||
|
|
||||||
response["Last-Modified"] = http_date(statobj[stat.ST_MTIME])
|
|
||||||
return response
|
|
||||||
|
|
||||||
def was_modified_since(header=None, mtime=0, size=0):
|
|
||||||
"""
|
|
||||||
Was something modified since the user last downloaded it?
|
|
||||||
|
|
||||||
header
|
|
||||||
This is the value of the If-Modified-Since header. If this is None,
|
|
||||||
I'll just return True.
|
|
||||||
|
|
||||||
mtime
|
|
||||||
This is the modification time of the item we're talking about.
|
|
||||||
|
|
||||||
size
|
|
||||||
This is the size of the item we're talking about.
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
if header is None:
|
|
||||||
raise ValueError
|
|
||||||
matches = re.match(r"^([^;]+)(; length=([0-9]+))?$", header,
|
|
||||||
re.IGNORECASE)
|
|
||||||
header_date = parsedate_tz(matches.group(1))
|
|
||||||
if header_date is None:
|
|
||||||
raise ValueError
|
|
||||||
header_mtime = mktime_tz(header_date)
|
|
||||||
header_len = matches.group(3)
|
|
||||||
if header_len and int(header_len) != size:
|
|
||||||
raise ValueError
|
|
||||||
if mtime > header_mtime:
|
|
||||||
raise ValueError
|
|
||||||
except (AttributeError, ValueError, OverflowError):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
from django.http import HttpResponse
|
|
||||||
|
|
||||||
def sendfile(request, filename, **kwargs):
|
|
||||||
response = HttpResponse()
|
|
||||||
response['X-Sendfile'] = filename
|
|
||||||
|
|
||||||
return response
|
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-30 00:54-0400\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -99,67 +99,67 @@ msgstr ""
|
|||||||
msgid "Landscape"
|
msgid "Landscape"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils.py:289
|
#: utils.py:291
|
||||||
msgid "function found"
|
msgid "function found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: utils.py:291 utils.py:293
|
#: utils.py:293 utils.py:295
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "class found: %s"
|
msgid "class found: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:23 templates/password_change_done.html:5
|
#: views.py:24 templates/password_change_done.html:5
|
||||||
msgid "Your password has been successfully changed."
|
msgid "Your password has been successfully changed."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:39
|
#: views.py:41
|
||||||
msgid "No action selected."
|
msgid "No action selected."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:43
|
#: views.py:45
|
||||||
msgid "Must select at least one item."
|
msgid "Must select at least one item."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:76
|
#: views.py:86
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%(selection)s added successfully added to %(right_list_title)s."
|
msgid "%(selection)s added successfully added to %(right_list_title)s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:79 views.py:96
|
#: views.py:89 views.py:106
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Unable to add %(selection)s to %(right_list_title)s."
|
msgid "Unable to add %(selection)s to %(right_list_title)s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:93
|
#: views.py:103
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%(selection)s added successfully removed from %(right_list_title)s."
|
msgid "%(selection)s added successfully removed from %(right_list_title)s."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:111
|
#: views.py:121
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:122
|
#: views.py:132
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:145
|
#: views.py:155
|
||||||
msgid "current user details"
|
msgid "current user details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:162
|
#: views.py:172
|
||||||
msgid "Current user's details updated."
|
msgid "Current user's details updated."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:171
|
#: views.py:181
|
||||||
msgid "edit current user details"
|
msgid "edit current user details"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:197
|
#: views.py:207
|
||||||
msgid "Changelog"
|
msgid "Changelog"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: views.py:210
|
#: views.py:220
|
||||||
msgid "License"
|
msgid "License"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -237,25 +237,25 @@ msgstr ""
|
|||||||
msgid "Confirm delete"
|
msgid "Confirm delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_confirm.html:28
|
#: templates/generic_confirm.html:32
|
||||||
msgid "form icon"
|
msgid "form icon"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_confirm.html:36
|
#: templates/generic_confirm.html:40
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Are you sure you wish to delete %(object_name)s: %(object)s?"
|
msgid "Are you sure you wish to delete %(object_name)s: %(object)s?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_confirm.html:38
|
#: templates/generic_confirm.html:42
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Are you sure you wish to delete: %(object)s?"
|
msgid "Are you sure you wish to delete: %(object)s?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_confirm.html:46
|
#: templates/generic_confirm.html:50
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_confirm.html:50
|
#: templates/generic_confirm.html:54
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -268,8 +268,8 @@ msgstr ""
|
|||||||
#: templates/generic_form_subtemplate.html:78
|
#: templates/generic_form_subtemplate.html:78
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:51
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:178
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
#: templates/generic_list_subtemplate.html:51
|
#: templates/generic_list_subtemplate.html:52
|
||||||
#: templates/generic_list_subtemplate.html:171
|
#: templates/generic_list_subtemplate.html:178
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -277,22 +277,18 @@ msgstr ""
|
|||||||
#: templates/generic_form_subtemplate.html:78
|
#: templates/generic_form_subtemplate.html:78
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:51
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:178
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
#: templates/generic_list_subtemplate.html:51
|
#: templates/generic_list_subtemplate.html:52
|
||||||
#: templates/generic_list_subtemplate.html:171
|
#: templates/generic_list_subtemplate.html:178
|
||||||
msgid "Submit"
|
msgid "Submit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_form_subtemplate.html:82
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "List of %(stripped_title)s"
|
msgid "List of %(stripped_title)s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:23
|
#: templates/generic_list_horizontal_subtemplate.html:23
|
||||||
#: templates/generic_list_subtemplate.html:23
|
#: templates/generic_list_subtemplate.html:24
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"List of %(title)s (%(start)s - %(end)s out of %(total)s) (Page "
|
"List of %(title)s (%(start)s - %(end)s out of %(total)s) (Page "
|
||||||
@@ -300,18 +296,16 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:25
|
#: templates/generic_list_horizontal_subtemplate.html:25
|
||||||
#: templates/generic_list_subtemplate.html:25
|
#: templates/generic_list_subtemplate.html:26
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "List of %(title)s (%(total)s)"
|
msgid "List of %(title)s (%(total)s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:72
|
#: templates/generic_list_subtemplate.html:72
|
||||||
#: templates/generic_list_subtemplate.html:71
|
|
||||||
msgid "Identifier"
|
msgid "Identifier"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:146
|
#: templates/generic_list_subtemplate.html:152
|
||||||
#: templates/generic_list_subtemplate.html:145
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "There are no %(stripped_title)s"
|
msgid "There are no %(stripped_title)s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|||||||
@@ -7,15 +7,16 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Mayan EDMS\n"
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-30 00:54-0400\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: 2011-09-30 05:17+0000\n"
|
"PO-Revision-Date: 2011-11-04 00:58+0000\n"
|
||||||
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
||||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/mayan-edms/team/es/)\n"
|
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
|
||||||
|
"mayan-edms/team/es/)\n"
|
||||||
|
"Language: es\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Language: es\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
#: __init__.py:17
|
#: __init__.py:17
|
||||||
@@ -32,11 +33,11 @@ msgstr "editar detalles"
|
|||||||
|
|
||||||
#: __init__.py:23 __init__.py:29
|
#: __init__.py:23 __init__.py:29
|
||||||
msgid "about"
|
msgid "about"
|
||||||
msgstr ""
|
msgstr "sobre"
|
||||||
|
|
||||||
#: __init__.py:24
|
#: __init__.py:24
|
||||||
msgid "changelog"
|
msgid "changelog"
|
||||||
msgstr ""
|
msgstr "cambios"
|
||||||
|
|
||||||
#: __init__.py:25
|
#: __init__.py:25
|
||||||
msgid "license"
|
msgid "license"
|
||||||
@@ -48,17 +49,20 @@ msgstr "Selección"
|
|||||||
|
|
||||||
#: forms.py:131
|
#: forms.py:131
|
||||||
msgid "Email"
|
msgid "Email"
|
||||||
msgstr ""
|
msgstr "E-mail"
|
||||||
|
|
||||||
#: forms.py:142
|
#: forms.py:142
|
||||||
msgid ""
|
msgid ""
|
||||||
"Please enter a correct email and password. Note that the password fields is "
|
"Please enter a correct email and password. Note that the password fields is "
|
||||||
"case-sensitive."
|
"case-sensitive."
|
||||||
msgstr ""
|
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:144
|
#: forms.py:144
|
||||||
msgid "This account is inactive."
|
msgid "This account is inactive."
|
||||||
msgstr ""
|
msgstr "Esta cuenta está inactiva."
|
||||||
|
|
||||||
#: literals.py:24
|
#: literals.py:24
|
||||||
msgid "A5"
|
msgid "A5"
|
||||||
@@ -100,67 +104,67 @@ msgstr "Retrato"
|
|||||||
msgid "Landscape"
|
msgid "Landscape"
|
||||||
msgstr "Paisaje"
|
msgstr "Paisaje"
|
||||||
|
|
||||||
#: utils.py:289
|
#: utils.py:291
|
||||||
msgid "function found"
|
msgid "function found"
|
||||||
msgstr "función encontrada"
|
msgstr "función encontrada"
|
||||||
|
|
||||||
#: utils.py:291 utils.py:293
|
#: utils.py:293 utils.py:295
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "class found: %s"
|
msgid "class found: %s"
|
||||||
msgstr "clase encontrada: %s"
|
msgstr "clase encontrada: %s"
|
||||||
|
|
||||||
#: views.py:23 templates/password_change_done.html:5
|
#: views.py:24 templates/password_change_done.html:5
|
||||||
msgid "Your password has been successfully changed."
|
msgid "Your password has been successfully changed."
|
||||||
msgstr "Su contraseña se ha modificado correctamente."
|
msgstr "Su contraseña se ha modificado correctamente."
|
||||||
|
|
||||||
#: views.py:39
|
#: views.py:41
|
||||||
msgid "No action selected."
|
msgid "No action selected."
|
||||||
msgstr "Ninguna acción seleccionada."
|
msgstr "Ninguna acción seleccionada."
|
||||||
|
|
||||||
#: views.py:43
|
#: views.py:45
|
||||||
msgid "Must select at least one item."
|
msgid "Must select at least one item."
|
||||||
msgstr "Debe seleccionar al menos un artículo."
|
msgstr "Debe seleccionar al menos un artículo."
|
||||||
|
|
||||||
#: views.py:76
|
#: views.py:86
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%(selection)s added successfully added to %(right_list_title)s."
|
msgid "%(selection)s added successfully added to %(right_list_title)s."
|
||||||
msgstr "Se agrego exitosamente %(selection)s a %(right_list_title)s."
|
msgstr "Se agrego exitosamente %(selection)s a %(right_list_title)s."
|
||||||
|
|
||||||
#: views.py:79 views.py:96
|
#: views.py:89 views.py:106
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Unable to add %(selection)s to %(right_list_title)s."
|
msgid "Unable to add %(selection)s to %(right_list_title)s."
|
||||||
msgstr "No se puede agregar %(selection)s a %(right_list_title)s."
|
msgstr "No se puede agregar %(selection)s a %(right_list_title)s."
|
||||||
|
|
||||||
#: views.py:93
|
#: views.py:103
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "%(selection)s added successfully removed from %(right_list_title)s."
|
msgid "%(selection)s added successfully removed from %(right_list_title)s."
|
||||||
msgstr "Se removió exitosamente %(selection)s de %(right_list_title)s."
|
msgstr "Se removió exitosamente %(selection)s de %(right_list_title)s."
|
||||||
|
|
||||||
#: views.py:111
|
#: views.py:121
|
||||||
msgid "Add"
|
msgid "Add"
|
||||||
msgstr "Agregar"
|
msgstr "Agregar"
|
||||||
|
|
||||||
#: views.py:122
|
#: views.py:132
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Remover"
|
msgstr "Remover"
|
||||||
|
|
||||||
#: views.py:145
|
#: views.py:155
|
||||||
msgid "current user details"
|
msgid "current user details"
|
||||||
msgstr "detalles del usuario corriente"
|
msgstr "detalles del usuario corriente"
|
||||||
|
|
||||||
#: views.py:162
|
#: views.py:172
|
||||||
msgid "Current user's details updated."
|
msgid "Current user's details updated."
|
||||||
msgstr "Datos del usuario corriente actualizados."
|
msgstr "Datos del usuario corriente actualizados."
|
||||||
|
|
||||||
#: views.py:171
|
#: views.py:181
|
||||||
msgid "edit current user details"
|
msgid "edit current user details"
|
||||||
msgstr "editar detalles del usuario corriente"
|
msgstr "editar detalles del usuario corriente"
|
||||||
|
|
||||||
#: views.py:197
|
#: views.py:207
|
||||||
msgid "Changelog"
|
msgid "Changelog"
|
||||||
msgstr ""
|
msgstr "Cambios"
|
||||||
|
|
||||||
#: views.py:210
|
#: views.py:220
|
||||||
msgid "License"
|
msgid "License"
|
||||||
msgstr "Licencia"
|
msgstr "Licencia"
|
||||||
|
|
||||||
@@ -171,8 +175,8 @@ msgstr "Ninguno"
|
|||||||
#: conf/settings.py:15
|
#: conf/settings.py:15
|
||||||
msgid ""
|
msgid ""
|
||||||
"Temporary directory used site wide to store thumbnails, previews and "
|
"Temporary directory used site wide to store thumbnails, previews and "
|
||||||
"temporary files. If none is specified, one will be created using "
|
"temporary files. If none is specified, one will be created using tempfile."
|
||||||
"tempfile.mkdtemp()"
|
"mkdtemp()"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Directorio temporal utilizado por todo el sitio para almacenar imágenes en "
|
"Directorio temporal utilizado por todo el sitio para almacenar imágenes en "
|
||||||
"miniatura, vistas previas y los archivos temporales. Si no se especifica "
|
"miniatura, vistas previas y los archivos temporales. Si no se especifica "
|
||||||
@@ -183,6 +187,8 @@ msgid ""
|
|||||||
"Controls the mechanism used to authenticated user. Options are: username, "
|
"Controls the mechanism used to authenticated user. Options are: username, "
|
||||||
"email"
|
"email"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
"Controla el mecanismo utilizado para el usuario autenticado. Las opciones "
|
||||||
|
"son: 'username' nombre de usuario, 'email' correo electrónico"
|
||||||
|
|
||||||
#: templates/403.html:3 templates/403.html.py:7
|
#: templates/403.html:3 templates/403.html.py:7
|
||||||
msgid "Insufficient permissions"
|
msgid "Insufficient permissions"
|
||||||
@@ -241,25 +247,25 @@ msgstr "Confirmar"
|
|||||||
msgid "Confirm delete"
|
msgid "Confirm delete"
|
||||||
msgstr "Confirmar eliminación"
|
msgstr "Confirmar eliminación"
|
||||||
|
|
||||||
#: templates/generic_confirm.html:28
|
#: templates/generic_confirm.html:32
|
||||||
msgid "form icon"
|
msgid "form icon"
|
||||||
msgstr "emblema de la forma"
|
msgstr "emblema de la forma"
|
||||||
|
|
||||||
#: templates/generic_confirm.html:36
|
#: templates/generic_confirm.html:40
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Are you sure you wish to delete %(object_name)s: %(object)s?"
|
msgid "Are you sure you wish to delete %(object_name)s: %(object)s?"
|
||||||
msgstr "¿Está seguro que desea eliminar %(object_name)s: %(object)s?"
|
msgstr "¿Está seguro que desea eliminar %(object_name)s: %(object)s?"
|
||||||
|
|
||||||
#: templates/generic_confirm.html:38
|
#: templates/generic_confirm.html:42
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "Are you sure you wish to delete: %(object)s?"
|
msgid "Are you sure you wish to delete: %(object)s?"
|
||||||
msgstr "¿Está seguro que desea eliminar: %(object)s?"
|
msgstr "¿Está seguro que desea eliminar: %(object)s?"
|
||||||
|
|
||||||
#: templates/generic_confirm.html:46
|
#: templates/generic_confirm.html:50
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr "Sí"
|
msgstr "Sí"
|
||||||
|
|
||||||
#: templates/generic_confirm.html:50
|
#: templates/generic_confirm.html:54
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr "No"
|
msgstr "No"
|
||||||
|
|
||||||
@@ -272,8 +278,8 @@ msgstr "requerido"
|
|||||||
#: templates/generic_form_subtemplate.html:78
|
#: templates/generic_form_subtemplate.html:78
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:51
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:178
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
#: templates/generic_list_subtemplate.html:51
|
#: templates/generic_list_subtemplate.html:52
|
||||||
#: templates/generic_list_subtemplate.html:171
|
#: templates/generic_list_subtemplate.html:178
|
||||||
msgid "Save"
|
msgid "Save"
|
||||||
msgstr "Guardar"
|
msgstr "Guardar"
|
||||||
|
|
||||||
@@ -281,22 +287,18 @@ msgstr "Guardar"
|
|||||||
#: templates/generic_form_subtemplate.html:78
|
#: templates/generic_form_subtemplate.html:78
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:51
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:178
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
#: templates/generic_list_subtemplate.html:51
|
#: templates/generic_list_subtemplate.html:52
|
||||||
#: templates/generic_list_subtemplate.html:171
|
#: templates/generic_list_subtemplate.html:178
|
||||||
msgid "Submit"
|
msgid "Submit"
|
||||||
msgstr "Enviar"
|
msgstr "Enviar"
|
||||||
|
|
||||||
#: templates/generic_form_subtemplate.html:82
|
|
||||||
msgid "Cancel"
|
|
||||||
msgstr "Cancelar"
|
|
||||||
|
|
||||||
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "List of %(stripped_title)s"
|
msgid "List of %(stripped_title)s"
|
||||||
msgstr "Lista de %(stripped_title)s "
|
msgstr "Lista de %(stripped_title)s "
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:23
|
#: templates/generic_list_horizontal_subtemplate.html:23
|
||||||
#: templates/generic_list_subtemplate.html:23
|
#: templates/generic_list_subtemplate.html:24
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"List of %(title)s (%(start)s - %(end)s out of %(total)s) (Page "
|
"List of %(title)s (%(start)s - %(end)s out of %(total)s) (Page "
|
||||||
@@ -306,18 +308,16 @@ msgstr ""
|
|||||||
"%(page_number)s de %(total_pages)s)"
|
"%(page_number)s de %(total_pages)s)"
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:25
|
#: templates/generic_list_horizontal_subtemplate.html:25
|
||||||
#: templates/generic_list_subtemplate.html:25
|
#: templates/generic_list_subtemplate.html:26
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "List of %(title)s (%(total)s)"
|
msgid "List of %(title)s (%(total)s)"
|
||||||
msgstr "Lista de %(title)s (%(total)s)"
|
msgstr "Lista de %(title)s (%(total)s)"
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:72
|
#: templates/generic_list_subtemplate.html:72
|
||||||
#: templates/generic_list_subtemplate.html:71
|
|
||||||
msgid "Identifier"
|
msgid "Identifier"
|
||||||
msgstr "Identificador"
|
msgstr "Identificador"
|
||||||
|
|
||||||
#: templates/generic_list_horizontal_subtemplate.html:146
|
#: templates/generic_list_subtemplate.html:152
|
||||||
#: templates/generic_list_subtemplate.html:145
|
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "There are no %(stripped_title)s"
|
msgid "There are no %(stripped_title)s"
|
||||||
msgstr "No hay %(stripped_title)s "
|
msgstr "No hay %(stripped_title)s "
|
||||||
@@ -331,4 +331,5 @@ msgstr "Iniciar sesión"
|
|||||||
msgid "Password change"
|
msgid "Password change"
|
||||||
msgstr "Cambio de contraseña"
|
msgstr "Cambio de contraseña"
|
||||||
|
|
||||||
|
#~ msgid "Cancel"
|
||||||
|
#~ msgstr "Cancelar"
|
||||||
|
|||||||
BIN
apps/common/locale/pt/LC_MESSAGES/django.mo
Normal file
334
apps/common/locale/pt/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,334 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# <dev.emerson@gmail.com>, 2011.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
|
"PO-Revision-Date: 2011-11-02 02:18+0000\n"
|
||||||
|
"Last-Translator: emersonsoares <dev.emerson@gmail.com>\n"
|
||||||
|
"Language-Team: Portuguese (http://www.transifex.net/projects/p/mayan-edms/"
|
||||||
|
"team/pt/)\n"
|
||||||
|
"Language: pt\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"
|
||||||
|
|
||||||
|
#: __init__.py:17
|
||||||
|
msgid "change password"
|
||||||
|
msgstr "alterar a senha"
|
||||||
|
|
||||||
|
#: __init__.py:18
|
||||||
|
msgid "user details"
|
||||||
|
msgstr "detalhes do usuário"
|
||||||
|
|
||||||
|
#: __init__.py:19
|
||||||
|
msgid "edit details"
|
||||||
|
msgstr "editar detalhes"
|
||||||
|
|
||||||
|
#: __init__.py:23 __init__.py:29
|
||||||
|
msgid "about"
|
||||||
|
msgstr "sobre"
|
||||||
|
|
||||||
|
#: __init__.py:24
|
||||||
|
msgid "changelog"
|
||||||
|
msgstr "log de alterações"
|
||||||
|
|
||||||
|
#: __init__.py:25
|
||||||
|
msgid "license"
|
||||||
|
msgstr "licença"
|
||||||
|
|
||||||
|
#: forms.py:99
|
||||||
|
msgid "Selection"
|
||||||
|
msgstr "Seleção"
|
||||||
|
|
||||||
|
#: forms.py:131
|
||||||
|
msgid "Email"
|
||||||
|
msgstr "E-mail"
|
||||||
|
|
||||||
|
#: forms.py:142
|
||||||
|
msgid ""
|
||||||
|
"Please enter a correct email and password. Note that the password fields is "
|
||||||
|
"case-sensitive."
|
||||||
|
msgstr ""
|
||||||
|
"Por favor insira o e-mail e senha corretos. Note que os campos de senha são "
|
||||||
|
"case-sensitive."
|
||||||
|
|
||||||
|
#: forms.py:144
|
||||||
|
msgid "This account is inactive."
|
||||||
|
msgstr "Esta conta está inativa."
|
||||||
|
|
||||||
|
#: literals.py:24
|
||||||
|
msgid "A5"
|
||||||
|
msgstr "A5"
|
||||||
|
|
||||||
|
#: literals.py:25
|
||||||
|
msgid "A4"
|
||||||
|
msgstr "A4"
|
||||||
|
|
||||||
|
#: literals.py:26
|
||||||
|
msgid "A3"
|
||||||
|
msgstr "A3"
|
||||||
|
|
||||||
|
#: literals.py:27
|
||||||
|
msgid "B5"
|
||||||
|
msgstr "B5"
|
||||||
|
|
||||||
|
#: literals.py:28
|
||||||
|
msgid "B4"
|
||||||
|
msgstr "B4"
|
||||||
|
|
||||||
|
#: literals.py:29
|
||||||
|
msgid "Letter"
|
||||||
|
msgstr "Carta"
|
||||||
|
|
||||||
|
#: literals.py:30
|
||||||
|
msgid "Legal"
|
||||||
|
msgstr "Legal"
|
||||||
|
|
||||||
|
#: literals.py:31
|
||||||
|
msgid "Ledger"
|
||||||
|
msgstr "Livro-razão"
|
||||||
|
|
||||||
|
#: literals.py:38
|
||||||
|
msgid "Portrait"
|
||||||
|
msgstr "Retrato"
|
||||||
|
|
||||||
|
#: literals.py:39
|
||||||
|
msgid "Landscape"
|
||||||
|
msgstr "Paisagem"
|
||||||
|
|
||||||
|
#: utils.py:291
|
||||||
|
msgid "function found"
|
||||||
|
msgstr "função encontrada"
|
||||||
|
|
||||||
|
#: utils.py:293 utils.py:295
|
||||||
|
#, python-format
|
||||||
|
msgid "class found: %s"
|
||||||
|
msgstr "classe encontrada: %s"
|
||||||
|
|
||||||
|
#: views.py:24 templates/password_change_done.html:5
|
||||||
|
msgid "Your password has been successfully changed."
|
||||||
|
msgstr "Sua senha foi alterada com êxito."
|
||||||
|
|
||||||
|
#: views.py:41
|
||||||
|
msgid "No action selected."
|
||||||
|
msgstr "Nenhuma ação selecionada."
|
||||||
|
|
||||||
|
#: views.py:45
|
||||||
|
msgid "Must select at least one item."
|
||||||
|
msgstr "Deve selecionar pelo menos um item."
|
||||||
|
|
||||||
|
#: views.py:86
|
||||||
|
#, python-format
|
||||||
|
msgid "%(selection)s added successfully added to %(right_list_title)s."
|
||||||
|
msgstr "%(selection)s adicionadas com sucesso a %(right_list_title)s ."
|
||||||
|
|
||||||
|
#: views.py:89 views.py:106
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to add %(selection)s to %(right_list_title)s."
|
||||||
|
msgstr "Não foi possível adicionar %(selection)s para %(right_list_title)s ."
|
||||||
|
|
||||||
|
#: views.py:103
|
||||||
|
#, python-format
|
||||||
|
msgid "%(selection)s added successfully removed from %(right_list_title)s."
|
||||||
|
msgstr " %(selection)s adicionado com sucesso removidos %(right_list_title)s."
|
||||||
|
|
||||||
|
#: views.py:121
|
||||||
|
msgid "Add"
|
||||||
|
msgstr "Adicionar"
|
||||||
|
|
||||||
|
#: views.py:132
|
||||||
|
msgid "Remove"
|
||||||
|
msgstr "Remover"
|
||||||
|
|
||||||
|
#: views.py:155
|
||||||
|
msgid "current user details"
|
||||||
|
msgstr "detalhes atuais do usuário"
|
||||||
|
|
||||||
|
#: views.py:172
|
||||||
|
msgid "Current user's details updated."
|
||||||
|
msgstr "Detalhes do usuário atual atualizados."
|
||||||
|
|
||||||
|
#: views.py:181
|
||||||
|
msgid "edit current user details"
|
||||||
|
msgstr "editar os detalhes do usuário atual"
|
||||||
|
|
||||||
|
#: views.py:207
|
||||||
|
msgid "Changelog"
|
||||||
|
msgstr "Log de alterações"
|
||||||
|
|
||||||
|
#: views.py:220
|
||||||
|
msgid "License"
|
||||||
|
msgstr "Licença"
|
||||||
|
|
||||||
|
#: widgets.py:58
|
||||||
|
msgid "None"
|
||||||
|
msgstr "Nenhum"
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Diretório temporário usado para armazenar miniaturas, previews e arquivos "
|
||||||
|
"temporários. Se nenhum for especificado, um será criado usando tempfile."
|
||||||
|
"mkdtemp()"
|
||||||
|
|
||||||
|
#: conf/settings.py:65
|
||||||
|
msgid ""
|
||||||
|
"Controls the mechanism used to authenticated user. Options are: username, "
|
||||||
|
"email"
|
||||||
|
msgstr ""
|
||||||
|
"Controla o mecanismo usado para usuário autenticado. As opções são: e-mail, "
|
||||||
|
"nome de usuário,"
|
||||||
|
|
||||||
|
#: templates/403.html:3 templates/403.html.py:7
|
||||||
|
msgid "Insufficient permissions"
|
||||||
|
msgstr "Permissões insuficientes"
|
||||||
|
|
||||||
|
#: templates/403.html:9
|
||||||
|
msgid "You don't have enough permissions for this operation."
|
||||||
|
msgstr "Você não tem permissões suficientes para esta operação."
|
||||||
|
|
||||||
|
#: templates/404.html:3 templates/404.html.py:7
|
||||||
|
msgid "Page not found"
|
||||||
|
msgstr "Página não encontrada"
|
||||||
|
|
||||||
|
#: templates/404.html:9
|
||||||
|
msgid "Sorry, but the requested page could not be found."
|
||||||
|
msgstr "Desculpe, mas a página solicitada não pôde ser encontrada."
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:11
|
||||||
|
#, python-format
|
||||||
|
msgid "Details for %(object_name)s: %(object)s"
|
||||||
|
msgstr "Detalhes para %(object_name)s : %(object)s "
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:13
|
||||||
|
#, python-format
|
||||||
|
msgid "Details for: %(object)s"
|
||||||
|
msgstr "Detalhes para: %(object)s "
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:18
|
||||||
|
#, python-format
|
||||||
|
msgid "Edit %(object_name)s:"
|
||||||
|
msgstr "Editar %(object_name)s:"
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:20
|
||||||
|
msgid "Edit"
|
||||||
|
msgstr "Editar"
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:24
|
||||||
|
#, python-format
|
||||||
|
msgid "Create new %(object_name)s"
|
||||||
|
msgstr "Criar novas %(object_name)s "
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:26
|
||||||
|
msgid "Create"
|
||||||
|
msgstr "Criar"
|
||||||
|
|
||||||
|
#: templates/generic_assign_remove.html:3
|
||||||
|
#, python-format
|
||||||
|
msgid "Assign %(title)s %(object)s"
|
||||||
|
msgstr "Atribuir %(title)s %(object)s "
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:3 templates/generic_confirm.html.py:18
|
||||||
|
msgid "Confirm"
|
||||||
|
msgstr "Confirmar"
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:16
|
||||||
|
msgid "Confirm delete"
|
||||||
|
msgstr "Confirmar exclusão"
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:32
|
||||||
|
msgid "form icon"
|
||||||
|
msgstr "ícone de formulário"
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:40
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to delete %(object_name)s: %(object)s?"
|
||||||
|
msgstr "Tem certeza de que deseja excluir %(object_name)s: %(object)s ?"
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:42
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to delete: %(object)s?"
|
||||||
|
msgstr "Tem certeza de que deseja excluir: %(object)s ?"
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:50
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Sim"
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:54
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Não"
|
||||||
|
|
||||||
|
#: templates/generic_form_instance.html:37
|
||||||
|
#: templates/generic_form_subtemplate.html:52
|
||||||
|
msgid "required"
|
||||||
|
msgstr "exigido"
|
||||||
|
|
||||||
|
#: templates/generic_form_subtemplate.html:76
|
||||||
|
#: templates/generic_form_subtemplate.html:78
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
|
#: templates/generic_list_subtemplate.html:52
|
||||||
|
#: templates/generic_list_subtemplate.html:178
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Salvar"
|
||||||
|
|
||||||
|
#: templates/generic_form_subtemplate.html:76
|
||||||
|
#: templates/generic_form_subtemplate.html:78
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
|
#: templates/generic_list_subtemplate.html:52
|
||||||
|
#: templates/generic_list_subtemplate.html:178
|
||||||
|
msgid "Submit"
|
||||||
|
msgstr "Submeter"
|
||||||
|
|
||||||
|
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
||||||
|
#, python-format
|
||||||
|
msgid "List of %(stripped_title)s"
|
||||||
|
msgstr "Lista de %(stripped_title)s "
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Lista de %(title)s (%(start)s - %(end)s de %(total)s) (Page %(page_number)s "
|
||||||
|
"of %(total_pages)s)"
|
||||||
|
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:25
|
||||||
|
#: templates/generic_list_subtemplate.html:26
|
||||||
|
#, python-format
|
||||||
|
msgid "List of %(title)s (%(total)s)"
|
||||||
|
msgstr "Lista de %(title)s (%(total)s)"
|
||||||
|
|
||||||
|
#: templates/generic_list_subtemplate.html:72
|
||||||
|
msgid "Identifier"
|
||||||
|
msgstr "Identificador"
|
||||||
|
|
||||||
|
#: templates/generic_list_subtemplate.html:152
|
||||||
|
#, python-format
|
||||||
|
msgid "There are no %(stripped_title)s"
|
||||||
|
msgstr "Não há %(stripped_title)s "
|
||||||
|
|
||||||
|
#: templates/login.html:5
|
||||||
|
msgid "Login"
|
||||||
|
msgstr "Login"
|
||||||
|
|
||||||
|
#: templates/password_change_done.html:3 templates/password_change_form.html:3
|
||||||
|
#: templates/password_change_form.html:5
|
||||||
|
msgid "Password change"
|
||||||
|
msgstr "Alterar a senha"
|
||||||
|
|
||||||
|
#~ msgid "Cancel"
|
||||||
|
#~ msgstr "Cancelar"
|
||||||
@@ -1,33 +1,332 @@
|
|||||||
# SOME DESCRIPTIVE TITLE.
|
# SOME DESCRIPTIVE TITLE.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
|
||||||
#
|
#
|
||||||
#, fuzzy
|
# Translators:
|
||||||
|
# Sergey Glita <gsv70@mail.ru>, 2011.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||||
"POT-Creation-Date: 2011-01-30 16:51+0300\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: 2011-01-30 13:08\n"
|
"PO-Revision-Date: 2011-11-22 19:21+0000\n"
|
||||||
"Last-Translator: <garison2004@gmail.com>\n"
|
"Last-Translator: gsv70 <gsv70@mail.ru>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: Russian (http://www.transifex.net/projects/p/mayan-edms/team/ru/)\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Language: \n"
|
"Language: ru\n"
|
||||||
"X-Translated-Using: django-rosetta 0.5.5\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"
|
||||||
"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"
|
|
||||||
|
|
||||||
#: views.py:6 templates/password_change_done.html:5
|
#: __init__.py:17
|
||||||
|
msgid "change password"
|
||||||
|
msgstr "Изменение пароля"
|
||||||
|
|
||||||
|
#: __init__.py:18
|
||||||
|
msgid "user details"
|
||||||
|
msgstr "сведения о пользователе"
|
||||||
|
|
||||||
|
#: __init__.py:19
|
||||||
|
msgid "edit details"
|
||||||
|
msgstr "изменение сведений"
|
||||||
|
|
||||||
|
#: __init__.py:23 __init__.py:29
|
||||||
|
msgid "about"
|
||||||
|
msgstr "инфо"
|
||||||
|
|
||||||
|
#: __init__.py:24
|
||||||
|
msgid "changelog"
|
||||||
|
msgstr "изменения"
|
||||||
|
|
||||||
|
#: __init__.py:25
|
||||||
|
msgid "license"
|
||||||
|
msgstr "лицензия"
|
||||||
|
|
||||||
|
#: forms.py:99
|
||||||
|
msgid "Selection"
|
||||||
|
msgstr "Выбор"
|
||||||
|
|
||||||
|
#: forms.py:131
|
||||||
|
msgid "Email"
|
||||||
|
msgstr "Email"
|
||||||
|
|
||||||
|
#: forms.py:142
|
||||||
|
msgid ""
|
||||||
|
"Please enter a correct email and password. Note that the password fields is "
|
||||||
|
"case-sensitive."
|
||||||
|
msgstr ""
|
||||||
|
"Пожалуйста, введите правильный адрес электронной почты и пароль с учетом "
|
||||||
|
"регистра."
|
||||||
|
|
||||||
|
#: forms.py:144
|
||||||
|
msgid "This account is inactive."
|
||||||
|
msgstr "Эта учетная запись неактивна."
|
||||||
|
|
||||||
|
#: literals.py:24
|
||||||
|
msgid "A5"
|
||||||
|
msgstr "A5"
|
||||||
|
|
||||||
|
#: literals.py:25
|
||||||
|
msgid "A4"
|
||||||
|
msgstr "A4"
|
||||||
|
|
||||||
|
#: literals.py:26
|
||||||
|
msgid "A3"
|
||||||
|
msgstr "A3"
|
||||||
|
|
||||||
|
#: literals.py:27
|
||||||
|
msgid "B5"
|
||||||
|
msgstr "B5"
|
||||||
|
|
||||||
|
#: literals.py:28
|
||||||
|
msgid "B4"
|
||||||
|
msgstr "B4"
|
||||||
|
|
||||||
|
#: literals.py:29
|
||||||
|
msgid "Letter"
|
||||||
|
msgstr "Letter"
|
||||||
|
|
||||||
|
#: literals.py:30
|
||||||
|
msgid "Legal"
|
||||||
|
msgstr "Legal"
|
||||||
|
|
||||||
|
#: literals.py:31
|
||||||
|
msgid "Ledger"
|
||||||
|
msgstr "Ledger"
|
||||||
|
|
||||||
|
#: literals.py:38
|
||||||
|
msgid "Portrait"
|
||||||
|
msgstr "Портрет"
|
||||||
|
|
||||||
|
#: literals.py:39
|
||||||
|
msgid "Landscape"
|
||||||
|
msgstr "Пейзаж"
|
||||||
|
|
||||||
|
#: utils.py:291
|
||||||
|
msgid "function found"
|
||||||
|
msgstr "функция найдена"
|
||||||
|
|
||||||
|
#: utils.py:293 utils.py:295
|
||||||
|
#, python-format
|
||||||
|
msgid "class found: %s"
|
||||||
|
msgstr "класс найден: %s."
|
||||||
|
|
||||||
|
#: views.py:24 templates/password_change_done.html:5
|
||||||
msgid "Your password has been successfully changed."
|
msgid "Your password has been successfully changed."
|
||||||
msgstr "Ваш пароль был успешно изменен."
|
msgstr "Ваш пароль был изменен."
|
||||||
|
|
||||||
|
#: views.py:41
|
||||||
|
msgid "No action selected."
|
||||||
|
msgstr "Никаких действий не выбрано."
|
||||||
|
|
||||||
|
#: views.py:45
|
||||||
|
msgid "Must select at least one item."
|
||||||
|
msgstr "Необходимо выбрать хотя бы один элемент."
|
||||||
|
|
||||||
|
#: views.py:86
|
||||||
|
#, python-format
|
||||||
|
msgid "%(selection)s added successfully added to %(right_list_title)s."
|
||||||
|
msgstr "%(selection)s успешно добавлен в %(right_list_title)s ."
|
||||||
|
|
||||||
|
#: views.py:89 views.py:106
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to add %(selection)s to %(right_list_title)s."
|
||||||
|
msgstr "Не удалось добавить %(selection)s до %(right_list_title)s ."
|
||||||
|
|
||||||
|
#: views.py:103
|
||||||
|
#, python-format
|
||||||
|
msgid "%(selection)s added successfully removed from %(right_list_title)s."
|
||||||
|
msgstr "%(selection)s успешно удален из %(right_list_title)s ."
|
||||||
|
|
||||||
|
#: views.py:121
|
||||||
|
msgid "Add"
|
||||||
|
msgstr "Добавить"
|
||||||
|
|
||||||
|
#: views.py:132
|
||||||
|
msgid "Remove"
|
||||||
|
msgstr "Удалить"
|
||||||
|
|
||||||
|
#: views.py:155
|
||||||
|
msgid "current user details"
|
||||||
|
msgstr "данные пользователя"
|
||||||
|
|
||||||
|
#: views.py:172
|
||||||
|
msgid "Current user's details updated."
|
||||||
|
msgstr "Данные пользователя обновлены."
|
||||||
|
|
||||||
|
#: views.py:181
|
||||||
|
msgid "edit current user details"
|
||||||
|
msgstr "редактировать данные пользователя"
|
||||||
|
|
||||||
|
#: views.py:207
|
||||||
|
msgid "Changelog"
|
||||||
|
msgstr "Изменения"
|
||||||
|
|
||||||
|
#: views.py:220
|
||||||
|
msgid "License"
|
||||||
|
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 ""
|
||||||
|
"Временный каталог, используемый сайтом для хранения миниатюр, превью и "
|
||||||
|
"временных файлов. Если он не указан, он будет создан с использованием "
|
||||||
|
"tempfile.mkdtemp ()"
|
||||||
|
|
||||||
|
#: conf/settings.py:65
|
||||||
|
msgid ""
|
||||||
|
"Controls the mechanism used to authenticated user. Options are: username, "
|
||||||
|
"email"
|
||||||
|
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 "Подробная информация для %(object_name)s : %(object)s"
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:13
|
||||||
|
#, python-format
|
||||||
|
msgid "Details for: %(object)s"
|
||||||
|
msgstr "Подробности: %(object)s"
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:18
|
||||||
|
#, python-format
|
||||||
|
msgid "Edit %(object_name)s:"
|
||||||
|
msgstr "Редактировать %(object_name)s :"
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:20
|
||||||
|
msgid "Edit"
|
||||||
|
msgstr "Редактировать"
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:24
|
||||||
|
#, python-format
|
||||||
|
msgid "Create new %(object_name)s"
|
||||||
|
msgstr "Создать %(object_name)s"
|
||||||
|
|
||||||
|
#: templates/calculate_form_title.html:26
|
||||||
|
msgid "Create"
|
||||||
|
msgstr "Создать"
|
||||||
|
|
||||||
|
#: templates/generic_assign_remove.html:3
|
||||||
|
#, python-format
|
||||||
|
msgid "Assign %(title)s %(object)s"
|
||||||
|
msgstr "Назначить %(title)s%(object)s"
|
||||||
|
|
||||||
|
#: 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 "Вы действительно хотите удалить %(object_name)s: %(object)s?"
|
||||||
|
|
||||||
|
#: templates/generic_confirm.html:42
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to delete: %(object)s?"
|
||||||
|
msgstr "Вы действительно хотите удалить: %(object)s?"
|
||||||
|
|
||||||
|
#: 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:52
|
||||||
|
msgid "required"
|
||||||
|
msgstr "требуется"
|
||||||
|
|
||||||
|
#: templates/generic_form_subtemplate.html:76
|
||||||
|
#: templates/generic_form_subtemplate.html:78
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
|
#: templates/generic_list_subtemplate.html:52
|
||||||
|
#: templates/generic_list_subtemplate.html:178
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Сохранить"
|
||||||
|
|
||||||
|
#: templates/generic_form_subtemplate.html:76
|
||||||
|
#: templates/generic_form_subtemplate.html:78
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:51
|
||||||
|
#: templates/generic_list_horizontal_subtemplate.html:178
|
||||||
|
#: templates/generic_list_subtemplate.html:52
|
||||||
|
#: templates/generic_list_subtemplate.html:178
|
||||||
|
msgid "Submit"
|
||||||
|
msgstr "Выполнить"
|
||||||
|
|
||||||
|
#: templates/generic_list.html:6 templates/generic_list_horizontal.html:6
|
||||||
|
#, python-format
|
||||||
|
msgid "List of %(stripped_title)s"
|
||||||
|
msgstr "Список \"%(stripped_title)s\""
|
||||||
|
|
||||||
|
#: 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 ""
|
||||||
|
"Список %(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
|
||||||
|
#, python-format
|
||||||
|
msgid "List of %(title)s (%(total)s)"
|
||||||
|
msgstr "Список %(title)s (%(total)s)"
|
||||||
|
|
||||||
|
#: 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 "Нет %(stripped_title)s"
|
||||||
|
|
||||||
#: templates/login.html:5
|
#: templates/login.html:5
|
||||||
msgid "Login"
|
msgid "Login"
|
||||||
msgstr "Логин"
|
msgstr "Войти"
|
||||||
|
|
||||||
#: templates/password_change_done.html:3 templates/password_change_form.html:3
|
#: templates/password_change_done.html:3 templates/password_change_form.html:3
|
||||||
#: templates/password_change_form.html:5
|
#: templates/password_change_form.html:5
|
||||||
msgid "Password change"
|
msgid "Password change"
|
||||||
msgstr "Сменить пароль"
|
msgstr "Изменение пароля"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
<input name="next" type="hidden" value="{{ next }}" />
|
<input name="next" type="hidden" value="{{ next }}" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if previous %}
|
||||||
|
<input name="previous" type="hidden" value="{{ previous }}" />
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div style="float: left; margin-right: 10px;">
|
<div style="float: left; margin-right: 10px;">
|
||||||
<img style="margin-top: 12px;" src="{{ STATIC_URL }}images/icons/{{ form_icon|default:'question.png' }}" alt="{% trans 'form icon' %}" />
|
<img style="margin-top: 12px;" src="{{ STATIC_URL }}images/icons/{{ form_icon|default:'question.png' }}" alt="{% trans 'form icon' %}" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import os
|
|||||||
import re
|
import re
|
||||||
import types
|
import types
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import string
|
||||||
|
import random
|
||||||
|
|
||||||
from django.utils.http import urlquote as django_urlquote
|
from django.utils.http import urlquote as django_urlquote
|
||||||
from django.utils.http import urlencode as django_urlencode
|
from django.utils.http import urlencode as django_urlencode
|
||||||
@@ -358,8 +360,13 @@ def validate_path(path):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def encapsulate(function):
|
def encapsulate(function):
|
||||||
# Workaround Django ticket 15791
|
# Workaround Django ticket 15791
|
||||||
# Changeset 16045
|
# Changeset 16045
|
||||||
# http://stackoverflow.com/questions/6861601/cannot-resolve-callable-context-variable/6955045#6955045
|
# http://stackoverflow.com/questions/6861601/cannot-resolve-callable-context-variable/6955045#6955045
|
||||||
return lambda: function
|
return lambda: function
|
||||||
|
|
||||||
|
|
||||||
|
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
|
||||||
|
return ''.join(random.choice(chars) for x in range(size))
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import hashlib
|
|||||||
|
|
||||||
from common.conf.settings import TEMPORARY_DIRECTORY
|
from common.conf.settings import TEMPORARY_DIRECTORY
|
||||||
|
|
||||||
from converter.conf.settings import UNOCONV_PATH
|
|
||||||
from converter.exceptions import OfficeConversionError
|
|
||||||
from converter.literals import DEFAULT_PAGE_NUMBER, \
|
from converter.literals import DEFAULT_PAGE_NUMBER, \
|
||||||
DEFAULT_ZOOM_LEVEL, DEFAULT_ROTATION, DEFAULT_FILE_FORMAT
|
DEFAULT_ZOOM_LEVEL, DEFAULT_ROTATION, DEFAULT_FILE_FORMAT
|
||||||
|
|
||||||
@@ -16,27 +14,11 @@ from converter.literals import TRANSFORMATION_RESIZE, \
|
|||||||
from converter.literals import DIMENSION_SEPARATOR
|
from converter.literals import DIMENSION_SEPARATOR
|
||||||
from converter.literals import FILE_FORMATS
|
from converter.literals import FILE_FORMATS
|
||||||
from converter.utils import cleanup
|
from converter.utils import cleanup
|
||||||
|
from converter.runtime import office_converter
|
||||||
|
from converter.exceptions import OfficeConversionError
|
||||||
|
|
||||||
HASH_FUNCTION = lambda x: hashlib.sha256(x).hexdigest()
|
HASH_FUNCTION = lambda x: hashlib.sha256(x).hexdigest()
|
||||||
|
|
||||||
CONVERTER_OFFICE_FILE_EXTENSIONS = [
|
|
||||||
u'ods', u'docx', u'doc'
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def execute_unoconv(input_filepath, arguments=''):
|
|
||||||
"""
|
|
||||||
Executes the program unoconv using subprocess's Popen
|
|
||||||
"""
|
|
||||||
command = []
|
|
||||||
command.append(UNOCONV_PATH)
|
|
||||||
command.extend(unicode(arguments).split())
|
|
||||||
command.append(input_filepath)
|
|
||||||
proc = subprocess.Popen(command, close_fds=True, stderr=subprocess.PIPE)
|
|
||||||
return_code = proc.wait()
|
|
||||||
if return_code != 0:
|
|
||||||
raise OfficeConversionError(proc.stderr.readline())
|
|
||||||
|
|
||||||
|
|
||||||
def cache_cleanup(input_filepath, *args, **kwargs):
|
def cache_cleanup(input_filepath, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
@@ -53,14 +35,7 @@ def create_image_cache_filename(input_filepath, *args, **kwargs):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def convert_office_document(input_filepath):
|
def convert(input_filepath, output_filepath=None, cleanup_files=False, mimetype=None, *args, **kwargs):
|
||||||
if os.path.exists(UNOCONV_PATH):
|
|
||||||
execute_unoconv(input_filepath, arguments='-f pdf')
|
|
||||||
return input_filepath + u'.pdf'
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def convert(input_filepath, output_filepath=None, cleanup_files=False, *args, **kwargs):
|
|
||||||
size = kwargs.get('size')
|
size = kwargs.get('size')
|
||||||
file_format = kwargs.get('file_format', DEFAULT_FILE_FORMAT)
|
file_format = kwargs.get('file_format', DEFAULT_FILE_FORMAT)
|
||||||
zoom = kwargs.get('zoom', DEFAULT_ZOOM_LEVEL)
|
zoom = kwargs.get('zoom', DEFAULT_ZOOM_LEVEL)
|
||||||
@@ -68,7 +43,8 @@ def convert(input_filepath, output_filepath=None, cleanup_files=False, *args, **
|
|||||||
page = kwargs.get('page', DEFAULT_PAGE_NUMBER)
|
page = kwargs.get('page', DEFAULT_PAGE_NUMBER)
|
||||||
transformations = kwargs.get('transformations', [])
|
transformations = kwargs.get('transformations', [])
|
||||||
|
|
||||||
unoconv_output = None
|
if transformations is None:
|
||||||
|
transformations = []
|
||||||
|
|
||||||
if output_filepath is None:
|
if output_filepath is None:
|
||||||
output_filepath = create_image_cache_filename(input_filepath, *args, **kwargs)
|
output_filepath = create_image_cache_filename(input_filepath, *args, **kwargs)
|
||||||
@@ -76,12 +52,18 @@ def convert(input_filepath, output_filepath=None, cleanup_files=False, *args, **
|
|||||||
if os.path.exists(output_filepath):
|
if os.path.exists(output_filepath):
|
||||||
return output_filepath
|
return output_filepath
|
||||||
|
|
||||||
path, extension = os.path.splitext(input_filepath)
|
if office_converter:
|
||||||
if extension[1:].lower() in CONVERTER_OFFICE_FILE_EXTENSIONS:
|
try:
|
||||||
result = convert_office_document(input_filepath)
|
office_converter.convert(input_filepath, mimetype=mimetype)
|
||||||
if result:
|
if office_converter.exists:
|
||||||
unoconv_output = result
|
input_filepath = office_converter.output_filepath
|
||||||
input_filepath = result
|
mimetype = 'application/pdf'
|
||||||
|
else:
|
||||||
|
# Recycle the already detected mimetype
|
||||||
|
mimetype = office_converter.mimetype
|
||||||
|
|
||||||
|
except OfficeConversionError:
|
||||||
|
raise UnknownFileFormat('office converter exception')
|
||||||
|
|
||||||
if size:
|
if size:
|
||||||
transformations.append(
|
transformations.append(
|
||||||
@@ -108,20 +90,27 @@ def convert(input_filepath, output_filepath=None, cleanup_files=False, *args, **
|
|||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
backend.convert_file(input_filepath=input_filepath, output_filepath=output_filepath, transformations=transformations, page=page, file_format=file_format)
|
backend.convert_file(input_filepath=input_filepath, output_filepath=output_filepath, transformations=transformations, page=page, file_format=file_format, mimetype=mimetype)
|
||||||
finally:
|
finally:
|
||||||
if cleanup_files:
|
if cleanup_files:
|
||||||
cleanup(input_filepath)
|
cleanup(input_filepath)
|
||||||
if unoconv_output:
|
|
||||||
cleanup(unoconv_output)
|
|
||||||
|
|
||||||
return output_filepath
|
return output_filepath
|
||||||
|
|
||||||
|
|
||||||
def get_page_count(input_filepath):
|
def get_page_count(input_filepath):
|
||||||
|
if office_converter:
|
||||||
|
try:
|
||||||
|
office_converter.convert(input_filepath)
|
||||||
|
if office_converter.exists:
|
||||||
|
input_filepath = office_converter.output_filepath
|
||||||
|
|
||||||
|
except OfficeConversionError:
|
||||||
|
raise UnknownFileFormat('office converter exception')
|
||||||
|
|
||||||
return backend.get_page_count(input_filepath)
|
return backend.get_page_count(input_filepath)
|
||||||
|
|
||||||
|
'''
|
||||||
def get_document_dimensions(document, *args, **kwargs):
|
def get_document_dimensions(document, *args, **kwargs):
|
||||||
document_filepath = create_image_cache_filename(document.checksum, *args, **kwargs)
|
document_filepath = create_image_cache_filename(document.checksum, *args, **kwargs)
|
||||||
if os.path.exists(document_filepath):
|
if os.path.exists(document_filepath):
|
||||||
@@ -129,7 +118,7 @@ def get_document_dimensions(document, *args, **kwargs):
|
|||||||
return [int(dimension) for dimension in backend.identify_file(unicode(document_filepath), options).split()]
|
return [int(dimension) for dimension in backend.identify_file(unicode(document_filepath), options).split()]
|
||||||
else:
|
else:
|
||||||
return [0, 0]
|
return [0, 0]
|
||||||
|
'''
|
||||||
|
|
||||||
def get_available_transformations_choices():
|
def get_available_transformations_choices():
|
||||||
result = []
|
result = []
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class ConverterClass(ConverterBase):
|
|||||||
raise IdentifyError(proc.stderr.readline())
|
raise IdentifyError(proc.stderr.readline())
|
||||||
return proc.stdout.read()
|
return proc.stdout.read()
|
||||||
|
|
||||||
def convert_file(self, input_filepath, output_filepath, transformations=None, page=DEFAULT_PAGE_NUMBER, file_format=DEFAULT_FILE_FORMAT):
|
def convert_file(self, input_filepath, output_filepath, transformations=None, page=DEFAULT_PAGE_NUMBER, file_format=DEFAULT_FILE_FORMAT, **kwargs):
|
||||||
arguments = []
|
arguments = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class ConverterClass(ConverterBase):
|
|||||||
raise IdentifyError(proc.stderr.readline())
|
raise IdentifyError(proc.stderr.readline())
|
||||||
return proc.stdout.read()
|
return proc.stdout.read()
|
||||||
|
|
||||||
def convert_file(self, input_filepath, output_filepath, transformations=None, page=DEFAULT_PAGE_NUMBER, file_format=DEFAULT_FILE_FORMAT):
|
def convert_file(self, input_filepath, output_filepath, transformations=None, page=DEFAULT_PAGE_NUMBER, file_format=DEFAULT_FILE_FORMAT, **kwargs):
|
||||||
arguments = []
|
arguments = []
|
||||||
try:
|
try:
|
||||||
if transformations:
|
if transformations:
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class ConverterClass(ConverterBase):
|
|||||||
def get_page_count(self, input_filepath):
|
def get_page_count(self, input_filepath):
|
||||||
page_count = 1
|
page_count = 1
|
||||||
|
|
||||||
mimetype, encoding = get_mimetype(input_filepath)
|
mimetype, encoding = get_mimetype(open(input_filepath, 'rb'), input_filepath, mimetype_only=True)
|
||||||
if mimetype == 'application/pdf':
|
if mimetype == 'application/pdf':
|
||||||
# If file is a PDF open it with slate to determine the page
|
# If file is a PDF open it with slate to determine the page
|
||||||
# count
|
# count
|
||||||
@@ -48,9 +48,12 @@ class ConverterClass(ConverterBase):
|
|||||||
|
|
||||||
return page_count
|
return page_count
|
||||||
|
|
||||||
def convert_file(self, input_filepath, output_filepath, transformations=None, page=DEFAULT_PAGE_NUMBER, file_format=DEFAULT_FILE_FORMAT):
|
def convert_file(self, input_filepath, output_filepath, transformations=None, page=DEFAULT_PAGE_NUMBER, file_format=DEFAULT_FILE_FORMAT, **kwargs):
|
||||||
tmpfile = None
|
tmpfile = None
|
||||||
mimetype, encoding = get_mimetype(input_filepath)
|
mimetype = kwargs.get('mimetype', None)
|
||||||
|
if not mimetype:
|
||||||
|
mimetype, encoding = get_mimetype(open(input_filepath, 'rb'), input_filepath, mimetype_only=True)
|
||||||
|
|
||||||
if mimetype == 'application/pdf' and USE_GHOSTSCRIPT:
|
if mimetype == 'application/pdf' and USE_GHOSTSCRIPT:
|
||||||
# If file is a PDF open it with ghostscript and convert it to
|
# If file is a PDF open it with ghostscript and convert it to
|
||||||
# TIFF
|
# TIFF
|
||||||
@@ -64,7 +67,7 @@ class ConverterClass(ConverterBase):
|
|||||||
'gs', '-q', '-dQUIET', '-dSAFER', '-dBATCH',
|
'gs', '-q', '-dQUIET', '-dSAFER', '-dBATCH',
|
||||||
'-dNOPAUSE', '-dNOPROMPT',
|
'-dNOPAUSE', '-dNOPROMPT',
|
||||||
first_page_tmpl, last_page_tmpl,
|
first_page_tmpl, last_page_tmpl,
|
||||||
'-sDEVICE=jpeg', '-dJPEGQ=75',
|
'-sDEVICE=jpeg', '-dJPEGQ=95',
|
||||||
'-r150', output_file_tmpl,
|
'-r150', output_file_tmpl,
|
||||||
input_file_tmpl,
|
input_file_tmpl,
|
||||||
'-c "60000000 setvmthreshold"', # use 30MB
|
'-c "60000000 setvmthreshold"', # use 30MB
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
"""Configuration options for the converter app"""
|
'''Configuration options for the converter app'''
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from smart_settings.api import register_settings
|
from smart_settings.api import register_settings
|
||||||
@@ -12,7 +13,9 @@ register_settings(
|
|||||||
{'name': u'GM_PATH', 'global_name': u'CONVERTER_GM_PATH', 'default': u'/usr/bin/gm', 'description': _(u'File path to graphicsmagick\'s program.'), 'exists': True},
|
{'name': u'GM_PATH', 'global_name': u'CONVERTER_GM_PATH', 'default': u'/usr/bin/gm', 'description': _(u'File path to graphicsmagick\'s program.'), 'exists': True},
|
||||||
{'name': u'GM_SETTINGS', 'global_name': u'CONVERTER_GM_SETTINGS', 'default': u''},
|
{'name': u'GM_SETTINGS', 'global_name': u'CONVERTER_GM_SETTINGS', 'default': u''},
|
||||||
{'name': u'GRAPHICS_BACKEND', 'global_name': u'CONVERTER_GRAPHICS_BACKEND', 'default': u'converter.backends.python', 'description': _(u'Graphics conversion backend to use. Options are: converter.backends.imagemagick, converter.backends.graphicsmagick and converter.backends.python.')},
|
{'name': u'GRAPHICS_BACKEND', 'global_name': u'CONVERTER_GRAPHICS_BACKEND', 'default': u'converter.backends.python', 'description': _(u'Graphics conversion backend to use. Options are: converter.backends.imagemagick, converter.backends.graphicsmagick and converter.backends.python.')},
|
||||||
{'name': u'UNOCONV_PATH', 'global_name': u'CONVERTER_UNOCONV_PATH', 'default': u'/usr/bin/unoconv', 'exists': True},
|
{'name': u'UNOCONV_PATH', 'global_name': u'CONVERTER_UNOCONV_PATH', 'default': u'/usr/bin/unoconv', 'exists': True, 'description': _(u'Path to the unoconv program.')},
|
||||||
|
{'name': u'UNOCONV_USE_PIPE', 'global_name': u'CONVERTER_UNOCONV_USE_PIPE', 'default': True, 'description': _(u'Use alternate method of connection to LibreOffice using a pipe, it is slower but less prone to segmentation faults.')},
|
||||||
|
|
||||||
#{'name': u'OCR_OPTIONS', 'global_name': u'CONVERTER_OCR_OPTIONS', 'default': u'-colorspace Gray -depth 8 -resample 200x200'},
|
#{'name': u'OCR_OPTIONS', 'global_name': u'CONVERTER_OCR_OPTIONS', 'default': u'-colorspace Gray -depth 8 -resample 200x200'},
|
||||||
#{'name': u'HIGH_QUALITY_OPTIONS', 'global_name': u'CONVERTER_HIGH_QUALITY_OPTIONS', 'default': u'-density 400'},
|
#{'name': u'HIGH_QUALITY_OPTIONS', 'global_name': u'CONVERTER_HIGH_QUALITY_OPTIONS', 'default': u'-density 400'},
|
||||||
#{'name': u'PRINT_QUALITY_OPTIONS', 'global_name': u'CONVERTER_PRINT_QUALITY_OPTIONS', 'default': u'-density 500'},
|
#{'name': u'PRINT_QUALITY_OPTIONS', 'global_name': u'CONVERTER_PRINT_QUALITY_OPTIONS', 'default': u'-density 500'},
|
||||||
|
|||||||
@@ -29,3 +29,7 @@ class UnkownConvertError(ConvertError):
|
|||||||
|
|
||||||
class OfficeConversionError(ConvertError):
|
class OfficeConversionError(ConvertError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class OfficeBackendError(OfficeConversionError):
|
||||||
|
pass
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ DEFAULT_ZOOM_LEVEL = 100
|
|||||||
DEFAULT_ROTATION = 0
|
DEFAULT_ROTATION = 0
|
||||||
DEFAULT_PAGE_NUMBER = 1
|
DEFAULT_PAGE_NUMBER = 1
|
||||||
DEFAULT_FILE_FORMAT = u'jpeg'
|
DEFAULT_FILE_FORMAT = u'jpeg'
|
||||||
|
DEFAULT_FILE_FORMAT_MIMETYPE = u'image/jpeg'
|
||||||
|
|
||||||
DIMENSION_SEPARATOR = u'x'
|
DIMENSION_SEPARATOR = u'x'
|
||||||
|
|
||||||
|
|||||||
BIN
apps/converter/locale/pt/LC_MESSAGES/django.mo
Normal file
945
apps/converter/locale/pt/LC_MESSAGES/django.po
Normal file
BIN
apps/converter/locale/ru/LC_MESSAGES/django.mo
Normal file
948
apps/converter/locale/ru/LC_MESSAGES/django.po
Normal file
118
apps/converter/office_converter.py
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from mimetype.api import get_mimetype
|
||||||
|
from common.conf.settings import TEMPORARY_DIRECTORY
|
||||||
|
from common.utils import id_generator
|
||||||
|
|
||||||
|
from converter.conf.settings import UNOCONV_PATH, UNOCONV_USE_PIPE
|
||||||
|
from converter.exceptions import (OfficeConversionError,
|
||||||
|
OfficeBackendError, UnknownFileFormat)
|
||||||
|
|
||||||
|
CACHED_FILE_SUFFIX = u'_office_converter'
|
||||||
|
|
||||||
|
CONVERTER_OFFICE_FILE_MIMETYPES = [
|
||||||
|
u'application/msword',
|
||||||
|
u'application/mswrite',
|
||||||
|
u'application/mspowerpoint',
|
||||||
|
u'application/msexcel',
|
||||||
|
u'application/vnd.ms-excel',
|
||||||
|
u'application/vnd.ms-powerpoint',
|
||||||
|
u'application/vnd.oasis.opendocument.presentation',
|
||||||
|
u'application/vnd.oasis.opendocument.text',
|
||||||
|
u'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
u'application/vnd.oasis.opendocument.spreadsheet',
|
||||||
|
u'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
|
u'application/vnd.oasis.opendocument.graphics',
|
||||||
|
u'application/vnd.ms-office',
|
||||||
|
u'text/plain',
|
||||||
|
u'text/rtf',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class OfficeConverter(object):
|
||||||
|
def __init__(self):
|
||||||
|
self.backend_class = OfficeConverterBackendUnoconv
|
||||||
|
self.backend = self.backend_class()
|
||||||
|
self.exists = False
|
||||||
|
self.mimetype = None
|
||||||
|
self.encoding = None
|
||||||
|
|
||||||
|
def mimetypes(self):
|
||||||
|
return CONVERTER_OFFICE_FILE_MIMETYPES
|
||||||
|
|
||||||
|
def convert(self, input_filepath, mimetype=None):
|
||||||
|
self.exists = False
|
||||||
|
self.mimetype = None
|
||||||
|
self.encoding = None
|
||||||
|
|
||||||
|
self.input_filepath = input_filepath
|
||||||
|
|
||||||
|
# Make sure file is of a known office format
|
||||||
|
if mimetype:
|
||||||
|
self.mimetype = mimetype
|
||||||
|
else:
|
||||||
|
self.mimetype, self.encoding = get_mimetype(open(self.input_filepath), self.input_filepath, mimetype_only=True)
|
||||||
|
|
||||||
|
if self.mimetype in CONVERTER_OFFICE_FILE_MIMETYPES:
|
||||||
|
# Cache results of conversion
|
||||||
|
self.output_filepath = os.path.join(TEMPORARY_DIRECTORY, u''.join([self.input_filepath, CACHED_FILE_SUFFIX]))
|
||||||
|
self.exists = os.path.exists(self.output_filepath)
|
||||||
|
if not self.exists:
|
||||||
|
try:
|
||||||
|
self.backend.convert(self.input_filepath, self.output_filepath)
|
||||||
|
self.exists = True
|
||||||
|
except OfficeBackendError, msg:
|
||||||
|
# convert exception so that at least the mime type icon is displayed
|
||||||
|
raise UnknownFileFormat(msg)
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return getattr(self, 'output_filepath', None)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return str(self.__unicode__())
|
||||||
|
|
||||||
|
|
||||||
|
class OfficeConverterBackendUnoconv(object):
|
||||||
|
def __init__(self):
|
||||||
|
self.unoconv_path = UNOCONV_PATH if UNOCONV_PATH else u'/usr/bin/unoconv'
|
||||||
|
if not os.path.exists(self.unoconv_path):
|
||||||
|
raise OfficeBackendError('cannot find unoconv executable')
|
||||||
|
|
||||||
|
def convert(self, input_filepath, output_filepath):
|
||||||
|
'''
|
||||||
|
Executes the program unoconv using subprocess's Popen
|
||||||
|
'''
|
||||||
|
self.input_filepath = input_filepath
|
||||||
|
self.output_filepath = output_filepath
|
||||||
|
|
||||||
|
command = []
|
||||||
|
command.append(self.unoconv_path)
|
||||||
|
|
||||||
|
if UNOCONV_USE_PIPE:
|
||||||
|
command.append(u'--pipe')
|
||||||
|
command.append(u'mayan-%s' % id_generator())
|
||||||
|
|
||||||
|
command.append(u'--format')
|
||||||
|
command.append(u'pdf')
|
||||||
|
command.append(u'--output')
|
||||||
|
command.append(self.output_filepath)
|
||||||
|
command.append(self.input_filepath)
|
||||||
|
|
||||||
|
try:
|
||||||
|
proc = subprocess.Popen(command, close_fds=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
|
||||||
|
return_code = proc.wait()
|
||||||
|
logger.debug('return_code: %s' % return_code)
|
||||||
|
|
||||||
|
readline = proc.stderr.readline()
|
||||||
|
logger.debug('stderr: %s' % readline)
|
||||||
|
if return_code != 0:
|
||||||
|
raise OfficeBackendError(readline)
|
||||||
|
except OSError, msg:
|
||||||
|
raise OfficeBackendError(msg)
|
||||||
|
except Exception, msg:
|
||||||
|
logger.error('Unhandled exception', exc_info=msg)
|
||||||
8
apps/converter/runtime.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from converter.office_converter import OfficeConverter
|
||||||
|
from converter.exceptions import OfficeBackendError
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
office_converter = OfficeConverter()
|
||||||
|
except OfficeBackendError:
|
||||||
|
office_converter = None
|
||||||
46
apps/django_gpg/__init__.py
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from documents.models import Document
|
||||||
|
from navigation.api import register_links, register_top_menu, \
|
||||||
|
register_model_list_columns, register_multi_item_links, \
|
||||||
|
register_sidebar_template
|
||||||
|
from main.api import register_diagnostic, register_maintenance_links
|
||||||
|
from permissions.api import register_permission, set_namespace_title
|
||||||
|
from project_setup.api import register_setup
|
||||||
|
from hkp import Key as KeyServerKey
|
||||||
|
|
||||||
|
from django_gpg.api import Key
|
||||||
|
|
||||||
|
PERMISSION_DOCUMENT_VERIFY = {'namespace': 'django_gpg', 'name': 'document_verify', 'label': _(u'Verify document signatures')}
|
||||||
|
PERMISSION_KEY_VIEW = {'namespace': 'django_gpg', 'name': 'key_view', 'label': _(u'View keys')}
|
||||||
|
PERMISSION_KEY_DELETE = {'namespace': 'django_gpg', 'name': 'key_delete', 'label': _(u'Delete keys')}
|
||||||
|
PERMISSION_KEYSERVER_QUERY = {'namespace': 'django_gpg', 'name': 'keyserver_query', 'label': _(u'Query keyservers')}
|
||||||
|
PERMISSION_KEY_RECEIVE = {'namespace': 'django_gpg', 'name': 'key_receive', 'label': _(u'Import key from keyservers')}
|
||||||
|
|
||||||
|
# Permission setup
|
||||||
|
set_namespace_title('django_gpg', _(u'Signatures'))
|
||||||
|
register_permission(PERMISSION_DOCUMENT_VERIFY)
|
||||||
|
register_permission(PERMISSION_KEY_VIEW)
|
||||||
|
register_permission(PERMISSION_KEY_DELETE)
|
||||||
|
register_permission(PERMISSION_KEYSERVER_QUERY)
|
||||||
|
register_permission(PERMISSION_KEY_RECEIVE)
|
||||||
|
|
||||||
|
# Setup views
|
||||||
|
private_keys = {'text': _(u'private keys'), 'view': 'key_private_list', 'args': 'object.pk', 'famfam': 'key', 'icon': 'key.png', 'permissions': [PERMISSION_KEY_VIEW]}
|
||||||
|
public_keys = {'text': _(u'public keys'), 'view': 'key_public_list', 'args': 'object.pk', 'famfam': 'key', 'icon': 'key.png', 'permissions': [PERMISSION_KEY_VIEW]}
|
||||||
|
key_delete = {'text': _(u'delete'), 'view': 'key_delete', 'args': ['object.fingerprint', 'object.type'], 'famfam': 'key_delete', 'permissions': [PERMISSION_KEY_DELETE]}
|
||||||
|
key_query = {'text': _(u'Query keyservers'), 'view': 'key_query', 'famfam': 'zoom', 'permissions': [PERMISSION_KEYSERVER_QUERY]}
|
||||||
|
key_receive = {'text': _(u'Import'), 'view': 'key_receive', 'args': 'object.keyid', 'famfam': 'key_add', 'keep_query': True, 'permissions': [PERMISSION_KEY_RECEIVE]}
|
||||||
|
|
||||||
|
# Document views
|
||||||
|
document_verify = {'text': _(u'signatures'), 'view': 'document_verify', 'args': 'object.pk', 'famfam': 'text_signature', 'permissions': [PERMISSION_DOCUMENT_VERIFY]}
|
||||||
|
|
||||||
|
register_links(Document, [document_verify], menu_name='form_header')
|
||||||
|
|
||||||
|
register_links(['key_delete', 'key_private_list', 'key_public_list', 'key_query'], [private_keys, public_keys, key_query], menu_name='sidebar')
|
||||||
|
|
||||||
|
register_links(Key, [key_delete])
|
||||||
|
register_links(KeyServerKey, [key_receive])
|
||||||
|
|
||||||
|
register_setup(private_keys)
|
||||||
|
register_setup(public_keys)
|
||||||
331
apps/django_gpg/api.py
Normal file
@@ -0,0 +1,331 @@
|
|||||||
|
import types
|
||||||
|
from StringIO import StringIO
|
||||||
|
from pickle import dumps
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from django.core.files.base import File
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.utils.http import urlquote_plus
|
||||||
|
|
||||||
|
from hkp import KeyServer
|
||||||
|
import gnupg
|
||||||
|
|
||||||
|
from django_gpg.exceptions import (GPGVerificationError, GPGSigningError,
|
||||||
|
GPGDecryptionError, KeyDeleteError, KeyGenerationError,
|
||||||
|
KeyFetchingError, KeyDoesNotExist, KeyImportError)
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
KEY_TYPES = {
|
||||||
|
'pub': _(u'Public'),
|
||||||
|
'sec': _(u'Secret'),
|
||||||
|
}
|
||||||
|
|
||||||
|
KEY_CLASS_RSA = 'RSA'
|
||||||
|
KEY_CLASS_DSA = 'DSA'
|
||||||
|
KEY_CLASS_ELG = 'ELG-E'
|
||||||
|
|
||||||
|
KEY_PRIMARY_CLASSES = (
|
||||||
|
((KEY_CLASS_RSA), _(u'RSA')),
|
||||||
|
((KEY_CLASS_DSA), _(u'DSA')),
|
||||||
|
)
|
||||||
|
|
||||||
|
KEY_SECONDARY_CLASSES = (
|
||||||
|
((KEY_CLASS_RSA), _(u'RSA')),
|
||||||
|
((KEY_CLASS_ELG), _(u'Elgamal')),
|
||||||
|
)
|
||||||
|
|
||||||
|
KEYSERVER_DEFAULT_PORT = 11371
|
||||||
|
|
||||||
|
SIGNATURE_STATE_BAD = 'signature bad'
|
||||||
|
SIGNATURE_STATE_NONE = None
|
||||||
|
SIGNATURE_STATE_ERROR = 'signature error'
|
||||||
|
SIGNATURE_STATE_NO_PUBLIC_KEY = 'no public key'
|
||||||
|
SIGNATURE_STATE_GOOD = 'signature good'
|
||||||
|
SIGNATURE_STATE_VALID = 'signature valid'
|
||||||
|
|
||||||
|
SIGNATURE_STATES = {
|
||||||
|
SIGNATURE_STATE_BAD: {
|
||||||
|
'text': _(u'Bad signature.'),
|
||||||
|
'icon': 'cross.png'
|
||||||
|
},
|
||||||
|
SIGNATURE_STATE_NONE: {
|
||||||
|
'text': _(u'Document not signed or invalid signature.'),
|
||||||
|
'icon': 'cross.png'
|
||||||
|
},
|
||||||
|
SIGNATURE_STATE_ERROR: {
|
||||||
|
'text': _(u'Signature error.'),
|
||||||
|
'icon': 'cross.png'
|
||||||
|
},
|
||||||
|
SIGNATURE_STATE_NO_PUBLIC_KEY: {
|
||||||
|
'text': _(u'Document is signed but no public key is available for verification.'),
|
||||||
|
'icon': 'user_silhouette.png'
|
||||||
|
},
|
||||||
|
SIGNATURE_STATE_GOOD: {
|
||||||
|
'text': _(u'Document is signed, and signature is good.'),
|
||||||
|
'icon': 'document_signature.png'
|
||||||
|
},
|
||||||
|
SIGNATURE_STATE_VALID: {
|
||||||
|
'text': _(u'Document is signed with a valid signature.'),
|
||||||
|
'icon': 'document_signature.png'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Key(object):
|
||||||
|
@staticmethod
|
||||||
|
def get_key_id(fingerprint):
|
||||||
|
return fingerprint[-16:]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_all(cls, gpg, secret=False, exclude=None):
|
||||||
|
result = []
|
||||||
|
keys = gpg.gpg.list_keys(secret=secret)
|
||||||
|
if exclude:
|
||||||
|
excluded_id = exclude.key_id
|
||||||
|
else:
|
||||||
|
excluded_id = u''
|
||||||
|
for key in keys:
|
||||||
|
if not key['keyid'] in excluded_id:
|
||||||
|
key_instance = Key(
|
||||||
|
fingerprint=key['fingerprint'],
|
||||||
|
uids=key['uids'],
|
||||||
|
type=key['type'],
|
||||||
|
data=gpg.gpg.export_keys([key['keyid']], secret=secret)
|
||||||
|
)
|
||||||
|
result.append(key_instance)
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get(cls, gpg, key_id, secret=False, search_keyservers=False):
|
||||||
|
if len(key_id) > 16:
|
||||||
|
# key_id is a fingerprint
|
||||||
|
key_id = Key.get_key_id(key_id)
|
||||||
|
|
||||||
|
keys = gpg.gpg.list_keys(secret=secret)
|
||||||
|
key = next((key for key in keys if key['keyid'] == key_id), None)
|
||||||
|
if not key:
|
||||||
|
if search_keyservers and secret==False:
|
||||||
|
try:
|
||||||
|
gpg.receive_key(key_id)
|
||||||
|
return Key(gpg, key_id)
|
||||||
|
except KeyFetchingError:
|
||||||
|
raise KeyDoesNotExist
|
||||||
|
else:
|
||||||
|
raise KeyDoesNotExist
|
||||||
|
|
||||||
|
key_instance = Key(
|
||||||
|
fingerprint=key['fingerprint'],
|
||||||
|
uids=key['uids'],
|
||||||
|
type=key['type'],
|
||||||
|
data=gpg.gpg.export_keys([key['keyid']], secret=secret)
|
||||||
|
)
|
||||||
|
|
||||||
|
return key_instance
|
||||||
|
|
||||||
|
def __init__(self, fingerprint, uids, type, data):
|
||||||
|
self.fingerprint = fingerprint
|
||||||
|
self.uids = uids
|
||||||
|
self.type = type
|
||||||
|
self.data = data
|
||||||
|
|
||||||
|
@property
|
||||||
|
def key_id(self):
|
||||||
|
return Key.get_key_id(self.fingerprint)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def user_ids(self):
|
||||||
|
return u', '.join(self.uids)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return '%s "%s" (%s)' % (self.key_id, self.user_ids, KEY_TYPES.get(self.type, _(u'unknown')))
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return unicode(self.__str__())
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return self.__unicode__()
|
||||||
|
|
||||||
|
|
||||||
|
class GPG(object):
|
||||||
|
def __init__(self, binary_path=None, home=None, keyring=None, keyservers=None):
|
||||||
|
kwargs = {}
|
||||||
|
if binary_path:
|
||||||
|
kwargs['gpgbinary'] = binary_path
|
||||||
|
|
||||||
|
if home:
|
||||||
|
kwargs['gnupghome'] = home
|
||||||
|
|
||||||
|
if keyring:
|
||||||
|
kwargs['keyring'] = keyring
|
||||||
|
|
||||||
|
self.keyservers = keyservers
|
||||||
|
|
||||||
|
self.gpg = gnupg.GPG(**kwargs)
|
||||||
|
|
||||||
|
def verify_w_retry(self, file_input):
|
||||||
|
if isinstance(file_input, types.StringTypes):
|
||||||
|
input_descriptor = open(file_input, 'rb')
|
||||||
|
elif isinstance(file_input, types.FileType) or isinstance(file_input, File):
|
||||||
|
input_descriptor = file_input
|
||||||
|
elif issubclass(file_input.__class__, StringIO):
|
||||||
|
input_descriptor = file_input
|
||||||
|
else:
|
||||||
|
raise ValueError('Invalid file_input argument type')
|
||||||
|
|
||||||
|
try:
|
||||||
|
verify = self.verify_file(input_descriptor)
|
||||||
|
if verify.status == 'no public key':
|
||||||
|
# Try to fetch the public key from the keyservers
|
||||||
|
try:
|
||||||
|
self.receive_key(verify.key_id)
|
||||||
|
return self.verify_w_retry(file_input)
|
||||||
|
except KeyFetchingError:
|
||||||
|
return verify
|
||||||
|
else:
|
||||||
|
return verify
|
||||||
|
except IOError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def verify_file(self, file_input):
|
||||||
|
"""
|
||||||
|
Verify the signature of a file.
|
||||||
|
"""
|
||||||
|
if isinstance(file_input, types.StringTypes):
|
||||||
|
descriptor = open(file_input, 'rb')
|
||||||
|
elif isinstance(file_input, types.FileType) or isinstance(file_input, File) or isinstance(file_input, StringIO):
|
||||||
|
descriptor = file_input
|
||||||
|
else:
|
||||||
|
raise ValueError('Invalid file_input argument type')
|
||||||
|
|
||||||
|
verify = self.gpg.verify_file(descriptor)
|
||||||
|
descriptor.close()
|
||||||
|
|
||||||
|
if verify:
|
||||||
|
return verify
|
||||||
|
#elif getattr(verify, 'status', None) == 'no public key':
|
||||||
|
# # Exception to the rule, to be able to query the keyservers
|
||||||
|
# return verify
|
||||||
|
else:
|
||||||
|
raise GPGVerificationError()
|
||||||
|
|
||||||
|
def verify(self, data):
|
||||||
|
# TODO: try to merge with verify_file
|
||||||
|
verify = self.gpg.verify(data)
|
||||||
|
|
||||||
|
if verify:
|
||||||
|
return verify
|
||||||
|
else:
|
||||||
|
raise GPGVerificationError(verify.status)
|
||||||
|
|
||||||
|
def sign_file(self, file_input, key=None, destination=None, key_id=None, passphrase=None, clearsign=False):
|
||||||
|
"""
|
||||||
|
Signs a filename, storing the signature and the original file
|
||||||
|
in the destination filename provided (the destination file is
|
||||||
|
overrided if it already exists), if no destination file name is
|
||||||
|
provided the signature is returned.
|
||||||
|
"""
|
||||||
|
kwargs = {}
|
||||||
|
kwargs['clearsign'] = clearsign
|
||||||
|
|
||||||
|
if key_id:
|
||||||
|
kwargs['keyid'] = key_id
|
||||||
|
|
||||||
|
if key:
|
||||||
|
kwargs['keyid'] = key.key_id
|
||||||
|
|
||||||
|
if passphrase:
|
||||||
|
kwargs['passphrase'] = passphrase
|
||||||
|
|
||||||
|
if isinstance(file_input, types.StringTypes):
|
||||||
|
input_descriptor = open(file_input, 'rb')
|
||||||
|
elif isinstance(file_input, types.FileType) or isinstance(file_input, File):
|
||||||
|
input_descriptor = file_input
|
||||||
|
elif issubclass(file_input.__class__, StringIO):
|
||||||
|
input_descriptor = file_input
|
||||||
|
else:
|
||||||
|
raise ValueError('Invalid file_input argument type')
|
||||||
|
|
||||||
|
if destination:
|
||||||
|
output_descriptor = open(destination, 'wb')
|
||||||
|
|
||||||
|
signed_data = self.gpg.sign_file(input_descriptor, **kwargs)
|
||||||
|
if not signed_data.fingerprint:
|
||||||
|
raise GPGSigningError('Unable to sign file')
|
||||||
|
|
||||||
|
if destination:
|
||||||
|
output_descriptor.write(signed_data.data)
|
||||||
|
|
||||||
|
input_descriptor.close()
|
||||||
|
|
||||||
|
if destination:
|
||||||
|
output_descriptor.close()
|
||||||
|
|
||||||
|
if not destination:
|
||||||
|
return signed_data
|
||||||
|
|
||||||
|
def decrypt_file(self, file_input):
|
||||||
|
if isinstance(file_input, types.StringTypes):
|
||||||
|
input_descriptor = open(file_input, 'rb')
|
||||||
|
elif isinstance(file_input, types.FileType) or isinstance(file_input, File) or isinstance(file_input, StringIO):
|
||||||
|
input_descriptor = file_input
|
||||||
|
else:
|
||||||
|
raise ValueError('Invalid file_input argument type')
|
||||||
|
|
||||||
|
result = self.gpg.decrypt_file(input_descriptor)
|
||||||
|
input_descriptor.close()
|
||||||
|
if not result.status:
|
||||||
|
raise GPGDecryptionError('Unable to decrypt file')
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
def create_key(self, *args, **kwargs):
|
||||||
|
if kwargs.get('passphrase') == u'':
|
||||||
|
kwargs.pop('passphrase')
|
||||||
|
|
||||||
|
input_data = self.gpg.gen_key_input(**kwargs)
|
||||||
|
key = self.gpg.gen_key(input_data)
|
||||||
|
if not key:
|
||||||
|
raise KeyGenerationError('Unable to generate key')
|
||||||
|
|
||||||
|
return Key.get(self, key.fingerprint)
|
||||||
|
|
||||||
|
def delete_key(self, key):
|
||||||
|
status = self.gpg.delete_keys(key.fingerprint, key.type == 'sec').status
|
||||||
|
if status == 'Must delete secret key first':
|
||||||
|
self.delete_key(Key.get(self, key.fingerprint, secret=True))
|
||||||
|
self.delete_key(key)
|
||||||
|
elif status != 'ok':
|
||||||
|
raise KeyDeleteError('Unable to delete key')
|
||||||
|
|
||||||
|
def receive_key(self, key_id):
|
||||||
|
for keyserver in self.keyservers:
|
||||||
|
import_result = self.gpg.recv_keys(keyserver, key_id)
|
||||||
|
if import_result:
|
||||||
|
return Key.get(self, import_result.fingerprints[0], secret=False)
|
||||||
|
|
||||||
|
raise KeyFetchingError
|
||||||
|
|
||||||
|
def query(self, term):
|
||||||
|
results = {}
|
||||||
|
for keyserver in self.keyservers:
|
||||||
|
url = u'http://%s' % keyserver
|
||||||
|
server = KeyServer(url)
|
||||||
|
try:
|
||||||
|
key_list = server.search(term)
|
||||||
|
for key in key_list:
|
||||||
|
results[key.keyid] = key
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return results.values()
|
||||||
|
|
||||||
|
def import_key(self, key_data):
|
||||||
|
import_result = self.gpg.import_keys(key_data)
|
||||||
|
logger.debug('import_result: %s' % import_result)
|
||||||
|
|
||||||
|
if import_result:
|
||||||
|
return Key.get(self, import_result.fingerprints[0], secret=False)
|
||||||
|
|
||||||
|
raise KeyImportError
|
||||||
15
apps/django_gpg/conf/settings.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
'''
|
||||||
|
Configuration options for the django_gpg app
|
||||||
|
'''
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
|
from smart_settings.api import register_settings
|
||||||
|
|
||||||
|
register_settings(
|
||||||
|
namespace=u'django_gpg',
|
||||||
|
module=u'django_gpg.conf.settings',
|
||||||
|
settings=[
|
||||||
|
{'name': u'KEYSERVERS', 'global_name': u'SIGNATURES_KEYSERVERS', 'default': ['pool.sks-keyservers.net'], 'description': _(u'List of keyservers to be queried for unknown keys.')},
|
||||||
|
]
|
||||||
|
)
|
||||||
34
apps/django_gpg/exceptions.py
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
class GPGException(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class GPGVerificationError(GPGException):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class GPGSigningError(GPGException):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class GPGDecryptionError(GPGException):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class KeyDeleteError(GPGException):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class KeyGenerationError(GPGException):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class KeyFetchingError(GPGException):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class KeyDoesNotExist(GPGException):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class KeyImportError(GPGException):
|
||||||
|
pass
|
||||||
13
apps/django_gpg/forms.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from django import forms
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.utils.translation import ugettext
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
|
from django.utils.safestring import mark_safe
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
class KeySearchForm(forms.Form):
|
||||||
|
term = forms.CharField(
|
||||||
|
label=_(u'Term'),
|
||||||
|
help_text=_(u'Name, e-mail, key ID or key fingerprint to look for.')
|
||||||
|
)
|
||||||
253
apps/django_gpg/locale/en/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
# 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: 2011-12-05 13:40-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"
|
||||||
|
|
||||||
|
#: __init__.py:14
|
||||||
|
msgid "Verify document signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:15
|
||||||
|
msgid "View keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:16
|
||||||
|
msgid "Delete keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:17 __init__.py:32
|
||||||
|
msgid "Query keyservers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:18
|
||||||
|
msgid "Import key from keyservers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:21
|
||||||
|
msgid "Signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:29 views.py:65
|
||||||
|
msgid "private keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:30 views.py:68
|
||||||
|
msgid "public keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:31
|
||||||
|
msgid "delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:33
|
||||||
|
msgid "Import"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:36
|
||||||
|
msgid "signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:20
|
||||||
|
msgid "Public"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:21
|
||||||
|
msgid "Secret"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:29 api.py:34
|
||||||
|
msgid "RSA"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:30
|
||||||
|
msgid "DSA"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:35
|
||||||
|
msgid "Elgamal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:49
|
||||||
|
msgid "Bad signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:53
|
||||||
|
msgid "Document not signed or invalid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:57
|
||||||
|
msgid "Signature error."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:61
|
||||||
|
msgid "Document is signed but no public key is available for verification."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:65
|
||||||
|
msgid "Document is signed, and signature is good."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:69
|
||||||
|
msgid "Document is signed with a valid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:142
|
||||||
|
msgid "unknown"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: forms.py:11
|
||||||
|
msgid "Term"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: forms.py:12
|
||||||
|
msgid "Name, e-mail, key ID or key fingerprint to look for."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:43
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, imported successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:46
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to import key id: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:50
|
||||||
|
msgid "Import key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:51
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to import key id: %s?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:76
|
||||||
|
msgid "Key ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:80
|
||||||
|
msgid "Owner"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:100
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, deleted successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:107
|
||||||
|
msgid "Delete key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:109
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Are you sure you wish to delete key: %s? If you try to delete a public key "
|
||||||
|
"that is part of a public/private pair the private key will be deleted as "
|
||||||
|
"well."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:127
|
||||||
|
msgid "Query key server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:140
|
||||||
|
msgid "results"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:145
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:149
|
||||||
|
msgid "type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:153
|
||||||
|
msgid "creation date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:157
|
||||||
|
msgid "disabled"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:161
|
||||||
|
msgid "expiration date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:165
|
||||||
|
msgid "expired"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:169
|
||||||
|
msgid "length"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:173
|
||||||
|
msgid "revoked"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:178
|
||||||
|
msgid "Identifies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:205
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature status: %(widget)s %(text)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:212
|
||||||
|
msgid "embedded"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:214
|
||||||
|
msgid "detached"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:219
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:220
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature type: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:221
|
||||||
|
#, python-format
|
||||||
|
msgid "Key ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:222
|
||||||
|
#, python-format
|
||||||
|
msgid "Timestamp: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:223
|
||||||
|
#, python-format
|
||||||
|
msgid "Signee: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:228
|
||||||
|
#, python-format
|
||||||
|
msgid "signature properties for: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: conf/settings.py:13
|
||||||
|
msgid "List of keyservers to be queried for unknown keys."
|
||||||
|
msgstr ""
|
||||||
BIN
apps/django_gpg/locale/es/LC_MESSAGES/django.mo
Normal file
256
apps/django_gpg/locale/es/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,256 @@
|
|||||||
|
# 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.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
|
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
||||||
|
"POT-Creation-Date: 2011-12-05 13:40-0400\n"
|
||||||
|
"PO-Revision-Date: 2011-12-05 17:52+0000\n"
|
||||||
|
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
||||||
|
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/mayan-edms/team/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:14
|
||||||
|
msgid "Verify document signatures"
|
||||||
|
msgstr "Verificar las firmas de documentos"
|
||||||
|
|
||||||
|
#: __init__.py:15
|
||||||
|
msgid "View keys"
|
||||||
|
msgstr "Ver llaves"
|
||||||
|
|
||||||
|
#: __init__.py:16
|
||||||
|
msgid "Delete keys"
|
||||||
|
msgstr "Borrar llaves"
|
||||||
|
|
||||||
|
#: __init__.py:17 __init__.py:32
|
||||||
|
msgid "Query keyservers"
|
||||||
|
msgstr "Hacer búsquedas en servidores de llaves"
|
||||||
|
|
||||||
|
#: __init__.py:18
|
||||||
|
msgid "Import key from keyservers"
|
||||||
|
msgstr "Importar llaves de los servidores de llaves"
|
||||||
|
|
||||||
|
#: __init__.py:21
|
||||||
|
msgid "Signatures"
|
||||||
|
msgstr "Firmas"
|
||||||
|
|
||||||
|
#: __init__.py:29 views.py:65
|
||||||
|
msgid "private keys"
|
||||||
|
msgstr "llaves privadas"
|
||||||
|
|
||||||
|
#: __init__.py:30 views.py:68
|
||||||
|
msgid "public keys"
|
||||||
|
msgstr "llaves públicas"
|
||||||
|
|
||||||
|
#: __init__.py:31
|
||||||
|
msgid "delete"
|
||||||
|
msgstr "borrar"
|
||||||
|
|
||||||
|
#: __init__.py:33
|
||||||
|
msgid "Import"
|
||||||
|
msgstr "Importar"
|
||||||
|
|
||||||
|
#: __init__.py:36
|
||||||
|
msgid "signatures"
|
||||||
|
msgstr "firmas"
|
||||||
|
|
||||||
|
#: api.py:20
|
||||||
|
msgid "Public"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:21
|
||||||
|
msgid "Secret"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:29 api.py:34
|
||||||
|
msgid "RSA"
|
||||||
|
msgstr "RSA"
|
||||||
|
|
||||||
|
#: api.py:30
|
||||||
|
msgid "DSA"
|
||||||
|
msgstr "DSA"
|
||||||
|
|
||||||
|
#: api.py:35
|
||||||
|
msgid "Elgamal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:49
|
||||||
|
msgid "Bad signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:53
|
||||||
|
msgid "Document not signed or invalid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:57
|
||||||
|
msgid "Signature error."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:61
|
||||||
|
msgid "Document is signed but no public key is available for verification."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:65
|
||||||
|
msgid "Document is signed, and signature is good."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:69
|
||||||
|
msgid "Document is signed with a valid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:142
|
||||||
|
msgid "unknown"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: forms.py:11
|
||||||
|
msgid "Term"
|
||||||
|
msgstr "Término"
|
||||||
|
|
||||||
|
#: forms.py:12
|
||||||
|
msgid "Name, e-mail, key ID or key fingerprint to look for."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:43
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, imported successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:46
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to import key id: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:50
|
||||||
|
msgid "Import key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:51
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to import key id: %s?"
|
||||||
|
msgstr "¿Esta seguro que desea importar la llave: %s?"
|
||||||
|
|
||||||
|
#: views.py:76
|
||||||
|
msgid "Key ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:80
|
||||||
|
msgid "Owner"
|
||||||
|
msgstr "Dueño"
|
||||||
|
|
||||||
|
#: views.py:100
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, deleted successfully."
|
||||||
|
msgstr "Llave: %s, borrada exitosamente."
|
||||||
|
|
||||||
|
#: views.py:107
|
||||||
|
msgid "Delete key"
|
||||||
|
msgstr "Borrar llave"
|
||||||
|
|
||||||
|
#: views.py:109
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Are you sure you wish to delete key: %s? If you try to delete a public key "
|
||||||
|
"that is part of a public/private pair the private key will be deleted as "
|
||||||
|
"well."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:127
|
||||||
|
msgid "Query key server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:140
|
||||||
|
msgid "results"
|
||||||
|
msgstr "resultados"
|
||||||
|
|
||||||
|
#: views.py:145
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:149
|
||||||
|
msgid "type"
|
||||||
|
msgstr "tipo"
|
||||||
|
|
||||||
|
#: views.py:153
|
||||||
|
msgid "creation date"
|
||||||
|
msgstr "fecha de creación"
|
||||||
|
|
||||||
|
#: views.py:157
|
||||||
|
msgid "disabled"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:161
|
||||||
|
msgid "expiration date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:165
|
||||||
|
msgid "expired"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:169
|
||||||
|
msgid "length"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:173
|
||||||
|
msgid "revoked"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:178
|
||||||
|
msgid "Identifies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:205
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature status: %(widget)s %(text)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:212
|
||||||
|
msgid "embedded"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:214
|
||||||
|
msgid "detached"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:219
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:220
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature type: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:221
|
||||||
|
#, python-format
|
||||||
|
msgid "Key ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:222
|
||||||
|
#, python-format
|
||||||
|
msgid "Timestamp: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:223
|
||||||
|
#, python-format
|
||||||
|
msgid "Signee: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:228
|
||||||
|
#, python-format
|
||||||
|
msgid "signature properties for: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: conf/settings.py:13
|
||||||
|
msgid "List of keyservers to be queried for unknown keys."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|
||||||
BIN
apps/django_gpg/locale/pt/LC_MESSAGES/django.mo
Normal file
255
apps/django_gpg/locale/pt/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,255 @@
|
|||||||
|
# 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: 2011-12-05 13:40-0400\n"
|
||||||
|
"PO-Revision-Date: 2011-12-05 17:43+0000\n"
|
||||||
|
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
||||||
|
"Language-Team: Portuguese (http://www.transifex.net/projects/p/mayan-edms/team/pt/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Language: pt\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
|
#: __init__.py:14
|
||||||
|
msgid "Verify document signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:15
|
||||||
|
msgid "View keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:16
|
||||||
|
msgid "Delete keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:17 __init__.py:32
|
||||||
|
msgid "Query keyservers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:18
|
||||||
|
msgid "Import key from keyservers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:21
|
||||||
|
msgid "Signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:29 views.py:65
|
||||||
|
msgid "private keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:30 views.py:68
|
||||||
|
msgid "public keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:31
|
||||||
|
msgid "delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:33
|
||||||
|
msgid "Import"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:36
|
||||||
|
msgid "signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:20
|
||||||
|
msgid "Public"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:21
|
||||||
|
msgid "Secret"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:29 api.py:34
|
||||||
|
msgid "RSA"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:30
|
||||||
|
msgid "DSA"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:35
|
||||||
|
msgid "Elgamal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:49
|
||||||
|
msgid "Bad signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:53
|
||||||
|
msgid "Document not signed or invalid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:57
|
||||||
|
msgid "Signature error."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:61
|
||||||
|
msgid "Document is signed but no public key is available for verification."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:65
|
||||||
|
msgid "Document is signed, and signature is good."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:69
|
||||||
|
msgid "Document is signed with a valid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:142
|
||||||
|
msgid "unknown"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: forms.py:11
|
||||||
|
msgid "Term"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: forms.py:12
|
||||||
|
msgid "Name, e-mail, key ID or key fingerprint to look for."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:43
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, imported successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:46
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to import key id: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:50
|
||||||
|
msgid "Import key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:51
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to import key id: %s?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:76
|
||||||
|
msgid "Key ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:80
|
||||||
|
msgid "Owner"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:100
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, deleted successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:107
|
||||||
|
msgid "Delete key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:109
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Are you sure you wish to delete key: %s? If you try to delete a public key "
|
||||||
|
"that is part of a public/private pair the private key will be deleted as "
|
||||||
|
"well."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:127
|
||||||
|
msgid "Query key server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:140
|
||||||
|
msgid "results"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:145
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:149
|
||||||
|
msgid "type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:153
|
||||||
|
msgid "creation date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:157
|
||||||
|
msgid "disabled"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:161
|
||||||
|
msgid "expiration date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:165
|
||||||
|
msgid "expired"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:169
|
||||||
|
msgid "length"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:173
|
||||||
|
msgid "revoked"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:178
|
||||||
|
msgid "Identifies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:205
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature status: %(widget)s %(text)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:212
|
||||||
|
msgid "embedded"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:214
|
||||||
|
msgid "detached"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:219
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:220
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature type: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:221
|
||||||
|
#, python-format
|
||||||
|
msgid "Key ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:222
|
||||||
|
#, python-format
|
||||||
|
msgid "Timestamp: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:223
|
||||||
|
#, python-format
|
||||||
|
msgid "Signee: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:228
|
||||||
|
#, python-format
|
||||||
|
msgid "signature properties for: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: conf/settings.py:13
|
||||||
|
msgid "List of keyservers to be queried for unknown keys."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|
||||||
BIN
apps/django_gpg/locale/ru/LC_MESSAGES/django.mo
Normal file
255
apps/django_gpg/locale/ru/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,255 @@
|
|||||||
|
# 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: 2011-12-05 13:40-0400\n"
|
||||||
|
"PO-Revision-Date: 2011-12-05 17:43+0000\n"
|
||||||
|
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
||||||
|
"Language-Team: Russian (http://www.transifex.net/projects/p/mayan-edms/team/ru/)\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\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:14
|
||||||
|
msgid "Verify document signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:15
|
||||||
|
msgid "View keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:16
|
||||||
|
msgid "Delete keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:17 __init__.py:32
|
||||||
|
msgid "Query keyservers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:18
|
||||||
|
msgid "Import key from keyservers"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:21
|
||||||
|
msgid "Signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:29 views.py:65
|
||||||
|
msgid "private keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:30 views.py:68
|
||||||
|
msgid "public keys"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:31
|
||||||
|
msgid "delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:33
|
||||||
|
msgid "Import"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: __init__.py:36
|
||||||
|
msgid "signatures"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:20
|
||||||
|
msgid "Public"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:21
|
||||||
|
msgid "Secret"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:29 api.py:34
|
||||||
|
msgid "RSA"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:30
|
||||||
|
msgid "DSA"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:35
|
||||||
|
msgid "Elgamal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:49
|
||||||
|
msgid "Bad signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:53
|
||||||
|
msgid "Document not signed or invalid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:57
|
||||||
|
msgid "Signature error."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:61
|
||||||
|
msgid "Document is signed but no public key is available for verification."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:65
|
||||||
|
msgid "Document is signed, and signature is good."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:69
|
||||||
|
msgid "Document is signed with a valid signature."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: api.py:142
|
||||||
|
msgid "unknown"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: forms.py:11
|
||||||
|
msgid "Term"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: forms.py:12
|
||||||
|
msgid "Name, e-mail, key ID or key fingerprint to look for."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:43
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, imported successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:46
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to import key id: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:50
|
||||||
|
msgid "Import key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:51
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to import key id: %s?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:76
|
||||||
|
msgid "Key ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:80
|
||||||
|
msgid "Owner"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:100
|
||||||
|
#, python-format
|
||||||
|
msgid "Key: %s, deleted successfully."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:107
|
||||||
|
msgid "Delete key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:109
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Are you sure you wish to delete key: %s? If you try to delete a public key "
|
||||||
|
"that is part of a public/private pair the private key will be deleted as "
|
||||||
|
"well."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:127
|
||||||
|
msgid "Query key server"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:140
|
||||||
|
msgid "results"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:145
|
||||||
|
msgid "ID"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:149
|
||||||
|
msgid "type"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:153
|
||||||
|
msgid "creation date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:157
|
||||||
|
msgid "disabled"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:161
|
||||||
|
msgid "expiration date"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:165
|
||||||
|
msgid "expired"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:169
|
||||||
|
msgid "length"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:173
|
||||||
|
msgid "revoked"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:178
|
||||||
|
msgid "Identifies"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:205
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature status: %(widget)s %(text)s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:212
|
||||||
|
msgid "embedded"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:214
|
||||||
|
msgid "detached"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:219
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:220
|
||||||
|
#, python-format
|
||||||
|
msgid "Signature type: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:221
|
||||||
|
#, python-format
|
||||||
|
msgid "Key ID: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:222
|
||||||
|
#, python-format
|
||||||
|
msgid "Timestamp: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:223
|
||||||
|
#, python-format
|
||||||
|
msgid "Signee: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: views.py:228
|
||||||
|
#, python-format
|
||||||
|
msgid "signature properties for: %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: conf/settings.py:13
|
||||||
|
msgid "List of keyservers to be queried for unknown keys."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
|
||||||
1
apps/django_gpg/models.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
4
apps/django_gpg/runtime.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from django_gpg.api import GPG
|
||||||
|
from django_gpg.conf.settings import KEYSERVERS
|
||||||
|
|
||||||
|
gpg = GPG(keyservers=KEYSERVERS)
|
||||||
BIN
apps/django_gpg/static/images/icons/cross.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
apps/django_gpg/static/images/icons/document_signature.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
apps/django_gpg/static/images/icons/key.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
apps/django_gpg/static/images/icons/key_add.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
apps/django_gpg/static/images/icons/key_delete.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
apps/django_gpg/static/images/icons/user_silhouette.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
11
apps/django_gpg/urls.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from django.conf.urls.defaults import patterns, url
|
||||||
|
|
||||||
|
urlpatterns = patterns('django_gpg.views',
|
||||||
|
url(r'^delete/(?P<fingerprint>.+)/(?P<key_type>\w+)/$', 'key_delete', (), 'key_delete'),
|
||||||
|
url(r'^list/private/$', 'key_list', {'secret': True}, 'key_private_list'),
|
||||||
|
url(r'^list/public/$', 'key_list', {'secret': False}, 'key_public_list'),
|
||||||
|
url(r'^verify/(?P<document_pk>\d+)/$', 'document_verify', (), 'document_verify'),
|
||||||
|
url(r'^query/$', 'key_query', (), 'key_query'),
|
||||||
|
url(r'^receive/(?P<key_id>.+)/$', 'key_receive', (), 'key_receive'),
|
||||||
|
|
||||||
|
)
|
||||||
232
apps/django_gpg/views.py
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
from datetime import datetime
|
||||||
|
import logging
|
||||||
|
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
|
from django.shortcuts import render_to_response, get_object_or_404
|
||||||
|
from django.template import RequestContext
|
||||||
|
from django.contrib import messages
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
|
from django.utils.safestring import mark_safe
|
||||||
|
from django.conf import settings
|
||||||
|
from django.template.defaultfilters import force_escape
|
||||||
|
|
||||||
|
from documents.models import Document, RecentDocument
|
||||||
|
from permissions.api import check_permissions
|
||||||
|
from common.utils import pretty_size, parse_range, urlquote, \
|
||||||
|
return_diff, encapsulate
|
||||||
|
|
||||||
|
from django_gpg.api import Key, SIGNATURE_STATES
|
||||||
|
from django_gpg.runtime import gpg
|
||||||
|
from django_gpg.exceptions import GPGVerificationError, KeyFetchingError
|
||||||
|
from django_gpg import (PERMISSION_DOCUMENT_VERIFY, PERMISSION_KEY_VIEW,
|
||||||
|
PERMISSION_KEY_DELETE, PERMISSION_KEYSERVER_QUERY,
|
||||||
|
PERMISSION_KEY_RECEIVE)
|
||||||
|
from django_gpg.forms import KeySearchForm
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def key_receive(request, key_id):
|
||||||
|
check_permissions(request.user, [PERMISSION_KEY_RECEIVE])
|
||||||
|
|
||||||
|
post_action_redirect = None
|
||||||
|
previous = request.POST.get('previous', request.GET.get('previous', request.META.get('HTTP_REFERER', '/')))
|
||||||
|
next = request.POST.get('next', request.GET.get('next', post_action_redirect if post_action_redirect else request.META.get('HTTP_REFERER', '/')))
|
||||||
|
|
||||||
|
if request.method == 'POST':
|
||||||
|
try:
|
||||||
|
term = request.GET.get('term')
|
||||||
|
results = gpg.query(term)
|
||||||
|
keys_dict = dict([(key.keyid, key) for key in results])
|
||||||
|
key = gpg.import_key(keys_dict[key_id].key)
|
||||||
|
messages.success(request, _(u'Key: %s, imported successfully.') % key)
|
||||||
|
return HttpResponseRedirect(next)
|
||||||
|
except (KeyFetchingError, KeyError, TypeError):
|
||||||
|
messages.error(request, _(u'Unable to import key id: %s') % key_id)
|
||||||
|
return HttpResponseRedirect(previous)
|
||||||
|
|
||||||
|
return render_to_response('generic_confirm.html', {
|
||||||
|
'title': _(u'Import key'),
|
||||||
|
'message': _(u'Are you sure you wish to import key id: %s?') % key_id,
|
||||||
|
'form_icon': 'key_add.png',
|
||||||
|
'next': next,
|
||||||
|
'previous': previous,
|
||||||
|
'submit_method': 'GET',
|
||||||
|
|
||||||
|
}, context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
def key_list(request, secret=True):
|
||||||
|
check_permissions(request.user, [PERMISSION_KEY_VIEW])
|
||||||
|
|
||||||
|
if secret:
|
||||||
|
object_list = Key.get_all(gpg, secret=True)
|
||||||
|
title = _(u'private keys')
|
||||||
|
else:
|
||||||
|
object_list = Key.get_all(gpg)
|
||||||
|
title = _(u'public keys')
|
||||||
|
|
||||||
|
return render_to_response('generic_list.html', {
|
||||||
|
'object_list': object_list,
|
||||||
|
'title': title,
|
||||||
|
'hide_object': True,
|
||||||
|
'extra_columns': [
|
||||||
|
{
|
||||||
|
'name': _(u'Key ID'),
|
||||||
|
'attribute': 'key_id',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'Owner'),
|
||||||
|
'attribute': encapsulate(lambda x: u', '.join(x.uids)),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}, context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
def key_delete(request, fingerprint, key_type):
|
||||||
|
check_permissions(request.user, [PERMISSION_KEY_DELETE])
|
||||||
|
|
||||||
|
secret = key_type == 'sec'
|
||||||
|
key = Key.get(gpg, fingerprint, secret=secret)
|
||||||
|
|
||||||
|
post_action_redirect = None
|
||||||
|
previous = request.POST.get('previous', request.GET.get('previous', request.META.get('HTTP_REFERER', '/')))
|
||||||
|
next = request.POST.get('next', request.GET.get('next', post_action_redirect if post_action_redirect else request.META.get('HTTP_REFERER', '/')))
|
||||||
|
|
||||||
|
if request.method == 'POST':
|
||||||
|
try:
|
||||||
|
gpg.delete_key(key)
|
||||||
|
messages.success(request, _(u'Key: %s, deleted successfully.') % fingerprint)
|
||||||
|
return HttpResponseRedirect(next)
|
||||||
|
except Exception, msg:
|
||||||
|
messages.error(request, msg)
|
||||||
|
return HttpResponseRedirect(previous)
|
||||||
|
|
||||||
|
return render_to_response('generic_confirm.html', {
|
||||||
|
'title': _(u'Delete key'),
|
||||||
|
'delete_view': True,
|
||||||
|
'message': _(u'Are you sure you wish to delete key: %s? If you try to delete a public key that is part of a public/private pair the private key will be deleted as well.') % key,
|
||||||
|
'form_icon': 'key_delete.png',
|
||||||
|
'next': next,
|
||||||
|
'previous': previous,
|
||||||
|
}, context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
def key_query(request):
|
||||||
|
check_permissions(request.user, [PERMISSION_KEYSERVER_QUERY])
|
||||||
|
|
||||||
|
subtemplates_list = []
|
||||||
|
term = request.GET.get('term')
|
||||||
|
|
||||||
|
form = KeySearchForm(initial={'term': term})
|
||||||
|
subtemplates_list.append(
|
||||||
|
{
|
||||||
|
'name': 'generic_form_subtemplate.html',
|
||||||
|
'context': {
|
||||||
|
'title': _(u'Query key server'),
|
||||||
|
'form': form,
|
||||||
|
'submit_method': 'GET',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
if term:
|
||||||
|
results = gpg.query(term)
|
||||||
|
subtemplates_list.append(
|
||||||
|
{
|
||||||
|
'name': 'generic_list_subtemplate.html',
|
||||||
|
'context': {
|
||||||
|
'title': _(u'results'),
|
||||||
|
'object_list': results,
|
||||||
|
'hide_object': True,
|
||||||
|
'extra_columns': [
|
||||||
|
{
|
||||||
|
'name': _(u'ID'),
|
||||||
|
'attribute': 'keyid',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'type'),
|
||||||
|
'attribute': 'algo',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'creation date'),
|
||||||
|
'attribute': 'creation_date',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'disabled'),
|
||||||
|
'attribute': 'disabled',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'expiration date'),
|
||||||
|
'attribute': 'expiration_date',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'expired'),
|
||||||
|
'attribute': 'expired',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'length'),
|
||||||
|
'attribute': 'key_length',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'name': _(u'revoked'),
|
||||||
|
'attribute': 'revoked',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': _(u'Identifies'),
|
||||||
|
'attribute': encapsulate(lambda x: u', '.join([identity.uid for identity in x.identities])),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
return render_to_response('generic_form.html', {
|
||||||
|
'subtemplates_list': subtemplates_list,
|
||||||
|
}, context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
def document_verify(request, document_pk):
|
||||||
|
check_permissions(request.user, [PERMISSION_DOCUMENT_VERIFY])
|
||||||
|
document = get_object_or_404(Document, pk=document_pk)
|
||||||
|
|
||||||
|
RecentDocument.objects.add_document_for_user(request.user, document)
|
||||||
|
try:
|
||||||
|
signature = gpg.verify_w_retry(document.open(raw=True))
|
||||||
|
except GPGVerificationError:
|
||||||
|
signature = None
|
||||||
|
|
||||||
|
signature_state = SIGNATURE_STATES.get(getattr(signature, 'status', None))
|
||||||
|
|
||||||
|
widget = (u'<img style="vertical-align: middle;" src="%simages/icons/%s" />' % (settings.STATIC_URL, signature_state['icon']))
|
||||||
|
paragraphs = [
|
||||||
|
_(u'Signature status: %(widget)s %(text)s') % {
|
||||||
|
'widget': mark_safe(widget),
|
||||||
|
'text': signature_state['text']
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
if document.signature_state:
|
||||||
|
signature_type = _(u'embedded')
|
||||||
|
else:
|
||||||
|
signature_type = _(u'detached')
|
||||||
|
|
||||||
|
if signature:
|
||||||
|
paragraphs.extend(
|
||||||
|
[
|
||||||
|
_(u'Signature ID: %s') % signature.signature_id,
|
||||||
|
_(u'Signature type: %s') % signature_type,
|
||||||
|
_(u'Key ID: %s') % signature.key_id,
|
||||||
|
_(u'Timestamp: %s') % datetime.fromtimestamp(int(signature.sig_timestamp)),
|
||||||
|
_(u'Signee: %s') % force_escape(getattr(signature, 'username', u'')),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
return render_to_response('generic_template.html', {
|
||||||
|
'title': _(u'signature properties for: %s') % document,
|
||||||
|
'object': document,
|
||||||
|
'document': document,
|
||||||
|
'paragraphs': paragraphs,
|
||||||
|
}, context_instance=RequestContext(request))
|
||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-29 18:44-0400\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -6,15 +6,16 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Mayan EDMS\n"
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-29 18:44-0400\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: 2011-09-30 04:34+0000\n"
|
"PO-Revision-Date: 2011-09-30 04:34+0000\n"
|
||||||
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
||||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/mayan-edms/team/es/)\n"
|
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
|
||||||
|
"mayan-edms/team/es/)\n"
|
||||||
|
"Language: es\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Language: es\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
#: __init__.py:15
|
#: __init__.py:15
|
||||||
@@ -98,5 +99,3 @@ msgstr "Añadir comentario al documento: %s"
|
|||||||
#, python-format
|
#, python-format
|
||||||
msgid "comments: %s"
|
msgid "comments: %s"
|
||||||
msgstr "comentarios: %s"
|
msgstr "comentarios: %s"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,15 +7,16 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Mayan EDMS\n"
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-29 18:44-0400\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: 2011-09-30 21:14+0000\n"
|
"PO-Revision-Date: 2011-09-30 21:14+0000\n"
|
||||||
"Last-Translator: emersonsoares <dev.emerson@gmail.com>\n"
|
"Last-Translator: emersonsoares <dev.emerson@gmail.com>\n"
|
||||||
"Language-Team: Portuguese (http://www.transifex.net/projects/p/mayan-edms/team/pt/)\n"
|
"Language-Team: Portuguese (http://www.transifex.net/projects/p/mayan-edms/"
|
||||||
|
"team/pt/)\n"
|
||||||
|
"Language: pt\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Language: pt\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
#: __init__.py:15
|
#: __init__.py:15
|
||||||
@@ -99,5 +100,3 @@ msgstr "Adicionar comentário ao documento: %s"
|
|||||||
#, python-format
|
#, python-format
|
||||||
msgid "comments: %s"
|
msgid "comments: %s"
|
||||||
msgstr "comentários: %s"
|
msgstr "comentários: %s"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
apps/document_comments/locale/ru/LC_MESSAGES/django.mo
Normal file
103
apps/document_comments/locale/ru/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
# 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.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
|
"PO-Revision-Date: 2011-11-19 20:58+0000\n"
|
||||||
|
"Last-Translator: gsv70 <gsv70@mail.ru>\n"
|
||||||
|
"Language-Team: Russian (http://www.transifex.net/projects/p/mayan-edms/team/"
|
||||||
|
"ru/)\n"
|
||||||
|
"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"
|
||||||
|
|
||||||
|
#: __init__.py:15
|
||||||
|
msgid "Create new comments"
|
||||||
|
msgstr "Создать новые комментарии"
|
||||||
|
|
||||||
|
#: __init__.py:16
|
||||||
|
msgid "Delete comments"
|
||||||
|
msgstr "Удалить комментарии"
|
||||||
|
|
||||||
|
#: __init__.py:17
|
||||||
|
msgid "Edit comments"
|
||||||
|
msgstr "Редактировать комментарии"
|
||||||
|
|
||||||
|
#: __init__.py:18
|
||||||
|
msgid "View comments"
|
||||||
|
msgstr "Просмотр комментариев"
|
||||||
|
|
||||||
|
#: __init__.py:20
|
||||||
|
msgid "Comments"
|
||||||
|
msgstr "Комментарии"
|
||||||
|
|
||||||
|
#: __init__.py:26 __init__.py:27
|
||||||
|
msgid "delete"
|
||||||
|
msgstr "удалить"
|
||||||
|
|
||||||
|
#: __init__.py:28
|
||||||
|
msgid "add comment"
|
||||||
|
msgstr "добавить комментарий"
|
||||||
|
|
||||||
|
#: __init__.py:29 utils.py:14
|
||||||
|
msgid "comments"
|
||||||
|
msgstr "комментарии"
|
||||||
|
|
||||||
|
#: __init__.py:33
|
||||||
|
msgid "date"
|
||||||
|
msgstr "дата"
|
||||||
|
|
||||||
|
#: __init__.py:37
|
||||||
|
msgid "user"
|
||||||
|
msgstr "пользователь"
|
||||||
|
|
||||||
|
#: __init__.py:41
|
||||||
|
msgid "comment"
|
||||||
|
msgstr "комментарий"
|
||||||
|
|
||||||
|
#: views.py:27
|
||||||
|
msgid "Must provide at least one comment."
|
||||||
|
msgstr "Должен быть хотя бы один комментарий."
|
||||||
|
|
||||||
|
#: views.py:37
|
||||||
|
#, python-format
|
||||||
|
msgid "Comment \"%s\" deleted successfully."
|
||||||
|
msgstr "Комментарий \"%s\" удален."
|
||||||
|
|
||||||
|
#: views.py:39
|
||||||
|
#, python-format
|
||||||
|
msgid "Error deleting comment \"%(comment)s\": %(error)s"
|
||||||
|
msgstr "Ошибка при удалении комментариев \"%(comment)s\": %(error)s"
|
||||||
|
|
||||||
|
#: views.py:54
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to delete the comment: %s?"
|
||||||
|
msgstr "Вы действительно хотите удалить комментарий %s?"
|
||||||
|
|
||||||
|
#: views.py:56
|
||||||
|
#, python-format
|
||||||
|
msgid "Are you sure you wish to delete the comments: %s?"
|
||||||
|
msgstr "Вы действительно хотите удалить комментарии %s?"
|
||||||
|
|
||||||
|
#: views.py:86
|
||||||
|
msgid "Comment added successfully."
|
||||||
|
msgstr "Комментарий добавлен."
|
||||||
|
|
||||||
|
#: views.py:93
|
||||||
|
#, python-format
|
||||||
|
msgid "Add comment to document: %s"
|
||||||
|
msgstr "Добавить комментарий на документ: %s"
|
||||||
|
|
||||||
|
#: views.py:109
|
||||||
|
#, python-format
|
||||||
|
msgid "comments: %s"
|
||||||
|
msgstr "комментарии: %s"
|
||||||
@@ -3,7 +3,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
from navigation.api import register_top_menu, register_sidebar_template, \
|
from navigation.api import register_top_menu, register_sidebar_template, \
|
||||||
register_links
|
register_links
|
||||||
from permissions.api import register_permission, set_namespace_title
|
from permissions.api import register_permission, set_namespace_title
|
||||||
from main.api import register_maintenance
|
from main.api import register_maintenance_links
|
||||||
from documents.literals import PERMISSION_DOCUMENT_VIEW
|
from documents.literals import PERMISSION_DOCUMENT_VIEW
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ register_top_menu('indexes', link={'text': _('indexes'), 'famfam': 'folder_page'
|
|||||||
|
|
||||||
rebuild_index_instances = {'text': _('rebuild indexes'), 'view': 'rebuild_index_instances', 'famfam': 'folder_page', 'permissions': [PERMISSION_DOCUMENT_INDEXING_REBUILD_INDEXES], 'description': _(u'Deletes and creates from scratch all the document indexes.')}
|
rebuild_index_instances = {'text': _('rebuild indexes'), 'view': 'rebuild_index_instances', 'famfam': 'folder_page', 'permissions': [PERMISSION_DOCUMENT_INDEXING_REBUILD_INDEXES], 'description': _(u'Deletes and creates from scratch all the document indexes.')}
|
||||||
|
|
||||||
register_maintenance(rebuild_index_instances, namespace='document_indexing', title=_(u'Indexes'))
|
register_maintenance_links([rebuild_index_instances], namespace='document_indexing', title=_(u'Indexes'))
|
||||||
|
|
||||||
register_sidebar_template(['index_instance_list'], 'indexing_help.html')
|
register_sidebar_template(['index_instance_list'], 'indexing_help.html')
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from document_indexing.filesystem import fs_create_index_directory, \
|
|||||||
fs_create_document_link, fs_delete_document_link, \
|
fs_create_document_link, fs_delete_document_link, \
|
||||||
fs_delete_index_directory, fs_delete_directory_recusive
|
fs_delete_index_directory, fs_delete_directory_recusive
|
||||||
from document_indexing.conf.settings import SLUGIFY_PATHS
|
from document_indexing.conf.settings import SLUGIFY_PATHS
|
||||||
from document_indexing.os_agnostic import assemble_document_filename
|
from document_indexing.os_specifics import assemble_suffixed_filename
|
||||||
|
|
||||||
if SLUGIFY_PATHS == False:
|
if SLUGIFY_PATHS == False:
|
||||||
# Do not slugify path or filenames and extensions
|
# Do not slugify path or filenames and extensions
|
||||||
@@ -127,13 +127,14 @@ def do_rebuild_all_indexes():
|
|||||||
|
|
||||||
# Internal functions
|
# Internal functions
|
||||||
def find_lowest_available_suffix(index_instance, document):
|
def find_lowest_available_suffix(index_instance, document):
|
||||||
index_instance_documents = DocumentRenameCount.objects.filter(index_instance=index_instance).filter(document__file_extension=document.file_extension)
|
# TODO: verify extension's role in query
|
||||||
|
index_instance_documents = DocumentRenameCount.objects.filter(index_instance=index_instance)#.filter(document__file_extension=document.file_extension)
|
||||||
files_list = []
|
files_list = []
|
||||||
for index_instance_document in index_instance_documents:
|
for index_instance_document in index_instance_documents:
|
||||||
files_list.append(assemble_document_filename(index_instance_document.document, index_instance_document.suffix))
|
files_list.append(assemble_suffixed_filename(index_instance_document.document.file.name, index_instance_document.suffix))
|
||||||
|
|
||||||
for suffix in xrange(MAX_SUFFIX_COUNT):
|
for suffix in xrange(MAX_SUFFIX_COUNT):
|
||||||
if assemble_document_filename(document, suffix) not in files_list:
|
if assemble_suffixed_filename(document.file.name, suffix) not in files_list:
|
||||||
return suffix
|
return suffix
|
||||||
|
|
||||||
raise MaxSuffixCountReached(ugettext(u'Maximum suffix (%s) count reached.') % MAX_SUFFIX_COUNT)
|
raise MaxSuffixCountReached(ugettext(u'Maximum suffix (%s) count reached.') % MAX_SUFFIX_COUNT)
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import os
|
|||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from document_indexing.os_agnostic import assemble_document_filename
|
from document_indexing.os_specifics import (assemble_suffixed_filename,
|
||||||
|
assemble_path_from_list)
|
||||||
from document_indexing.conf.settings import FILESERVING_ENABLE
|
from document_indexing.conf.settings import FILESERVING_ENABLE
|
||||||
from document_indexing.conf.settings import FILESERVING_PATH
|
from document_indexing.conf.settings import FILESERVING_PATH
|
||||||
|
|
||||||
@@ -19,12 +20,12 @@ def get_instance_path(index_instance):
|
|||||||
|
|
||||||
names.append(index_instance.value)
|
names.append(index_instance.value)
|
||||||
|
|
||||||
return os.sep.join(names)
|
return assemble_path_from_list(names)
|
||||||
|
|
||||||
|
|
||||||
def fs_create_index_directory(index_instance):
|
def fs_create_index_directory(index_instance):
|
||||||
if FILESERVING_ENABLE:
|
if FILESERVING_ENABLE:
|
||||||
target_directory = os.path.join(FILESERVING_PATH, get_instance_path(index_instance))
|
target_directory = assemble_path_from_list([FILESERVING_PATH, get_instance_path(index_instance)])
|
||||||
try:
|
try:
|
||||||
os.mkdir(target_directory)
|
os.mkdir(target_directory)
|
||||||
except OSError, exc:
|
except OSError, exc:
|
||||||
@@ -36,9 +37,9 @@ def fs_create_index_directory(index_instance):
|
|||||||
|
|
||||||
def fs_create_document_link(index_instance, document, suffix=0):
|
def fs_create_document_link(index_instance, document, suffix=0):
|
||||||
if FILESERVING_ENABLE:
|
if FILESERVING_ENABLE:
|
||||||
name_part = assemble_document_filename(document, suffix)
|
filename = assemble_suffixed_filename(document.file.name, suffix)
|
||||||
filename = os.extsep.join([name_part, document.file_extension])
|
filepath = assemble_path_from_list([FILESERVING_PATH, get_instance_path(index_instance), filename])
|
||||||
filepath = os.path.join(FILESERVING_PATH, get_instance_path(index_instance), filename)
|
|
||||||
try:
|
try:
|
||||||
os.symlink(document.file.path, filepath)
|
os.symlink(document.file.path, filepath)
|
||||||
except OSError, exc:
|
except OSError, exc:
|
||||||
@@ -56,12 +57,8 @@ def fs_create_document_link(index_instance, document, suffix=0):
|
|||||||
|
|
||||||
def fs_delete_document_link(index_instance, document, suffix=0):
|
def fs_delete_document_link(index_instance, document, suffix=0):
|
||||||
if FILESERVING_ENABLE:
|
if FILESERVING_ENABLE:
|
||||||
name_part = document.file_filename
|
filename = assemble_suffixed_filename(document.file.name, suffix)
|
||||||
if suffix:
|
filepath = assemble_path_from_list([FILESERVING_PATH, get_instance_path(index_instance), filename])
|
||||||
name_part = u'_'.join([name_part, unicode(suffix)])
|
|
||||||
|
|
||||||
filename = os.extsep.join([name_part, document.file_extension])
|
|
||||||
filepath = os.path.join(FILESERVING_PATH, get_instance_path(index_instance), filename)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.unlink(filepath)
|
os.unlink(filepath)
|
||||||
@@ -73,7 +70,7 @@ def fs_delete_document_link(index_instance, document, suffix=0):
|
|||||||
|
|
||||||
def fs_delete_index_directory(index_instance):
|
def fs_delete_index_directory(index_instance):
|
||||||
if FILESERVING_ENABLE:
|
if FILESERVING_ENABLE:
|
||||||
target_directory = os.path.join(FILESERVING_PATH, get_instance_path(index_instance))
|
target_directory = assemble_path_from_list([FILESERVING_PATH, get_instance_path(index_instance)])
|
||||||
try:
|
try:
|
||||||
os.removedirs(target_directory)
|
os.removedirs(target_directory)
|
||||||
except OSError, exc:
|
except OSError, exc:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-29 18:45-0400\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|||||||
@@ -3,18 +3,20 @@
|
|||||||
# This file is distributed under the same license as the PACKAGE package.
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
#
|
#
|
||||||
# Translators:
|
# Translators:
|
||||||
|
# Roberto Rosario <roberto.rosario.gonzalez@gmail.com>, 2011.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Mayan EDMS\n"
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
"Report-Msgid-Bugs-To: http://github.com/rosarior/mayan/issues\n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-09-29 18:45-0400\n"
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
"PO-Revision-Date: 2011-09-30 05:09+0000\n"
|
"PO-Revision-Date: 2011-11-04 17:05+0000\n"
|
||||||
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
"Last-Translator: rosarior <roberto.rosario.gonzalez@gmail.com>\n"
|
||||||
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/mayan-edms/team/es/)\n"
|
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
|
||||||
|
"mayan-edms/team/es/)\n"
|
||||||
|
"Language: es\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Language: es\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||||
|
|
||||||
#: __init__.py:12
|
#: __init__.py:12
|
||||||
@@ -35,7 +37,7 @@ msgstr "lista de indices"
|
|||||||
|
|
||||||
#: __init__.py:20
|
#: __init__.py:20
|
||||||
msgid "go up one level"
|
msgid "go up one level"
|
||||||
msgstr ""
|
msgstr "subir un nivel"
|
||||||
|
|
||||||
#: __init__.py:21 __init__.py:23 models.py:26
|
#: __init__.py:21 __init__.py:23 models.py:26
|
||||||
msgid "indexes"
|
msgid "indexes"
|
||||||
@@ -176,7 +178,7 @@ msgstr "contenido del indice: %s"
|
|||||||
|
|
||||||
#: views.py:60
|
#: views.py:60
|
||||||
msgid "items"
|
msgid "items"
|
||||||
msgstr ""
|
msgstr "artículos"
|
||||||
|
|
||||||
#: views.py:82
|
#: views.py:82
|
||||||
msgid "Are you sure you wish to rebuild all indexes?"
|
msgid "Are you sure you wish to rebuild all indexes?"
|
||||||
@@ -200,7 +202,7 @@ msgstr "Error de reconstrucción de índices: %s"
|
|||||||
#: views.py:109
|
#: views.py:109
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "indexes containing: %s"
|
msgid "indexes containing: %s"
|
||||||
msgstr ""
|
msgstr "índices que contienen: %s"
|
||||||
|
|
||||||
#: templates/indexing_help.html:3
|
#: templates/indexing_help.html:3
|
||||||
msgid "What are indexes?"
|
msgid "What are indexes?"
|
||||||
@@ -210,5 +212,3 @@ msgstr "¿Que son los índices?"
|
|||||||
msgid "Indexes group documents into a tree like hierarchical structure."
|
msgid "Indexes group documents into a tree like hierarchical structure."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Los índices agrupan documentos en una estructura jerárquica tipo árbol. "
|
"Los índices agrupan documentos en una estructura jerárquica tipo árbol. "
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
apps/document_indexing/locale/pt/LC_MESSAGES/django.mo
Normal file
213
apps/document_indexing/locale/pt/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
#
|
||||||
|
# Translators:
|
||||||
|
# Renata Oliveira <renatabels@gmail.com>, 2011.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Mayan EDMS\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
|
"PO-Revision-Date: 2011-11-03 02:59+0000\n"
|
||||||
|
"Last-Translator: renataoliveira <renatabels@gmail.com>\n"
|
||||||
|
"Language-Team: Portuguese (http://www.transifex.net/projects/p/mayan-edms/"
|
||||||
|
"team/pt/)\n"
|
||||||
|
"Language: pt\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"
|
||||||
|
|
||||||
|
#: __init__.py:12
|
||||||
|
msgid "View document indexes"
|
||||||
|
msgstr "Ver índices de documento"
|
||||||
|
|
||||||
|
#: __init__.py:13
|
||||||
|
msgid "Rebuild document indexes"
|
||||||
|
msgstr "Reconstruir índices de documento"
|
||||||
|
|
||||||
|
#: __init__.py:15
|
||||||
|
msgid "Indexing"
|
||||||
|
msgstr "Indexando"
|
||||||
|
|
||||||
|
#: __init__.py:19
|
||||||
|
msgid "index list"
|
||||||
|
msgstr "lista de índice"
|
||||||
|
|
||||||
|
#: __init__.py:20
|
||||||
|
msgid "go up one level"
|
||||||
|
msgstr "subir um nível"
|
||||||
|
|
||||||
|
#: __init__.py:21 __init__.py:23 models.py:26
|
||||||
|
msgid "indexes"
|
||||||
|
msgstr "índices"
|
||||||
|
|
||||||
|
#: __init__.py:25
|
||||||
|
msgid "rebuild indexes"
|
||||||
|
msgstr "reconstruir índices"
|
||||||
|
|
||||||
|
#: __init__.py:25
|
||||||
|
msgid "Deletes and creates from scratch all the document indexes."
|
||||||
|
msgstr "Exclui e criar a partir do zero todos os índices de documento."
|
||||||
|
|
||||||
|
#: __init__.py:27
|
||||||
|
msgid "Indexes"
|
||||||
|
msgstr "Índices"
|
||||||
|
|
||||||
|
#: api.py:83
|
||||||
|
msgid "root"
|
||||||
|
msgstr "raiz"
|
||||||
|
|
||||||
|
#: api.py:139
|
||||||
|
#, python-format
|
||||||
|
msgid "Maximum suffix (%s) count reached."
|
||||||
|
msgstr "Quantidade máxima do sufixo (%s) alcançada."
|
||||||
|
|
||||||
|
#: api.py:175
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Error in document indexing update expression: %(expression)s; %(exception)s"
|
||||||
|
msgstr ""
|
||||||
|
"Erro de atualização na expressão de indexação do documento: %(expression)s; "
|
||||||
|
"%(exception)s "
|
||||||
|
|
||||||
|
#: api.py:178
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Error updating document index, expression: %(expression)s; %(exception)s"
|
||||||
|
msgstr ""
|
||||||
|
"Erro de atualização de índice do documento, a expressão: %(expression)s ; "
|
||||||
|
"%(exception)s "
|
||||||
|
|
||||||
|
#: api.py:209
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to delete document indexing node; %s"
|
||||||
|
msgstr "Não é possível excluir o nó de indexação de documentos; %s"
|
||||||
|
|
||||||
|
#: filesystem.py:34
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to create indexing directory; %s"
|
||||||
|
msgstr "Não é possível criar o diretório de indexação; %s"
|
||||||
|
|
||||||
|
#: filesystem.py:52
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Unable to create symbolic link, file exists and could not be deleted: "
|
||||||
|
"%(filepath)s; %(exc)s"
|
||||||
|
msgstr ""
|
||||||
|
"Não é possível criar o link simbólico, o arquivo existe e não pode ser "
|
||||||
|
"excluído: %(filepath)s; %(exc)s "
|
||||||
|
|
||||||
|
#: filesystem.py:54
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to create symbolic link: %(filepath)s; %(exc)s"
|
||||||
|
msgstr "Não é possível criar o link simbólico: %(filepath)s; %(exc)s "
|
||||||
|
|
||||||
|
#: filesystem.py:71
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to delete document symbolic link; %s"
|
||||||
|
msgstr "Não é possível excluir o link simbólico do documento; %s"
|
||||||
|
|
||||||
|
#: filesystem.py:83
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to delete indexing directory; %s"
|
||||||
|
msgstr "Não é possível excluir o diretório de indexação; %s"
|
||||||
|
|
||||||
|
#: models.py:11
|
||||||
|
#, python-format
|
||||||
|
msgid "Available functions: %s"
|
||||||
|
msgstr "Funções disponíveis: %s "
|
||||||
|
|
||||||
|
#: models.py:16
|
||||||
|
msgid "indexing expression"
|
||||||
|
msgstr "expressão de indexação"
|
||||||
|
|
||||||
|
#: models.py:16
|
||||||
|
msgid "Enter a python string expression to be evaluated."
|
||||||
|
msgstr "Digite uma expressão python para ser avaliada."
|
||||||
|
|
||||||
|
#: models.py:18
|
||||||
|
msgid "enabled"
|
||||||
|
msgstr "habilitado"
|
||||||
|
|
||||||
|
#: models.py:19
|
||||||
|
msgid "link documents"
|
||||||
|
msgstr "ligar documentos"
|
||||||
|
|
||||||
|
#: models.py:25 models.py:31 views.py:56
|
||||||
|
msgid "index"
|
||||||
|
msgstr "índice"
|
||||||
|
|
||||||
|
#: models.py:32
|
||||||
|
msgid "value"
|
||||||
|
msgstr "valor"
|
||||||
|
|
||||||
|
#: models.py:33
|
||||||
|
msgid "documents"
|
||||||
|
msgstr "documentos"
|
||||||
|
|
||||||
|
#: models.py:46 models.py:51
|
||||||
|
msgid "index instance"
|
||||||
|
msgstr "exemplo de índice"
|
||||||
|
|
||||||
|
#: models.py:47
|
||||||
|
msgid "indexes instances"
|
||||||
|
msgstr "exemplos de índices"
|
||||||
|
|
||||||
|
#: models.py:52
|
||||||
|
msgid "document"
|
||||||
|
msgstr "documento"
|
||||||
|
|
||||||
|
#: models.py:59
|
||||||
|
msgid "document rename count"
|
||||||
|
msgstr "contagem de renomeação do documento"
|
||||||
|
|
||||||
|
#: models.py:60
|
||||||
|
msgid "documents rename count"
|
||||||
|
msgstr "contagem de renomeação dos documentos"
|
||||||
|
|
||||||
|
#: utils.py:19
|
||||||
|
msgid "document indexes"
|
||||||
|
msgstr "índices de documento"
|
||||||
|
|
||||||
|
#: views.py:38
|
||||||
|
#, python-format
|
||||||
|
msgid "contents for index: %s"
|
||||||
|
msgstr "conteúdos para o índice: %s"
|
||||||
|
|
||||||
|
#: views.py:60
|
||||||
|
msgid "items"
|
||||||
|
msgstr "itens"
|
||||||
|
|
||||||
|
#: views.py:82
|
||||||
|
msgid "Are you sure you wish to rebuild all indexes?"
|
||||||
|
msgstr "Tem certeza de que deseja reconstruir todos os índices?"
|
||||||
|
|
||||||
|
#: views.py:83
|
||||||
|
msgid "On large databases this operation may take some time to execute."
|
||||||
|
msgstr ""
|
||||||
|
"Em grandes bases de dados esta operação pode levar algum tempo para executar."
|
||||||
|
|
||||||
|
#: views.py:89
|
||||||
|
msgid "Index rebuild completed successfully."
|
||||||
|
msgstr "Reconstrução de índice concluída com êxito."
|
||||||
|
|
||||||
|
#: views.py:94
|
||||||
|
#, python-format
|
||||||
|
msgid "Index rebuild error: %s"
|
||||||
|
msgstr "Reconstrução de índice de erro: %s"
|
||||||
|
|
||||||
|
#: views.py:109
|
||||||
|
#, python-format
|
||||||
|
msgid "indexes containing: %s"
|
||||||
|
msgstr "índices contendo: %s"
|
||||||
|
|
||||||
|
#: templates/indexing_help.html:3
|
||||||
|
msgid "What are indexes?"
|
||||||
|
msgstr "Quais são os índices?"
|
||||||
|
|
||||||
|
#: templates/indexing_help.html:4
|
||||||
|
msgid "Indexes group documents into a tree like hierarchical structure."
|
||||||
|
msgstr ""
|
||||||
|
"Indexar documentos agrupados em uma árvore como uma estrutura hierárquica."
|
||||||
BIN
apps/document_indexing/locale/ru/LC_MESSAGES/django.mo
Normal file
213
apps/document_indexing/locale/ru/LC_MESSAGES/django.po
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
# 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: \n"
|
||||||
|
"POT-Creation-Date: 2011-11-22 11:26-0400\n"
|
||||||
|
"PO-Revision-Date: 2011-11-03 22:42+0000\n"
|
||||||
|
"Last-Translator: gsv70 <gsv70@mail.ru>\n"
|
||||||
|
"Language-Team: Russian (http://www.transifex.net/projects/p/mayan-edms/team/"
|
||||||
|
"ru/)\n"
|
||||||
|
"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"
|
||||||
|
|
||||||
|
#: __init__.py:12
|
||||||
|
msgid "View document indexes"
|
||||||
|
msgstr "Просмотр индексов документа"
|
||||||
|
|
||||||
|
#: __init__.py:13
|
||||||
|
msgid "Rebuild document indexes"
|
||||||
|
msgstr "Восстановление индексов документа"
|
||||||
|
|
||||||
|
#: __init__.py:15
|
||||||
|
msgid "Indexing"
|
||||||
|
msgstr "Индексирование"
|
||||||
|
|
||||||
|
#: __init__.py:19
|
||||||
|
msgid "index list"
|
||||||
|
msgstr "список индекса"
|
||||||
|
|
||||||
|
#: __init__.py:20
|
||||||
|
msgid "go up one level"
|
||||||
|
msgstr "перейти на уровень выше"
|
||||||
|
|
||||||
|
#: __init__.py:21 __init__.py:23 models.py:26
|
||||||
|
msgid "indexes"
|
||||||
|
msgstr "индексы"
|
||||||
|
|
||||||
|
#: __init__.py:25
|
||||||
|
msgid "rebuild indexes"
|
||||||
|
msgstr "восстановление индексов"
|
||||||
|
|
||||||
|
#: __init__.py:25
|
||||||
|
msgid "Deletes and creates from scratch all the document indexes."
|
||||||
|
msgstr "Удаляет и создается с нуля, все индексы документа."
|
||||||
|
|
||||||
|
#: __init__.py:27
|
||||||
|
msgid "Indexes"
|
||||||
|
msgstr "Индексы"
|
||||||
|
|
||||||
|
#: api.py:83
|
||||||
|
msgid "root"
|
||||||
|
msgstr "корень"
|
||||||
|
|
||||||
|
#: api.py:139
|
||||||
|
#, python-format
|
||||||
|
msgid "Maximum suffix (%s) count reached."
|
||||||
|
msgstr "Достигнуто максимальное (%s) число суффиксов "
|
||||||
|
|
||||||
|
#: api.py:175
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Error in document indexing update expression: %(expression)s; %(exception)s"
|
||||||
|
msgstr ""
|
||||||
|
"Ошибка в выражении обновления индексов документа: %(expression)s; "
|
||||||
|
"%(exception)s"
|
||||||
|
|
||||||
|
#: api.py:178
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Error updating document index, expression: %(expression)s; %(exception)s"
|
||||||
|
msgstr ""
|
||||||
|
"Ошибка при обновлении индекса документа, выражение: %(expression)s; "
|
||||||
|
"%(exception)s"
|
||||||
|
|
||||||
|
#: api.py:209
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to delete document indexing node; %s"
|
||||||
|
msgstr "Не удается удалить узел индексирования документов; %s."
|
||||||
|
|
||||||
|
#: filesystem.py:34
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to create indexing directory; %s"
|
||||||
|
msgstr "Не удается создать индексации каталога; %s."
|
||||||
|
|
||||||
|
#: filesystem.py:52
|
||||||
|
#, python-format
|
||||||
|
msgid ""
|
||||||
|
"Unable to create symbolic link, file exists and could not be deleted: "
|
||||||
|
"%(filepath)s; %(exc)s"
|
||||||
|
msgstr ""
|
||||||
|
"Невозможно создать символическую ссылку, файл существует и не может быть "
|
||||||
|
"удален: %(filepath)s; %(exc)s"
|
||||||
|
|
||||||
|
#: filesystem.py:54
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to create symbolic link: %(filepath)s; %(exc)s"
|
||||||
|
msgstr "Невозможно создать символическую ссылку: %(filepath)s; %(exc)s"
|
||||||
|
|
||||||
|
#: filesystem.py:71
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to delete document symbolic link; %s"
|
||||||
|
msgstr "Не удается удалить символическую ссылку документа;%s."
|
||||||
|
|
||||||
|
#: filesystem.py:83
|
||||||
|
#, python-format
|
||||||
|
msgid "Unable to delete indexing directory; %s"
|
||||||
|
msgstr "Не удается удалить каталог индексации; %s."
|
||||||
|
|
||||||
|
#: models.py:11
|
||||||
|
#, python-format
|
||||||
|
msgid "Available functions: %s"
|
||||||
|
msgstr "Доступные функции: %s."
|
||||||
|
|
||||||
|
#: models.py:16
|
||||||
|
msgid "indexing expression"
|
||||||
|
msgstr "выражение индексации "
|
||||||
|
|
||||||
|
#: models.py:16
|
||||||
|
msgid "Enter a python string expression to be evaluated."
|
||||||
|
msgstr "Введите строковое выражение питона для вычисления."
|
||||||
|
|
||||||
|
#: models.py:18
|
||||||
|
msgid "enabled"
|
||||||
|
msgstr "разрешено"
|
||||||
|
|
||||||
|
#: models.py:19
|
||||||
|
msgid "link documents"
|
||||||
|
msgstr "связать документы"
|
||||||
|
|
||||||
|
#: models.py:25 models.py:31 views.py:56
|
||||||
|
msgid "index"
|
||||||
|
msgstr "индекс"
|
||||||
|
|
||||||
|
#: models.py:32
|
||||||
|
msgid "value"
|
||||||
|
msgstr "значение"
|
||||||
|
|
||||||
|
#: models.py:33
|
||||||
|
msgid "documents"
|
||||||
|
msgstr "документы"
|
||||||
|
|
||||||
|
#: models.py:46 models.py:51
|
||||||
|
msgid "index instance"
|
||||||
|
msgstr "экземпляр индекса"
|
||||||
|
|
||||||
|
#: models.py:47
|
||||||
|
msgid "indexes instances"
|
||||||
|
msgstr "экземпляры индекса"
|
||||||
|
|
||||||
|
#: models.py:52
|
||||||
|
msgid "document"
|
||||||
|
msgstr "документ"
|
||||||
|
|
||||||
|
#: models.py:59
|
||||||
|
msgid "document rename count"
|
||||||
|
msgstr "счетчик переименования документа"
|
||||||
|
|
||||||
|
#: models.py:60
|
||||||
|
msgid "documents rename count"
|
||||||
|
msgstr "счетчик переименования документов"
|
||||||
|
|
||||||
|
#: utils.py:19
|
||||||
|
msgid "document indexes"
|
||||||
|
msgstr "индексы документов"
|
||||||
|
|
||||||
|
#: views.py:38
|
||||||
|
#, python-format
|
||||||
|
msgid "contents for index: %s"
|
||||||
|
msgstr "содержания для индекса: %s."
|
||||||
|
|
||||||
|
#: views.py:60
|
||||||
|
msgid "items"
|
||||||
|
msgstr "членов"
|
||||||
|
|
||||||
|
#: views.py:82
|
||||||
|
msgid "Are you sure you wish to rebuild all indexes?"
|
||||||
|
msgstr "Вы уверены, что хотите перестроить все индексы?"
|
||||||
|
|
||||||
|
#: views.py:83
|
||||||
|
msgid "On large databases this operation may take some time to execute."
|
||||||
|
msgstr ""
|
||||||
|
"В больших базах данных эта операция может занять некоторое время для "
|
||||||
|
"выполнения."
|
||||||
|
|
||||||
|
#: views.py:89
|
||||||
|
msgid "Index rebuild completed successfully."
|
||||||
|
msgstr "восстановление индекса успешно завершено."
|
||||||
|
|
||||||
|
#: views.py:94
|
||||||
|
#, python-format
|
||||||
|
msgid "Index rebuild error: %s"
|
||||||
|
msgstr "Индекс восстановить ошибка: %s"
|
||||||
|
|
||||||
|
#: views.py:109
|
||||||
|
#, python-format
|
||||||
|
msgid "indexes containing: %s"
|
||||||
|
msgstr "индексы, содержащие: %s"
|
||||||
|
|
||||||
|
#: templates/indexing_help.html:3
|
||||||
|
msgid "What are indexes?"
|
||||||
|
msgstr "что за индексы?"
|
||||||
|
|
||||||
|
#: templates/indexing_help.html:4
|
||||||
|
msgid "Indexes group documents into a tree like hierarchical structure."
|
||||||
|
msgstr "Индексы группы документов в древовидной иерархической структуре."
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
from document_indexing.conf.settings import SUFFIX_SEPARATOR
|
|
||||||
|
|
||||||
|
|
||||||
def assemble_document_filename(document, suffix=0):
|
|
||||||
if suffix:
|
|
||||||
return SUFFIX_SEPARATOR.join([document.file_filename, unicode(suffix)])
|
|
||||||
else:
|
|
||||||
return document.file_filename
|
|
||||||
20
apps/document_indexing/os_specifics.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
from document_indexing.conf.settings import SUFFIX_SEPARATOR
|
||||||
|
|
||||||
|
|
||||||
|
def assemble_suffixed_filename(filename, suffix=0):
|
||||||
|
'''
|
||||||
|
Split document filename, to attach suffix to the name part then
|
||||||
|
re attacht the extension
|
||||||
|
'''
|
||||||
|
|
||||||
|
if suffix:
|
||||||
|
name, extension = filename.split(os.split(os.extsep))
|
||||||
|
return SUFFIX_SEPARATOR.join([name, unicode(suffix), os.extsep, extension])
|
||||||
|
else:
|
||||||
|
return file_filename
|
||||||
|
|
||||||
|
|
||||||
|
def assemble_path_from_list(directory_list):
|
||||||
|
return os.sep.join(directory_list)
|
||||||
@@ -6,37 +6,37 @@ from common.utils import validate_path, encapsulate
|
|||||||
from navigation.api import register_links, register_top_menu, \
|
from navigation.api import register_links, register_top_menu, \
|
||||||
register_model_list_columns, register_multi_item_links, \
|
register_model_list_columns, register_multi_item_links, \
|
||||||
register_sidebar_template
|
register_sidebar_template
|
||||||
from main.api import register_diagnostic, register_maintenance
|
from main.api import register_diagnostic, register_maintenance_links
|
||||||
from permissions.api import register_permission, set_namespace_title
|
from permissions.api import register_permission, set_namespace_title
|
||||||
from tags.widgets import get_tags_inline_widget_simple
|
from tags.widgets import get_tags_inline_widget_simple
|
||||||
from history.api import register_history_type
|
from history.api import register_history_type
|
||||||
from metadata.api import get_metadata_string
|
from metadata.api import get_metadata_string
|
||||||
from project_setup.api import register_setup
|
from project_setup.api import register_setup
|
||||||
|
|
||||||
from documents.models import Document, DocumentPage, \
|
from documents.models import (Document, DocumentPage,
|
||||||
DocumentPageTransformation, DocumentType, DocumentTypeFilename
|
DocumentPageTransformation, DocumentType, DocumentTypeFilename,
|
||||||
from documents.literals import PERMISSION_DOCUMENT_CREATE, \
|
DocumentVersion)
|
||||||
PERMISSION_DOCUMENT_PROPERTIES_EDIT, PERMISSION_DOCUMENT_VIEW, \
|
from documents.literals import (PERMISSION_DOCUMENT_CREATE,
|
||||||
PERMISSION_DOCUMENT_DELETE, PERMISSION_DOCUMENT_DOWNLOAD, \
|
PERMISSION_DOCUMENT_PROPERTIES_EDIT, PERMISSION_DOCUMENT_VIEW,
|
||||||
PERMISSION_DOCUMENT_TRANSFORM, PERMISSION_DOCUMENT_TOOLS, \
|
PERMISSION_DOCUMENT_DELETE, PERMISSION_DOCUMENT_DOWNLOAD,
|
||||||
PERMISSION_DOCUMENT_EDIT
|
PERMISSION_DOCUMENT_TRANSFORM, PERMISSION_DOCUMENT_TOOLS,
|
||||||
from documents.literals import PERMISSION_DOCUMENT_TYPE_EDIT, \
|
PERMISSION_DOCUMENT_EDIT, PERMISSION_DOCUMENT_VERSION_REVERT)
|
||||||
PERMISSION_DOCUMENT_TYPE_DELETE, PERMISSION_DOCUMENT_TYPE_CREATE
|
from documents.literals import (PERMISSION_DOCUMENT_TYPE_EDIT,
|
||||||
from documents.literals import HISTORY_DOCUMENT_CREATED, \
|
PERMISSION_DOCUMENT_TYPE_DELETE, PERMISSION_DOCUMENT_TYPE_CREATE)
|
||||||
HISTORY_DOCUMENT_EDITED, HISTORY_DOCUMENT_DELETED
|
from documents.literals import (HISTORY_DOCUMENT_CREATED,
|
||||||
|
HISTORY_DOCUMENT_EDITED, HISTORY_DOCUMENT_DELETED)
|
||||||
from documents.conf.settings import ZOOM_MAX_LEVEL
|
from documents.conf.settings import ZOOM_MAX_LEVEL
|
||||||
from documents.conf.settings import ZOOM_MIN_LEVEL
|
from documents.conf.settings import ZOOM_MIN_LEVEL
|
||||||
from documents.conf import settings as document_settings
|
from documents.conf import settings as document_settings
|
||||||
from documents.widgets import document_thumbnail
|
from documents.widgets import document_thumbnail
|
||||||
|
|
||||||
|
|
||||||
# Document page links expressions
|
# Document page links expressions
|
||||||
def is_first_page(context):
|
def is_first_page(context):
|
||||||
return context['page'].page_number <= 1
|
return context['page'].page_number <= 1
|
||||||
|
|
||||||
|
|
||||||
def is_last_page(context):
|
def is_last_page(context):
|
||||||
return context['page'].page_number >= context['page'].document.documentpage_set.count()
|
return context['page'].page_number >= context['page'].document_version.pages.count()
|
||||||
|
|
||||||
|
|
||||||
def is_min_zoom(context):
|
def is_min_zoom(context):
|
||||||
@@ -46,6 +46,10 @@ def is_min_zoom(context):
|
|||||||
def is_max_zoom(context):
|
def is_max_zoom(context):
|
||||||
return context['zoom'] >= ZOOM_MAX_LEVEL
|
return context['zoom'] >= ZOOM_MAX_LEVEL
|
||||||
|
|
||||||
|
|
||||||
|
def is_current_version(context):
|
||||||
|
return context['object'].document.latest_version.timestamp == context['object'].timestamp
|
||||||
|
|
||||||
# Permission setup
|
# Permission setup
|
||||||
set_namespace_title('documents', _(u'Documents'))
|
set_namespace_title('documents', _(u'Documents'))
|
||||||
register_permission(PERMISSION_DOCUMENT_CREATE)
|
register_permission(PERMISSION_DOCUMENT_CREATE)
|
||||||
@@ -56,6 +60,7 @@ register_permission(PERMISSION_DOCUMENT_DELETE)
|
|||||||
register_permission(PERMISSION_DOCUMENT_DOWNLOAD)
|
register_permission(PERMISSION_DOCUMENT_DOWNLOAD)
|
||||||
register_permission(PERMISSION_DOCUMENT_TRANSFORM)
|
register_permission(PERMISSION_DOCUMENT_TRANSFORM)
|
||||||
register_permission(PERMISSION_DOCUMENT_TOOLS)
|
register_permission(PERMISSION_DOCUMENT_TOOLS)
|
||||||
|
register_permission(PERMISSION_DOCUMENT_VERSION_REVERT)
|
||||||
|
|
||||||
# Document type permissions
|
# Document type permissions
|
||||||
set_namespace_title('documents_setup', _(u'Documents setup'))
|
set_namespace_title('documents_setup', _(u'Documents setup'))
|
||||||
@@ -70,7 +75,7 @@ register_history_type(HISTORY_DOCUMENT_DELETED)
|
|||||||
|
|
||||||
document_list = {'text': _(u'all documents'), 'view': 'document_list', 'famfam': 'page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_list = {'text': _(u'all documents'), 'view': 'document_list', 'famfam': 'page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
document_list_recent = {'text': _(u'recent documents'), 'view': 'document_list_recent', 'famfam': 'page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_list_recent = {'text': _(u'recent documents'), 'view': 'document_list_recent', 'famfam': 'page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
document_create_multiple = {'text': _(u'upload new documents'), 'view': 'document_create_multiple', 'famfam': 'page_add', 'permissions': [PERMISSION_DOCUMENT_CREATE], 'children_view_regex': ['upload']}
|
document_create_multiple = {'text': _(u'upload new documents'), 'view': 'document_create_multiple', 'famfam': 'page_add', 'permissions': [PERMISSION_DOCUMENT_CREATE], 'children_view_regex': [r'upload_interactive']}
|
||||||
document_create_siblings = {'text': _(u'clone metadata'), 'view': 'document_create_siblings', 'args': 'object.id', 'famfam': 'page_copy', 'permissions': [PERMISSION_DOCUMENT_CREATE]}
|
document_create_siblings = {'text': _(u'clone metadata'), 'view': 'document_create_siblings', 'args': 'object.id', 'famfam': 'page_copy', 'permissions': [PERMISSION_DOCUMENT_CREATE]}
|
||||||
document_view_simple = {'text': _(u'details'), 'view': 'document_view_simple', 'args': 'object.id', 'famfam': 'page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_view_simple = {'text': _(u'details'), 'view': 'document_view_simple', 'args': 'object.id', 'famfam': 'page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
document_view_advanced = {'text': _(u'properties'), 'view': 'document_view_advanced', 'args': 'object.id', 'famfam': 'page_gear', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_view_advanced = {'text': _(u'properties'), 'view': 'document_view_advanced', 'args': 'object.id', 'famfam': 'page_gear', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
@@ -79,13 +84,20 @@ document_multiple_delete = {'text': _(u'delete'), 'view': 'document_multiple_del
|
|||||||
document_edit = {'text': _(u'edit'), 'view': 'document_edit', 'args': 'object.id', 'famfam': 'page_edit', 'permissions': [PERMISSION_DOCUMENT_PROPERTIES_EDIT]}
|
document_edit = {'text': _(u'edit'), 'view': 'document_edit', 'args': 'object.id', 'famfam': 'page_edit', 'permissions': [PERMISSION_DOCUMENT_PROPERTIES_EDIT]}
|
||||||
document_preview = {'text': _(u'preview'), 'class': 'fancybox', 'view': 'document_preview', 'args': 'object.id', 'famfam': 'magnifier', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_preview = {'text': _(u'preview'), 'class': 'fancybox', 'view': 'document_preview', 'args': 'object.id', 'famfam': 'magnifier', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
document_download = {'text': _(u'download'), 'view': 'document_download', 'args': 'object.id', 'famfam': 'page_save', 'permissions': [PERMISSION_DOCUMENT_DOWNLOAD]}
|
document_download = {'text': _(u'download'), 'view': 'document_download', 'args': 'object.id', 'famfam': 'page_save', 'permissions': [PERMISSION_DOCUMENT_DOWNLOAD]}
|
||||||
document_find_duplicates = {'text': _(u'find duplicates'), 'view': 'document_find_duplicates', 'args': 'object.id', 'famfam': 'page_refresh', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_version_download = {'text': _(u'download'), 'view': 'document_version_download', 'args': 'object.pk', 'famfam': 'page_save', 'permissions': [PERMISSION_DOCUMENT_DOWNLOAD]}
|
||||||
document_find_all_duplicates = {'text': _(u'find all duplicates'), 'view': 'document_find_all_duplicates', 'famfam': 'page_refresh', 'permissions': [PERMISSION_DOCUMENT_VIEW], 'description': _(u'Search all the documents\' checksums and return a list of the exact matches.')}
|
document_find_duplicates = {'text': _(u'find duplicates'), 'view': 'document_find_duplicates', 'args': 'object.id', 'famfam': 'page_white_copy', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
|
document_find_all_duplicates = {'text': _(u'find all duplicates'), 'view': 'document_find_all_duplicates', 'famfam': 'page_white_copy', 'permissions': [PERMISSION_DOCUMENT_VIEW], 'description': _(u'Search all the documents\' checksums and return a list of the exact matches.')}
|
||||||
|
document_update_page_count = {'text': _(u'update office documents\' page count'), 'view': 'document_update_page_count', 'famfam': 'page_white_csharp', 'permissions': [PERMISSION_DOCUMENT_TOOLS], 'description': _(u'Update the page count of the office type documents. This is useful when enabling office document support after there were already office type documents in the database.')}
|
||||||
document_clear_transformations = {'text': _(u'clear transformations'), 'view': 'document_clear_transformations', 'args': 'object.id', 'famfam': 'page_paintbrush', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
document_clear_transformations = {'text': _(u'clear transformations'), 'view': 'document_clear_transformations', 'args': 'object.id', 'famfam': 'page_paintbrush', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
||||||
document_multiple_clear_transformations = {'text': _(u'clear transformations'), 'view': 'document_multiple_clear_transformations', 'famfam': 'page_paintbrush', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
document_multiple_clear_transformations = {'text': _(u'clear transformations'), 'view': 'document_multiple_clear_transformations', 'famfam': 'page_paintbrush', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
||||||
document_print = {'text': _(u'print'), 'view': 'document_print', 'args': 'object.id', 'famfam': 'printer', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_print = {'text': _(u'print'), 'view': 'document_print', 'args': 'object.id', 'famfam': 'printer', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
document_history_view = {'text': _(u'history'), 'view': 'history_for_object', 'args': ['"documents"', '"document"', 'object.id'], 'famfam': 'book_go', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_history_view = {'text': _(u'history'), 'view': 'history_for_object', 'args': ['"documents"', '"document"', 'object.id'], 'famfam': 'book_go', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
|
document_missing_list = {'text': _(u'Find missing document files'), 'view': 'document_missing_list', 'famfam': 'folder_page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
|
|
||||||
|
# Tools
|
||||||
|
document_clear_image_cache = {'text': _(u'Clear the document image cache'), 'view': 'document_clear_image_cache', 'famfam': 'camera_delete', 'permissions': [PERMISSION_DOCUMENT_TOOLS], 'description': _(u'Clear the graphics representations used to speed up the documents\' display and interactive transformations results.')}
|
||||||
|
|
||||||
|
# Document pages
|
||||||
document_page_transformation_list = {'text': _(u'page transformations'), 'class': 'no-parent-history', 'view': 'document_page_transformation_list', 'args': 'page.pk', 'famfam': 'pencil_go', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
document_page_transformation_list = {'text': _(u'page transformations'), 'class': 'no-parent-history', 'view': 'document_page_transformation_list', 'args': 'page.pk', 'famfam': 'pencil_go', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
||||||
document_page_transformation_create = {'text': _(u'create new transformation'), 'class': 'no-parent-history', 'view': 'document_page_transformation_create', 'args': 'page.pk', 'famfam': 'pencil_add', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
document_page_transformation_create = {'text': _(u'create new transformation'), 'class': 'no-parent-history', 'view': 'document_page_transformation_create', 'args': 'page.pk', 'famfam': 'pencil_add', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
||||||
document_page_transformation_edit = {'text': _(u'edit'), 'class': 'no-parent-history', 'view': 'document_page_transformation_edit', 'args': 'transformation.pk', 'famfam': 'pencil_go', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
document_page_transformation_edit = {'text': _(u'edit'), 'class': 'no-parent-history', 'view': 'document_page_transformation_edit', 'args': 'transformation.pk', 'famfam': 'pencil_go', 'permissions': [PERMISSION_DOCUMENT_TRANSFORM]}
|
||||||
@@ -104,7 +116,9 @@ document_page_rotate_right = {'text': _(u'rotate right'), 'class': 'no-parent-hi
|
|||||||
document_page_rotate_left = {'text': _(u'rotate left'), 'class': 'no-parent-history', 'view': 'document_page_rotate_left', 'args': 'page.pk', 'famfam': 'arrow_turn_left', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_page_rotate_left = {'text': _(u'rotate left'), 'class': 'no-parent-history', 'view': 'document_page_rotate_left', 'args': 'page.pk', 'famfam': 'arrow_turn_left', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
document_page_view_reset = {'text': _(u'reset view'), 'class': 'no-parent-history', 'view': 'document_page_view_reset', 'args': 'page.pk', 'famfam': 'page_white', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_page_view_reset = {'text': _(u'reset view'), 'class': 'no-parent-history', 'view': 'document_page_view_reset', 'args': 'page.pk', 'famfam': 'page_white', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
|
|
||||||
document_missing_list = {'text': _(u'Find missing document files'), 'view': 'document_missing_list', 'famfam': 'folder_page', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
# Document versions
|
||||||
|
document_version_list = {'text': _(u'versions'), 'view': 'document_version_list', 'args': 'object.pk', 'famfam': 'page_world', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
|
document_version_revert = {'text': _(u'revert'), 'view': 'document_version_revert', 'args': 'object.pk', 'famfam': 'page_refresh', 'permissions': [PERMISSION_DOCUMENT_VERSION_REVERT], 'conditional_disable': is_current_version}
|
||||||
|
|
||||||
# Document type related links
|
# Document type related links
|
||||||
document_type_list = {'text': _(u'document type list'), 'view': 'document_type_list', 'famfam': 'layout', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
document_type_list = {'text': _(u'document type list'), 'view': 'document_type_list', 'famfam': 'layout', 'permissions': [PERMISSION_DOCUMENT_VIEW]}
|
||||||
@@ -132,6 +146,9 @@ register_links(['document_type_filename_create', 'document_type_filename_list',
|
|||||||
register_links(Document, [document_edit, document_print, document_delete, document_download, document_find_duplicates, document_clear_transformations, document_create_siblings])
|
register_links(Document, [document_edit, document_print, document_delete, document_download, document_find_duplicates, document_clear_transformations, document_create_siblings])
|
||||||
register_multi_item_links(['document_find_duplicates', 'folder_view', 'index_instance_list', 'document_type_document_list', 'search', 'results', 'document_group_view', 'document_list', 'document_list_recent'], [document_multiple_clear_transformations, document_multiple_delete])
|
register_multi_item_links(['document_find_duplicates', 'folder_view', 'index_instance_list', 'document_type_document_list', 'search', 'results', 'document_group_view', 'document_list', 'document_list_recent'], [document_multiple_clear_transformations, document_multiple_delete])
|
||||||
|
|
||||||
|
# Document Version links
|
||||||
|
register_links(DocumentVersion, [document_version_revert, document_version_download])
|
||||||
|
|
||||||
secondary_menu_links = [document_list_recent, document_list, document_create_multiple]
|
secondary_menu_links = [document_list_recent, document_list, document_create_multiple]
|
||||||
|
|
||||||
register_links(['document_list_recent', 'document_list', 'document_create', 'document_create_multiple', 'upload_interactive', 'staging_file_delete'], secondary_menu_links, menu_name='secondary_menu')
|
register_links(['document_list_recent', 'document_list', 'document_create', 'document_create_multiple', 'upload_interactive', 'staging_file_delete'], secondary_menu_links, menu_name='secondary_menu')
|
||||||
@@ -158,17 +175,16 @@ register_links(['document_page_transformation_edit', 'document_page_transformati
|
|||||||
|
|
||||||
register_diagnostic('documents', _(u'Documents'), document_missing_list)
|
register_diagnostic('documents', _(u'Documents'), document_missing_list)
|
||||||
|
|
||||||
register_maintenance(document_find_all_duplicates, namespace='documents', title=_(u'documents'))
|
register_maintenance_links([document_find_all_duplicates, document_update_page_count, document_clear_image_cache], namespace='documents', title=_(u'documents'))
|
||||||
|
|
||||||
|
#def document_exists(document):
|
||||||
def document_exists(document):
|
# try:
|
||||||
try:
|
# if document.exists():
|
||||||
if document.exists():
|
# return u'<span class="famfam active famfam-tick"></span>'
|
||||||
return u'<span class="famfam active famfam-tick"></span>'
|
# else:
|
||||||
else:
|
# return u'<span class="famfam active famfam-cross"></span>'
|
||||||
return u'<span class="famfam active famfam-cross"></span>'
|
# except Exception, exc:
|
||||||
except Exception, exc:
|
# return exc
|
||||||
return exc
|
|
||||||
|
|
||||||
register_model_list_columns(Document, [
|
register_model_list_columns(Document, [
|
||||||
{'name':_(u'thumbnail'), 'attribute':
|
{'name':_(u'thumbnail'), 'attribute':
|
||||||
@@ -188,7 +204,8 @@ register_top_menu(
|
|||||||
children_path_regex=[
|
children_path_regex=[
|
||||||
r'^documents/[^t]', r'^metadata/[^s]', r'comments', r'tags/document', r'grouping/[^s]', r'history/list/for_object/documents'
|
r'^documents/[^t]', r'^metadata/[^s]', r'comments', r'tags/document', r'grouping/[^s]', r'history/list/for_object/documents'
|
||||||
],
|
],
|
||||||
children_views=['document_folder_list', 'folder_add_document', 'document_index_list'],
|
#children_view_regex=[r'upload'],
|
||||||
|
children_views=['document_folder_list', 'folder_add_document', 'document_index_list', 'upload_version',],
|
||||||
position=1
|
position=1
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -198,6 +215,7 @@ register_sidebar_template(['document_type_list'], 'document_types_help.html')
|
|||||||
register_links(Document, [document_view_simple], menu_name='form_header', position=0)
|
register_links(Document, [document_view_simple], menu_name='form_header', position=0)
|
||||||
register_links(Document, [document_view_advanced], menu_name='form_header', position=1)
|
register_links(Document, [document_view_advanced], menu_name='form_header', position=1)
|
||||||
register_links(Document, [document_history_view], menu_name='form_header')
|
register_links(Document, [document_history_view], menu_name='form_header')
|
||||||
|
register_links(Document, [document_version_list], menu_name='form_header')
|
||||||
|
|
||||||
if (validate_path(document_settings.CACHE_PATH) == False) or (not document_settings.CACHE_PATH):
|
if (validate_path(document_settings.CACHE_PATH) == False) or (not document_settings.CACHE_PATH):
|
||||||
setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())
|
setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())
|
||||||
|
|||||||
@@ -2,9 +2,27 @@ from django.contrib import admin
|
|||||||
|
|
||||||
from metadata.admin import DocumentMetadataInline
|
from metadata.admin import DocumentMetadataInline
|
||||||
|
|
||||||
from documents.models import DocumentType, Document, \
|
from documents.models import (DocumentType, Document,
|
||||||
DocumentTypeFilename, DocumentPage, \
|
DocumentTypeFilename, DocumentPage,
|
||||||
DocumentPageTransformation, RecentDocument
|
DocumentPageTransformation, RecentDocument,
|
||||||
|
DocumentVersion)
|
||||||
|
|
||||||
|
|
||||||
|
class DocumentPageInline(admin.StackedInline):
|
||||||
|
model = DocumentPage
|
||||||
|
extra = 1
|
||||||
|
classes = ('collapse-open',)
|
||||||
|
allow_add = True
|
||||||
|
|
||||||
|
|
||||||
|
class DocumentVersionInline(admin.StackedInline):
|
||||||
|
model = DocumentVersion
|
||||||
|
extra = 1
|
||||||
|
classes = ('collapse-open',)
|
||||||
|
allow_add = True
|
||||||
|
#inlines = [
|
||||||
|
# DocumentPageInline,
|
||||||
|
#]
|
||||||
|
|
||||||
|
|
||||||
class DocumentTypeFilenameInline(admin.StackedInline):
|
class DocumentTypeFilenameInline(admin.StackedInline):
|
||||||
@@ -24,18 +42,11 @@ class DocumentPageTransformationAdmin(admin.ModelAdmin):
|
|||||||
model = DocumentPageTransformation
|
model = DocumentPageTransformation
|
||||||
|
|
||||||
|
|
||||||
class DocumentPageInline(admin.StackedInline):
|
|
||||||
model = DocumentPage
|
|
||||||
extra = 1
|
|
||||||
classes = ('collapse-open',)
|
|
||||||
allow_add = True
|
|
||||||
|
|
||||||
|
|
||||||
class DocumentAdmin(admin.ModelAdmin):
|
class DocumentAdmin(admin.ModelAdmin):
|
||||||
inlines = [
|
inlines = [
|
||||||
DocumentMetadataInline, DocumentPageInline
|
DocumentMetadataInline, DocumentVersionInline
|
||||||
]
|
]
|
||||||
list_display = ('uuid', 'file_filename', 'file_extension')
|
list_display = ('uuid', 'file_filename',)
|
||||||
|
|
||||||
|
|
||||||
class RecentDocumentAdmin(admin.ModelAdmin):
|
class RecentDocumentAdmin(admin.ModelAdmin):
|
||||||
|
|||||||
@@ -11,9 +11,11 @@ from common.conf.settings import DEFAULT_PAPER_SIZE
|
|||||||
from common.conf.settings import DEFAULT_PAGE_ORIENTATION
|
from common.conf.settings import DEFAULT_PAGE_ORIENTATION
|
||||||
from common.widgets import TextAreaDiv
|
from common.widgets import TextAreaDiv
|
||||||
|
|
||||||
from documents.models import Document, DocumentType, \
|
from documents.models import (Document, DocumentType,
|
||||||
DocumentPage, DocumentPageTransformation, DocumentTypeFilename
|
DocumentPage, DocumentPageTransformation, DocumentTypeFilename,
|
||||||
|
DocumentVersion)
|
||||||
|
from documents.widgets import document_html_widget
|
||||||
|
from documents.literals import (RELEASE_LEVEL_FINAL, RELEASE_LEVEL_CHOICES)
|
||||||
|
|
||||||
# Document page forms
|
# Document page forms
|
||||||
class DocumentPageTransformationForm(forms.ModelForm):
|
class DocumentPageTransformationForm(forms.ModelForm):
|
||||||
@@ -32,22 +34,10 @@ class DocumentPageImageWidget(forms.widgets.Widget):
|
|||||||
rotation = final_attrs.get('rotation', 0)
|
rotation = final_attrs.get('rotation', 0)
|
||||||
if value:
|
if value:
|
||||||
output = []
|
output = []
|
||||||
output.append('''
|
output.append('<div class="full-height scrollable" style="overflow: auto;">')
|
||||||
<div class="full-height scrollable" style="overflow: auto;">
|
|
||||||
<div class="tc">
|
output.append(document_html_widget(value.document, view='document_display', page=value.page_number, zoom=zoom, rotation=rotation))
|
||||||
<img class="lazy-load" data-href="%(img)s?page=%(page)d&zoom=%(zoom)d&rotation=%(rotation)d" src="%(static_url)s/images/ajax-loader.gif" alt="%(string)s" />
|
output.append('</div>')
|
||||||
<noscript>
|
|
||||||
<img src="%(img)s?page=%(page)d&zoom=%(zoom)d&rotation=%(rotation)d" alt="%(string)s" />
|
|
||||||
</noscript>
|
|
||||||
</div>
|
|
||||||
</div>''' % {
|
|
||||||
'img': reverse('document_display', args=[value.document.id]),
|
|
||||||
'page': value.page_number,
|
|
||||||
'zoom': zoom,
|
|
||||||
'rotation': rotation,
|
|
||||||
'static_url': settings.STATIC_URL,
|
|
||||||
'string': ugettext(u'page image')
|
|
||||||
})
|
|
||||||
return mark_safe(u''.join(output))
|
return mark_safe(u''.join(output))
|
||||||
else:
|
else:
|
||||||
return u''
|
return u''
|
||||||
@@ -112,36 +102,27 @@ class DocumentPagesCarouselWidget(forms.widgets.Widget):
|
|||||||
output = []
|
output = []
|
||||||
output.append(u'<div style="white-space:nowrap; overflow: auto;">')
|
output.append(u'<div style="white-space:nowrap; overflow: auto;">')
|
||||||
|
|
||||||
for page in value.documentpage_set.all():
|
for page in value.pages.all():
|
||||||
|
|
||||||
|
output.append(u'<div style="display: inline-block; margin: 5px 10px 10px 10px;">')
|
||||||
|
output.append(u'<div class="tc">%(page_string)s %(page)s</div>' % {'page_string': ugettext(u'Page'), 'page': page.page_number})
|
||||||
output.append(
|
output.append(
|
||||||
u'''<div style="display: inline-block; margin: 5px 10px 10px 10px;">
|
document_html_widget(
|
||||||
<div class="tc">%(page_string)s %(page)s</div>
|
page.document,
|
||||||
<div class="tc" style="border: 1px solid black; margin: 5px 0px 5px 0px;">
|
view='document_preview_multipage',
|
||||||
<a rel="page_gallery" class="fancybox-noscaling" href="%(view_url)s?page=%(page)d">
|
click_view='document_display',
|
||||||
<img class="lazy-load" data-href="%(img)s?page=%(page)d" src="%(static_url)s/images/ajax-loader.gif" alt="%(string)s" />
|
page=page.page_number,
|
||||||
<noscript>
|
gallery_name='document_pages',
|
||||||
<img src="%(img)s?page=%(page)d" alt="%(string)s" />
|
fancybox_class='fancybox-noscaling',
|
||||||
</noscript>
|
)
|
||||||
</a>
|
)
|
||||||
</div>
|
output.append(u'<div class="tc">')
|
||||||
<div class="tc">
|
output.append(u'<a class="fancybox-iframe" href="%s"><span class="famfam active famfam-page_white_go"></span>%s</a>' % (reverse('document_page_view', args=[page.pk]), ugettext(u'Details')))
|
||||||
<a class="fancybox-iframe" href="%(url)s"><span class="famfam active famfam-page_white_go"></span>%(details_string)s</a>
|
output.append(u'</div>')
|
||||||
</div>
|
output.append(u'</div>')
|
||||||
</div>''' % {
|
|
||||||
'url': reverse('document_page_view', args=[page.pk]),
|
|
||||||
'img': reverse('document_preview_multipage', args=[value.pk]),
|
|
||||||
'page': page.page_number,
|
|
||||||
'view_url': reverse('document_display', args=[page.document.pk]),
|
|
||||||
'page_string': ugettext(u'Page'),
|
|
||||||
'details_string': ugettext(u'Details'),
|
|
||||||
'static_url': settings.STATIC_URL,
|
|
||||||
'string': _(u'document page')
|
|
||||||
})
|
|
||||||
|
|
||||||
output.append(u'</div>')
|
output.append(u'</div>')
|
||||||
output.append(
|
output.append(u'<br /><span class="famfam active famfam-magnifier"></span>%s' % ugettext(u'Click on the image for full size preview'))
|
||||||
u'<br /><span class="famfam active famfam-magnifier"></span>%s' %
|
|
||||||
ugettext(u'Click on the image for full size preview'))
|
|
||||||
|
|
||||||
return mark_safe(u''.join(output))
|
return mark_safe(u''.join(output))
|
||||||
|
|
||||||
@@ -151,7 +132,7 @@ class DocumentPreviewForm(forms.Form):
|
|||||||
document = kwargs.pop('document', None)
|
document = kwargs.pop('document', None)
|
||||||
super(DocumentPreviewForm, self).__init__(*args, **kwargs)
|
super(DocumentPreviewForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['preview'].initial = document
|
self.fields['preview'].initial = document
|
||||||
self.fields['preview'].label = _(u'Document pages (%s)') % document.documentpage_set.count()
|
self.fields['preview'].label = _(u'Document pages (%s)') % document.pages.count()
|
||||||
|
|
||||||
preview = forms.CharField(widget=DocumentPagesCarouselWidget())
|
preview = forms.CharField(widget=DocumentPagesCarouselWidget())
|
||||||
|
|
||||||
@@ -175,6 +156,13 @@ class DocumentForm(forms.ModelForm):
|
|||||||
# To allow merging with DocumentForm_edit
|
# To allow merging with DocumentForm_edit
|
||||||
self.fields['document_type'].widget = forms.HiddenInput()
|
self.fields['document_type'].widget = forms.HiddenInput()
|
||||||
|
|
||||||
|
if instance:
|
||||||
|
self.fields['use_file_name'] = forms.BooleanField(
|
||||||
|
label=_(u'Use the new version filename as the document filename'),
|
||||||
|
initial=False,
|
||||||
|
required=False,
|
||||||
|
)
|
||||||
|
|
||||||
# Instance's document_type overrides the passed document_type
|
# Instance's document_type overrides the passed document_type
|
||||||
if instance:
|
if instance:
|
||||||
if hasattr(instance, 'document_type'):
|
if hasattr(instance, 'document_type'):
|
||||||
@@ -188,10 +176,50 @@ class DocumentForm(forms.ModelForm):
|
|||||||
required=False,
|
required=False,
|
||||||
label=_(u'Quick document rename'))
|
label=_(u'Quick document rename'))
|
||||||
|
|
||||||
|
if instance:
|
||||||
|
self.version_fields(instance)
|
||||||
|
|
||||||
|
def version_fields(self, document):
|
||||||
|
self.fields['version_update'] = forms.ChoiceField(
|
||||||
|
label=_(u'Version update'),
|
||||||
|
choices=DocumentVersion.get_version_update_choices(document.latest_version)
|
||||||
|
)
|
||||||
|
|
||||||
|
self.fields['release_level'] = forms.ChoiceField(
|
||||||
|
label=_(u'Release level'),
|
||||||
|
choices=RELEASE_LEVEL_CHOICES,
|
||||||
|
initial=RELEASE_LEVEL_FINAL,
|
||||||
|
)
|
||||||
|
|
||||||
|
self.fields['serial'] = forms.IntegerField(
|
||||||
|
label=_(u'Release level serial'),
|
||||||
|
initial=0,
|
||||||
|
widget=forms.widgets.TextInput(
|
||||||
|
attrs = {'style': 'width: auto;'}
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
self.fields['comment'] = forms.CharField(
|
||||||
|
label=_(u'Comment'),
|
||||||
|
required=False,
|
||||||
|
widget=forms.widgets.Textarea(attrs={'rows': 4}),
|
||||||
|
)
|
||||||
|
|
||||||
new_filename = forms.CharField(
|
new_filename = forms.CharField(
|
||||||
label=_('New document filename'), required=False
|
label=_('New document filename'), required=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def clean(self):
|
||||||
|
cleaned_data = self.cleaned_data
|
||||||
|
cleaned_data['new_version_data'] = {
|
||||||
|
'comment': self.cleaned_data.get('comment'),
|
||||||
|
'version_update': self.cleaned_data.get('version_update'),
|
||||||
|
'release_level': self.cleaned_data.get('release_level'),
|
||||||
|
'serial': self.cleaned_data.get('serial'),
|
||||||
|
}
|
||||||
|
|
||||||
|
# Always return the full collection of cleaned data.
|
||||||
|
return cleaned_data
|
||||||
|
|
||||||
class DocumentForm_edit(DocumentForm):
|
class DocumentForm_edit(DocumentForm):
|
||||||
"""
|
"""
|
||||||
@@ -201,6 +229,13 @@ class DocumentForm_edit(DocumentForm):
|
|||||||
model = Document
|
model = Document
|
||||||
exclude = ('file', 'document_type', 'tags')
|
exclude = ('file', 'document_type', 'tags')
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super(DocumentForm_edit, self).__init__(*args, **kwargs)
|
||||||
|
self.fields.pop('serial')
|
||||||
|
self.fields.pop('release_level')
|
||||||
|
self.fields.pop('version_update')
|
||||||
|
self.fields.pop('comment')
|
||||||
|
|
||||||
|
|
||||||
class DocumentPropertiesForm(DetailForm):
|
class DocumentPropertiesForm(DetailForm):
|
||||||
"""
|
"""
|
||||||
@@ -221,7 +256,7 @@ class DocumentContentForm(forms.Form):
|
|||||||
super(DocumentContentForm, self).__init__(*args, **kwargs)
|
super(DocumentContentForm, self).__init__(*args, **kwargs)
|
||||||
content = []
|
content = []
|
||||||
self.fields['contents'].initial = u''
|
self.fields['contents'].initial = u''
|
||||||
for page in self.document.documentpage_set.all():
|
for page in self.document.pages.all():
|
||||||
if page.content:
|
if page.content:
|
||||||
content.append(page.content)
|
content.append(page.content)
|
||||||
content.append(u'\n\n\n - Page %s - \n\n\n' % page.page_number)
|
content.append(u'\n\n\n - Page %s - \n\n\n' % page.page_number)
|
||||||
@@ -243,10 +278,10 @@ class DocumentTypeSelectForm(forms.Form):
|
|||||||
|
|
||||||
|
|
||||||
class PrintForm(forms.Form):
|
class PrintForm(forms.Form):
|
||||||
page_size = forms.ChoiceField(choices=PAGE_SIZE_CHOICES, initial=DEFAULT_PAPER_SIZE, label=_(u'Page size'), required=False)
|
#page_size = forms.ChoiceField(choices=PAGE_SIZE_CHOICES, initial=DEFAULT_PAPER_SIZE, label=_(u'Page size'), required=False)
|
||||||
custom_page_width = forms.CharField(label=_(u'Custom page width'), required=False)
|
#custom_page_width = forms.CharField(label=_(u'Custom page width'), required=False)
|
||||||
custom_page_height = forms.CharField(label=_(u'Custom page height'), required=False)
|
#custom_page_height = forms.CharField(label=_(u'Custom page height'), required=False)
|
||||||
page_orientation = forms.ChoiceField(choices=PAGE_ORIENTATION_CHOICES, initial=DEFAULT_PAGE_ORIENTATION, label=_(u'Page orientation'), required=True)
|
#page_orientation = forms.ChoiceField(choices=PAGE_ORIENTATION_CHOICES, initial=DEFAULT_PAGE_ORIENTATION, label=_(u'Page orientation'), required=True)
|
||||||
page_range = forms.CharField(label=_(u'Page range'), required=False)
|
page_range = forms.CharField(label=_(u'Page range'), required=False)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ PERMISSION_DOCUMENT_DELETE = {'namespace': 'documents', 'name': 'document_delete
|
|||||||
PERMISSION_DOCUMENT_DOWNLOAD = {'namespace': 'documents', 'name': 'document_download', 'label': _(u'Download documents')}
|
PERMISSION_DOCUMENT_DOWNLOAD = {'namespace': 'documents', 'name': 'document_download', 'label': _(u'Download documents')}
|
||||||
PERMISSION_DOCUMENT_TRANSFORM = {'namespace': 'documents', 'name': 'document_transform', 'label': _(u'Transform documents')}
|
PERMISSION_DOCUMENT_TRANSFORM = {'namespace': 'documents', 'name': 'document_transform', 'label': _(u'Transform documents')}
|
||||||
PERMISSION_DOCUMENT_TOOLS = {'namespace': 'documents', 'name': 'document_tools', 'label': _(u'Execute document modifying tools')}
|
PERMISSION_DOCUMENT_TOOLS = {'namespace': 'documents', 'name': 'document_tools', 'label': _(u'Execute document modifying tools')}
|
||||||
|
PERMISSION_DOCUMENT_VERSION_REVERT = {'namespace': 'documents', 'name': 'document_version_revert', 'label': _(u'Revert documents to a previous version')}
|
||||||
|
|
||||||
PERMISSION_DOCUMENT_TYPE_EDIT = {'namespace': 'documents_setup', 'name': 'document_type_edit', 'label': _(u'Edit document types')}
|
PERMISSION_DOCUMENT_TYPE_EDIT = {'namespace': 'documents_setup', 'name': 'document_type_edit', 'label': _(u'Edit document types')}
|
||||||
PERMISSION_DOCUMENT_TYPE_DELETE = {'namespace': 'documents_setup', 'name': 'document_type_delete', 'label': _(u'Delete document types')}
|
PERMISSION_DOCUMENT_TYPE_DELETE = {'namespace': 'documents_setup', 'name': 'document_type_delete', 'label': _(u'Delete document types')}
|
||||||
@@ -44,3 +45,21 @@ HISTORY_DOCUMENT_DELETED = {
|
|||||||
'details': _(u'Document "%(document)s" deleted on %(datetime)s by %(fullname)s.'),
|
'details': _(u'Document "%(document)s" deleted on %(datetime)s by %(fullname)s.'),
|
||||||
'expressions': {'fullname': 'user.get_full_name() if user.get_full_name() else user.username'}
|
'expressions': {'fullname': 'user.get_full_name() if user.get_full_name() else user.username'}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RELEASE_LEVEL_FINAL = 1
|
||||||
|
RELEASE_LEVEL_ALPHA = 2
|
||||||
|
RELEASE_LEVEL_BETA = 3
|
||||||
|
RELEASE_LEVEL_RC = 4
|
||||||
|
RELEASE_LEVEL_HF = 5
|
||||||
|
|
||||||
|
RELEASE_LEVEL_CHOICES = (
|
||||||
|
(RELEASE_LEVEL_FINAL, _(u'final')),
|
||||||
|
(RELEASE_LEVEL_ALPHA, _(u'alpha')),
|
||||||
|
(RELEASE_LEVEL_BETA, _(u'beta')),
|
||||||
|
(RELEASE_LEVEL_RC, _(u'release candidate')),
|
||||||
|
(RELEASE_LEVEL_HF, _(u'hotfix')),
|
||||||
|
)
|
||||||
|
|
||||||
|
VERSION_UPDATE_MAJOR = u'major'
|
||||||
|
VERSION_UPDATE_MINOR = u'minor'
|
||||||
|
VERSION_UPDATE_MICRO = u'micro'
|
||||||
|
|||||||
BIN
apps/documents/locale/ru/LC_MESSAGES/django.mo
Normal file
971
apps/documents/locale/ru/LC_MESSAGES/django.po
Normal file
219
apps/documents/migrations/0001_initial.py
Normal file
@@ -0,0 +1,219 @@
|
|||||||
|
# encoding: 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 'DocumentType'
|
||||||
|
db.create_table('documents_documenttype', (
|
||||||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('name', self.gf('django.db.models.fields.CharField')(max_length=32)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('documents', ['DocumentType'])
|
||||||
|
|
||||||
|
# Adding model 'Document'
|
||||||
|
db.create_table('documents_document', (
|
||||||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('document_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentType'], null=True, blank=True)),
|
||||||
|
('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
|
||||||
|
('uuid', self.gf('django.db.models.fields.CharField')(default=u'107e50a8-83b3-46da-bd14-460489527ab1', max_length=48, blank=True)),
|
||||||
|
('file_mimetype', self.gf('django.db.models.fields.CharField')(default='', max_length=64)),
|
||||||
|
('file_mime_encoding', self.gf('django.db.models.fields.CharField')(default='', max_length=64)),
|
||||||
|
('file_filename', self.gf('django.db.models.fields.CharField')(default=u'', max_length=255, db_index=True)),
|
||||||
|
('file_extension', self.gf('django.db.models.fields.CharField')(default=u'', max_length=16, db_index=True)),
|
||||||
|
('date_added', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, db_index=True, blank=True)),
|
||||||
|
('date_updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
|
||||||
|
('checksum', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
|
||||||
|
('description', self.gf('django.db.models.fields.TextField')(db_index=True, null=True, blank=True)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('documents', ['Document'])
|
||||||
|
|
||||||
|
# Adding model 'DocumentTypeFilename'
|
||||||
|
db.create_table('documents_documenttypefilename', (
|
||||||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('document_type', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentType'])),
|
||||||
|
('filename', self.gf('django.db.models.fields.CharField')(max_length=128, db_index=True)),
|
||||||
|
('enabled', self.gf('django.db.models.fields.BooleanField')(default=True)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('documents', ['DocumentTypeFilename'])
|
||||||
|
|
||||||
|
# Adding model 'DocumentPage'
|
||||||
|
db.create_table('documents_documentpage', (
|
||||||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])),
|
||||||
|
('content', self.gf('django.db.models.fields.TextField')(db_index=True, null=True, blank=True)),
|
||||||
|
('page_label', self.gf('django.db.models.fields.CharField')(max_length=32, null=True, blank=True)),
|
||||||
|
('page_number', self.gf('django.db.models.fields.PositiveIntegerField')(default=1, db_index=True)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('documents', ['DocumentPage'])
|
||||||
|
|
||||||
|
# Adding model 'DocumentPageTransformation'
|
||||||
|
db.create_table('documents_documentpagetransformation', (
|
||||||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('document_page', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentPage'])),
|
||||||
|
('order', self.gf('django.db.models.fields.PositiveIntegerField')(default=0, null=True, db_index=True, blank=True)),
|
||||||
|
('transformation', self.gf('django.db.models.fields.CharField')(max_length=128)),
|
||||||
|
('arguments', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('documents', ['DocumentPageTransformation'])
|
||||||
|
|
||||||
|
# Adding model 'RecentDocument'
|
||||||
|
db.create_table('documents_recentdocument', (
|
||||||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
|
||||||
|
('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'])),
|
||||||
|
('datetime_accessed', self.gf('django.db.models.fields.DateTimeField')(db_index=True)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('documents', ['RecentDocument'])
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Deleting model 'DocumentType'
|
||||||
|
db.delete_table('documents_documenttype')
|
||||||
|
|
||||||
|
# Deleting model 'Document'
|
||||||
|
db.delete_table('documents_document')
|
||||||
|
|
||||||
|
# Deleting model 'DocumentTypeFilename'
|
||||||
|
db.delete_table('documents_documenttypefilename')
|
||||||
|
|
||||||
|
# Deleting model 'DocumentPage'
|
||||||
|
db.delete_table('documents_documentpage')
|
||||||
|
|
||||||
|
# Deleting model 'DocumentPageTransformation'
|
||||||
|
db.delete_table('documents_documentpagetransformation')
|
||||||
|
|
||||||
|
# Deleting model 'RecentDocument'
|
||||||
|
db.delete_table('documents_recentdocument')
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'file_extension': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '16', 'db_index': 'True'}),
|
||||||
|
'file_filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'file_mime_encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file_mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'107e50a8-83b3-46da-bd14-460489527ab1'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
146
apps/documents/migrations/0002_filename_extension_merge.py
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
import os
|
||||||
|
import datetime
|
||||||
|
from south.db import db
|
||||||
|
from south.v2 import DataMigration
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
class Migration(DataMigration):
|
||||||
|
|
||||||
|
def forwards(self, orm):
|
||||||
|
"Write your forwards methods here."
|
||||||
|
for document in orm.Document.objects.all():
|
||||||
|
document.file_filename = os.extsep.join([document.file_filename, document.file_extension])
|
||||||
|
document.save()
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
"Write your backwards methods here."
|
||||||
|
for document in orm.Document.objects.all():
|
||||||
|
document.file_filename, document.file_extension = document.file_filename.split(os.extsep)
|
||||||
|
document.save()
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'file_extension': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '16', 'db_index': 'True'}),
|
||||||
|
'file_filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'file_mime_encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file_mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'28bd60c6-a5c2-4adb-8dab-1b6c0098cc9c'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
# encoding: 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 'Document.file_extension'
|
||||||
|
db.delete_column('documents_document', 'file_extension')
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Adding field 'Document.file_extension'
|
||||||
|
db.add_column('documents_document', 'file_extension', self.gf('django.db.models.fields.CharField')(default=u'', max_length=16, db_index=True), keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'file_filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'file_mime_encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file_mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'06a88ff6-11b2-44b3-8409-21bd58577d4f'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
# encoding: 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 'DocumentVersion'
|
||||||
|
db.create_table('documents_documentversion', (
|
||||||
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
|
('document', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'], null=True, blank=True)),
|
||||||
|
('mayor', self.gf('django.db.models.fields.PositiveIntegerField')(default=1)),
|
||||||
|
('minor', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
|
||||||
|
('micro', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
|
||||||
|
('release_level', self.gf('django.db.models.fields.PositiveIntegerField')(default=1)),
|
||||||
|
('serial', self.gf('django.db.models.fields.PositiveIntegerField')(default=0)),
|
||||||
|
('timestamp', self.gf('django.db.models.fields.DateTimeField')()),
|
||||||
|
('file', self.gf('django.db.models.fields.files.FileField')(max_length=100)),
|
||||||
|
('mimetype', self.gf('django.db.models.fields.CharField')(default='', max_length=64)),
|
||||||
|
('encoding', self.gf('django.db.models.fields.CharField')(default='', max_length=64)),
|
||||||
|
('filename', self.gf('django.db.models.fields.CharField')(default=u'', max_length=255, db_index=True)),
|
||||||
|
('checksum', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
|
||||||
|
))
|
||||||
|
db.send_create_signal('documents', ['DocumentVersion'])
|
||||||
|
|
||||||
|
# Adding unique constraint on 'DocumentVersion', fields ['document', 'mayor', 'minor', 'micro', 'release_level', 'serial']
|
||||||
|
db.create_unique('documents_documentversion', ['document_id', 'mayor', 'minor', 'micro', 'release_level', 'serial'])
|
||||||
|
|
||||||
|
# Adding field 'DocumentPage.document_version'
|
||||||
|
db.add_column('documents_documentpage', 'document_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentVersion'], null=True, blank=True), keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Removing unique constraint on 'DocumentVersion', fields ['document', 'mayor', 'minor', 'micro', 'release_level', 'serial']
|
||||||
|
db.delete_unique('documents_documentversion', ['document_id', 'mayor', 'minor', 'micro', 'release_level', 'serial'])
|
||||||
|
|
||||||
|
# Deleting model 'DocumentVersion'
|
||||||
|
db.delete_table('documents_documentversion')
|
||||||
|
|
||||||
|
# Deleting field 'DocumentPage.document_version'
|
||||||
|
db.delete_column('documents_documentpage', 'document_version_id')
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'file_filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'file_mime_encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file_mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'a8389d7d-b9f4-4e51-ac24-dd9dd310fd8c'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'mayor', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'mayor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
176
apps/documents/migrations/0005_document_versions.py
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
import datetime
|
||||||
|
from south.db import db
|
||||||
|
from south.v2 import DataMigration
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
class Migration(DataMigration):
|
||||||
|
|
||||||
|
def forwards(self, orm):
|
||||||
|
for document in orm.Document.objects.all():
|
||||||
|
document_version = document.documentversion_set.create(
|
||||||
|
document = document,
|
||||||
|
timestamp = document.date_added,
|
||||||
|
file = document.file,
|
||||||
|
mimetype = document.file_mimetype,
|
||||||
|
encoding = document.file_mime_encoding,
|
||||||
|
filename = document.file_filename,
|
||||||
|
checksum = document.checksum,
|
||||||
|
)
|
||||||
|
document_version.save()
|
||||||
|
for document_page in document.documentpage_set.all():
|
||||||
|
document_page.document_version = document_version
|
||||||
|
document_page.save()
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
for document in orm.Document.objects.all():
|
||||||
|
document_version = document.documentversion_set.all()[0]
|
||||||
|
document.date_added = document_version.timestamp
|
||||||
|
document.file = document_version.file
|
||||||
|
document.file_mimetype = document_version.mimetype
|
||||||
|
document.file_mime_encoding = document_version.encoding
|
||||||
|
document.filename = document_version.filename
|
||||||
|
document.checksum = document_version.checksum
|
||||||
|
document.save()
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'file_filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'file_mime_encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file_mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'6c189f1f-1d85-48b5-9b7d-e8e319603e77'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'mayor', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'mayor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
import datetime
|
||||||
|
from south.db import db
|
||||||
|
from south.v2 import DataMigration
|
||||||
|
from django.db import models
|
||||||
|
|
||||||
|
class Migration(DataMigration):
|
||||||
|
|
||||||
|
def forwards(self, orm):
|
||||||
|
qs = orm.DocumentPage.objects.filter(document_version=None)
|
||||||
|
#print 'Invalid document pages to delete: %s' % qs.count()
|
||||||
|
for document_page in qs:
|
||||||
|
document_page.delete()
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
def backwards(self, orm):
|
||||||
|
raise RuntimeError('Cannot reverse this migration.')
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'date_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'file_filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'file_mime_encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file_mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'6c189f1f-1d85-48b5-9b7d-e8e319603e77'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'mayor', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'mayor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
202
apps/documents/migrations/0007_remove_old_file_fields.py
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
# encoding: 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):
|
||||||
|
|
||||||
|
# Changing field 'DocumentVersion.document'
|
||||||
|
db.alter_column('documents_documentversion', 'document_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document']))
|
||||||
|
|
||||||
|
# Deleting field 'Document.date_updated'
|
||||||
|
db.delete_column('documents_document', 'date_updated')
|
||||||
|
|
||||||
|
# Deleting field 'Document.file'
|
||||||
|
db.delete_column('documents_document', 'file')
|
||||||
|
|
||||||
|
# Deleting field 'Document.file_filename'
|
||||||
|
db.delete_column('documents_document', 'file_filename')
|
||||||
|
|
||||||
|
# Deleting field 'Document.file_mimetype'
|
||||||
|
db.delete_column('documents_document', 'file_mimetype')
|
||||||
|
|
||||||
|
# Deleting field 'Document.checksum'
|
||||||
|
db.delete_column('documents_document', 'checksum')
|
||||||
|
|
||||||
|
# Deleting field 'Document.file_mime_encoding'
|
||||||
|
db.delete_column('documents_document', 'file_mime_encoding')
|
||||||
|
|
||||||
|
# Deleting field 'DocumentPage.document'
|
||||||
|
db.delete_column('documents_documentpage', 'document_id')
|
||||||
|
|
||||||
|
# Changing field 'DocumentPage.document_version'
|
||||||
|
db.alter_column('documents_documentpage', 'document_version_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentVersion']))
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Changing field 'DocumentVersion.document'
|
||||||
|
db.alter_column('documents_documentversion', 'document_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'], null=True))
|
||||||
|
|
||||||
|
# Adding field 'Document.date_updated'
|
||||||
|
db.add_column('documents_document', 'date_updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, default=datetime.datetime(2011, 12, 2, 2, 17, 25, 53565), blank=True), keep_default=False)
|
||||||
|
|
||||||
|
# Adding field 'Document.file'
|
||||||
|
db.add_column('documents_document', 'file', self.gf('django.db.models.fields.files.FileField')(default='', max_length=100), keep_default=False)
|
||||||
|
|
||||||
|
# Adding field 'Document.file_filename'
|
||||||
|
db.add_column('documents_document', 'file_filename', self.gf('django.db.models.fields.CharField')(default=u'', max_length=255, db_index=True), keep_default=False)
|
||||||
|
|
||||||
|
# Adding field 'Document.file_mimetype'
|
||||||
|
db.add_column('documents_document', 'file_mimetype', self.gf('django.db.models.fields.CharField')(default='', max_length=64), keep_default=False)
|
||||||
|
|
||||||
|
# Adding field 'Document.checksum'
|
||||||
|
db.add_column('documents_document', 'checksum', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_default=False)
|
||||||
|
|
||||||
|
# Adding field 'Document.file_mime_encoding'
|
||||||
|
db.add_column('documents_document', 'file_mime_encoding', self.gf('django.db.models.fields.CharField')(default='', max_length=64), keep_default=False)
|
||||||
|
|
||||||
|
# Adding field 'DocumentPage.document'
|
||||||
|
db.add_column('documents_documentpage', 'document', self.gf('django.db.models.fields.related.ForeignKey')(default=0, to=orm['documents.Document']), keep_default=False)
|
||||||
|
|
||||||
|
# Changing field 'DocumentPage.document_version'
|
||||||
|
db.alter_column('documents_documentpage', 'document_version_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentVersion'], null=True))
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'83100718-e901-4880-95f8-3618749c8a99'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'mayor', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'mayor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
172
apps/documents/migrations/0008_fix_mayor_field_name.py
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
# encoding: 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):
|
||||||
|
|
||||||
|
# Removing unique constraint on 'DocumentVersion', fields ['release_level', 'micro', 'serial', 'document', 'mayor', 'minor']
|
||||||
|
db.delete_unique('documents_documentversion', ['release_level', 'micro', 'serial', 'document_id', 'mayor', 'minor'])
|
||||||
|
|
||||||
|
# Deleting field 'DocumentVersion.mayor'
|
||||||
|
db.delete_column('documents_documentversion', 'mayor')
|
||||||
|
|
||||||
|
# Adding field 'DocumentVersion.major'
|
||||||
|
db.add_column('documents_documentversion', 'major', self.gf('django.db.models.fields.PositiveIntegerField')(default=1), keep_default=False)
|
||||||
|
|
||||||
|
# Adding unique constraint on 'DocumentVersion', fields ['major', 'release_level', 'micro', 'serial', 'document', 'minor']
|
||||||
|
db.create_unique('documents_documentversion', ['major', 'release_level', 'micro', 'serial', 'document_id', 'minor'])
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Removing unique constraint on 'DocumentVersion', fields ['major', 'release_level', 'micro', 'serial', 'document', 'minor']
|
||||||
|
db.delete_unique('documents_documentversion', ['major', 'release_level', 'micro', 'serial', 'document_id', 'minor'])
|
||||||
|
|
||||||
|
# Adding field 'DocumentVersion.mayor'
|
||||||
|
db.add_column('documents_documentversion', 'mayor', self.gf('django.db.models.fields.PositiveIntegerField')(default=1), keep_default=False)
|
||||||
|
|
||||||
|
# Deleting field 'DocumentVersion.major'
|
||||||
|
db.delete_column('documents_documentversion', 'major')
|
||||||
|
|
||||||
|
# Adding unique constraint on 'DocumentVersion', fields ['release_level', 'micro', 'serial', 'document', 'mayor', 'minor']
|
||||||
|
db.create_unique('documents_documentversion', ['release_level', 'micro', 'serial', 'document_id', 'mayor', 'minor'])
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'750a3848-39cf-45a5-9a96-e948d09833d7'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'major', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'major': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
155
apps/documents/migrations/0009_add_comment_field.py
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
# encoding: 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 field 'DocumentVersion.comment'
|
||||||
|
db.add_column('documents_documentversion', 'comment', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Deleting field 'DocumentVersion.comment'
|
||||||
|
db.delete_column('documents_documentversion', 'comment')
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'default': "u'123068ef-26d2-45bb-8933-cb6818cd87e4'", 'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'major', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'major': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
# encoding: 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):
|
||||||
|
|
||||||
|
# Changing field 'Document.date_added'
|
||||||
|
db.alter_column('documents_document', 'date_added', self.gf('django.db.models.fields.DateTimeField')())
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Changing field 'Document.date_added'
|
||||||
|
db.alter_column('documents_document', 'date_added', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True))
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'major', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'major': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
# encoding: 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 field 'DocumentVersion.signature_state'
|
||||||
|
db.add_column('documents_documentversion', 'signature_state', self.gf('django.db.models.fields.CharField')(max_length=16, null=True, blank=True), keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Deleting field 'DocumentVersion.signature_state'
|
||||||
|
db.delete_column('documents_documentversion', 'signature_state')
|
||||||
|
|
||||||
|
|
||||||
|
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'})
|
||||||
|
},
|
||||||
|
'comments.comment': {
|
||||||
|
'Meta': {'ordering': "('submit_date',)", 'object_name': 'Comment', 'db_table': "'django_comments'"},
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'max_length': '3000'}),
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'content_type_set_for_comment'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'is_public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'is_removed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||||
|
'object_pk': ('django.db.models.fields.TextField', [], {}),
|
||||||
|
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
|
||||||
|
'submit_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'comment_comments'", 'null': 'True', 'to': "orm['auth.User']"}),
|
||||||
|
'user_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
|
||||||
|
'user_name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
|
||||||
|
'user_url': ('django.db.models.fields.URLField', [], {'max_length': '200', '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'})
|
||||||
|
},
|
||||||
|
'documents.document': {
|
||||||
|
'Meta': {'ordering': "['-date_added']", 'object_name': 'Document'},
|
||||||
|
'date_added': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'description': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']", 'null': 'True', 'blank': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'uuid': ('django.db.models.fields.CharField', [], {'max_length': '48', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpage': {
|
||||||
|
'Meta': {'ordering': "['page_number']", 'object_name': 'DocumentPage'},
|
||||||
|
'content': ('django.db.models.fields.TextField', [], {'db_index': 'True', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_version': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentVersion']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'page_label': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'page_number': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentpagetransformation': {
|
||||||
|
'Meta': {'ordering': "('order',)", 'object_name': 'DocumentPageTransformation'},
|
||||||
|
'arguments': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'document_page': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentPage']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0', 'null': 'True', 'db_index': 'True', 'blank': 'True'}),
|
||||||
|
'transformation': ('django.db.models.fields.CharField', [], {'max_length': '128'})
|
||||||
|
},
|
||||||
|
'documents.documenttype': {
|
||||||
|
'Meta': {'ordering': "['name']", 'object_name': 'DocumentType'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '32'})
|
||||||
|
},
|
||||||
|
'documents.documenttypefilename': {
|
||||||
|
'Meta': {'ordering': "['filename']", 'object_name': 'DocumentTypeFilename'},
|
||||||
|
'document_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.DocumentType']"}),
|
||||||
|
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'max_length': '128', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
|
||||||
|
},
|
||||||
|
'documents.documentversion': {
|
||||||
|
'Meta': {'unique_together': "(('document', 'major', 'minor', 'micro', 'release_level', 'serial'),)", 'object_name': 'DocumentVersion'},
|
||||||
|
'checksum': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
|
||||||
|
'comment': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'encoding': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
|
||||||
|
'filename': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'db_index': 'True'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'major': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'micro': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'mimetype': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '64'}),
|
||||||
|
'minor': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'release_level': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),
|
||||||
|
'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
|
||||||
|
'signature_state': ('django.db.models.fields.CharField', [], {'max_length': '16', 'null': 'True', 'blank': 'True'}),
|
||||||
|
'timestamp': ('django.db.models.fields.DateTimeField', [], {})
|
||||||
|
},
|
||||||
|
'documents.recentdocument': {
|
||||||
|
'Meta': {'ordering': "('-datetime_accessed',)", 'object_name': 'RecentDocument'},
|
||||||
|
'datetime_accessed': ('django.db.models.fields.DateTimeField', [], {'db_index': 'True'}),
|
||||||
|
'document': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['documents.Document']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
|
||||||
|
},
|
||||||
|
'sites.site': {
|
||||||
|
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
|
||||||
|
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
|
||||||
|
},
|
||||||
|
'taggit.tag': {
|
||||||
|
'Meta': {'object_name': 'Tag'},
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'})
|
||||||
|
},
|
||||||
|
'taggit.taggeditem': {
|
||||||
|
'Meta': {'object_name': 'TaggedItem'},
|
||||||
|
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_tagged_items'", 'to': "orm['contenttypes.ContentType']"}),
|
||||||
|
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'object_id': ('django.db.models.fields.IntegerField', [], {'db_index': 'True'}),
|
||||||
|
'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'taggit_taggeditem_items'", 'to': "orm['taggit.Tag']"})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['documents']
|
||||||
BIN
apps/documents/static/images/icons/camera_delete.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
apps/documents/static/images/icons/page_white_copy.png
Normal file
|
After Width: | Height: | Size: 862 B |
BIN
apps/documents/static/images/icons/page_white_csharp.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |