PEP8 cleanups, unused imports cleanups
This commit is contained in:
@@ -12,8 +12,7 @@ from django.utils.html import escape
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from .utils import return_attrib
|
from .utils import return_attrib
|
||||||
from .widgets import (DetailSelectMultiple, PlainWidget, TextAreaDiv,
|
from .widgets import DetailSelectMultiple, PlainWidget, EmailInput
|
||||||
EmailInput)
|
|
||||||
|
|
||||||
|
|
||||||
class DetailForm(forms.ModelForm):
|
class DetailForm(forms.ModelForm):
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
from django.template import Library
|
from django.template import Library
|
||||||
from django.utils.importlib import import_module
|
|
||||||
|
|
||||||
from common.models import AutoAdminSingleton
|
from common.models import AutoAdminSingleton
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ from navigation.api import register_links
|
|||||||
from project_setup.api import register_setup
|
from project_setup.api import register_setup
|
||||||
|
|
||||||
from .api import Key
|
from .api import Key
|
||||||
from .links import (private_keys, public_keys, key_delete, key_query,
|
from .links import (public_keys, key_delete, key_query, key_receive,
|
||||||
key_receive, key_setup)
|
key_setup)
|
||||||
|
|
||||||
# register_links(['key_delete', 'key_private_list', 'key_public_list', 'key_query'], [private_keys, public_keys, key_query], menu_name='sidebar')
|
# register_links(['key_delete', 'key_private_list', 'key_public_list', 'key_query'], [private_keys, public_keys, key_query], menu_name='sidebar')
|
||||||
register_links(['key_delete', 'key_public_list', 'key_query'], [public_keys, key_query], menu_name='sidebar')
|
register_links(['key_delete', 'key_public_list', 'key_query'], [public_keys, key_query], menu_name='sidebar')
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
|
|
||||||
from documents.models import Document
|
|
||||||
from acls.views import acl_list_for
|
from acls.views import acl_list_for
|
||||||
|
from documents.models import Document
|
||||||
|
|
||||||
|
|
||||||
def document_acl_list(request, document_id):
|
def document_acl_list(request, document_id):
|
||||||
|
|||||||
@@ -2,13 +2,12 @@ from __future__ import absolute_import
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.utils import unittest
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.core.files.base import File
|
from django.core.files.base import File
|
||||||
|
from django.utils import unittest
|
||||||
|
|
||||||
from django_gpg.api import SIGNATURE_STATE_VALID
|
|
||||||
from documents.models import Document, DocumentType
|
|
||||||
from documents.literals import VERSION_UPDATE_MAJOR, RELEASE_LEVEL_FINAL
|
from documents.literals import VERSION_UPDATE_MAJOR, RELEASE_LEVEL_FINAL
|
||||||
|
from documents.models import Document, DocumentType
|
||||||
|
|
||||||
from .models import DocumentVersionSignature
|
from .models import DocumentVersionSignature
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ register_diagnostic('documents', _(u'Documents'), document_missing_list)
|
|||||||
register_maintenance_links([document_find_all_duplicates, document_update_page_count, document_clear_image_cache], 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'))
|
||||||
|
|
||||||
register_model_list_columns(Document, [
|
register_model_list_columns(Document, [
|
||||||
{'name': _(u'thumbnail'), 'attribute':
|
{
|
||||||
|
'name': _(u'thumbnail'), 'attribute':
|
||||||
encapsulate(lambda x: document_thumbnail(x))
|
encapsulate(lambda x: document_thumbnail(x))
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding model 'DocumentType'
|
# Adding model 'DocumentType'
|
||||||
db.create_table('documents_documenttype', (
|
db.create_table('documents_documenttype', (
|
||||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
@@ -70,9 +69,7 @@ class Migration(SchemaMigration):
|
|||||||
))
|
))
|
||||||
db.send_create_signal('documents', ['RecentDocument'])
|
db.send_create_signal('documents', ['RecentDocument'])
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Deleting model 'DocumentType'
|
# Deleting model 'DocumentType'
|
||||||
db.delete_table('documents_documenttype')
|
db.delete_table('documents_documenttype')
|
||||||
|
|
||||||
@@ -91,7 +88,6 @@ class Migration(SchemaMigration):
|
|||||||
# Deleting model 'RecentDocument'
|
# Deleting model 'RecentDocument'
|
||||||
db.delete_table('documents_recentdocument')
|
db.delete_table('documents_recentdocument')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import os
|
import os
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import DataMigration
|
from south.v2 import DataMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(DataMigration):
|
class Migration(DataMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|||||||
@@ -4,20 +4,17 @@ from south.db import db
|
|||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Deleting field 'Document.file_extension'
|
# Deleting field 'Document.file_extension'
|
||||||
db.delete_column('documents_document', 'file_extension')
|
db.delete_column('documents_document', 'file_extension')
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Adding field 'Document.file_extension'
|
# 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)
|
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 = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding model 'DocumentVersion'
|
# Adding model 'DocumentVersion'
|
||||||
db.create_table('documents_documentversion', (
|
db.create_table('documents_documentversion', (
|
||||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
@@ -32,9 +31,7 @@ class Migration(SchemaMigration):
|
|||||||
# Adding field 'DocumentPage.document_version'
|
# 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)
|
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):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Removing unique constraint on 'DocumentVersion', fields ['document', 'mayor', 'minor', 'micro', 'release_level', 'serial']
|
# 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'])
|
db.delete_unique('documents_documentversion', ['document_id', 'mayor', 'minor', 'micro', 'release_level', 'serial'])
|
||||||
|
|
||||||
@@ -44,7 +41,6 @@ class Migration(SchemaMigration):
|
|||||||
# Deleting field 'DocumentPage.document_version'
|
# Deleting field 'DocumentPage.document_version'
|
||||||
db.delete_column('documents_documentpage', 'document_version_id')
|
db.delete_column('documents_documentpage', 'document_version_id')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
|
||||||
from south.v2 import DataMigration
|
from south.v2 import DataMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(DataMigration):
|
class Migration(DataMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
for document in orm.Document.objects.all():
|
for document in orm.Document.objects.all():
|
||||||
document_version = document.versions.create(
|
document_version = document.versions.create(
|
||||||
document = document,
|
document=document,
|
||||||
timestamp = document.date_added,
|
timestamp=document.date_added,
|
||||||
file = document.file,
|
file=document.file,
|
||||||
mimetype = document.file_mimetype,
|
mimetype=document.file_mimetype,
|
||||||
encoding = document.file_mime_encoding,
|
encoding=document.file_mime_encoding,
|
||||||
filename = document.file_filename,
|
filename=document.file_filename,
|
||||||
checksum = document.checksum,
|
checksum=document.checksum,
|
||||||
)
|
)
|
||||||
document_version.save()
|
document_version.save()
|
||||||
for document_page in document.pages.all():
|
for document_page in document.pages.all():
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
|
||||||
from south.v2 import DataMigration
|
from south.v2 import DataMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(DataMigration):
|
class Migration(DataMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ from south.db import db
|
|||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'DocumentVersion.document'
|
# Changing field 'DocumentVersion.document'
|
||||||
db.alter_column('documents_documentversion', 'document_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document']))
|
db.alter_column('documents_documentversion', 'document_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document']))
|
||||||
|
|
||||||
@@ -35,9 +35,7 @@ class Migration(SchemaMigration):
|
|||||||
# Changing field 'DocumentPage.document_version'
|
# 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']))
|
db.alter_column('documents_documentpage', 'document_version_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentVersion']))
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'DocumentVersion.document'
|
# 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))
|
db.alter_column('documents_documentversion', 'document_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.Document'], null=True))
|
||||||
|
|
||||||
@@ -65,7 +63,6 @@ class Migration(SchemaMigration):
|
|||||||
# Changing field 'DocumentPage.document_version'
|
# 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))
|
db.alter_column('documents_documentpage', 'document_version_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['documents.DocumentVersion'], null=True))
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Removing unique constraint on 'DocumentVersion', fields ['release_level', 'micro', 'serial', 'document', 'mayor', 'minor']
|
# 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'])
|
db.delete_unique('documents_documentversion', ['release_level', 'micro', 'serial', 'document_id', 'mayor', 'minor'])
|
||||||
|
|
||||||
@@ -20,9 +19,7 @@ class Migration(SchemaMigration):
|
|||||||
# Adding unique constraint on 'DocumentVersion', fields ['major', 'release_level', 'micro', 'serial', 'document', 'minor']
|
# 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'])
|
db.create_unique('documents_documentversion', ['major', 'release_level', 'micro', 'serial', 'document_id', 'minor'])
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Removing unique constraint on 'DocumentVersion', fields ['major', 'release_level', 'micro', 'serial', 'document', 'minor']
|
# 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'])
|
db.delete_unique('documents_documentversion', ['major', 'release_level', 'micro', 'serial', 'document_id', 'minor'])
|
||||||
|
|
||||||
@@ -35,7 +32,6 @@ class Migration(SchemaMigration):
|
|||||||
# Adding unique constraint on 'DocumentVersion', fields ['release_level', 'micro', 'serial', 'document', 'mayor', 'minor']
|
# 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'])
|
db.create_unique('documents_documentversion', ['release_level', 'micro', 'serial', 'document_id', 'mayor', 'minor'])
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -4,20 +4,17 @@ from south.db import db
|
|||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding field 'DocumentVersion.comment'
|
# Adding field 'DocumentVersion.comment'
|
||||||
db.add_column('documents_documentversion', 'comment', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False)
|
db.add_column('documents_documentversion', 'comment', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Deleting field 'DocumentVersion.comment'
|
# Deleting field 'DocumentVersion.comment'
|
||||||
db.delete_column('documents_documentversion', 'comment')
|
db.delete_column('documents_documentversion', 'comment')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -4,20 +4,17 @@ from south.db import db
|
|||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'Document.date_added'
|
# Changing field 'Document.date_added'
|
||||||
db.alter_column('documents_document', 'date_added', self.gf('django.db.models.fields.DateTimeField')())
|
db.alter_column('documents_document', 'date_added', self.gf('django.db.models.fields.DateTimeField')())
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'Document.date_added'
|
# Changing field 'Document.date_added'
|
||||||
db.alter_column('documents_document', 'date_added', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True))
|
db.alter_column('documents_document', 'date_added', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True))
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -4,20 +4,17 @@ from south.db import db
|
|||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding field 'DocumentVersion.signature_state'
|
# 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)
|
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):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Deleting field 'DocumentVersion.signature_state'
|
# Deleting field 'DocumentVersion.signature_state'
|
||||||
db.delete_column('documents_documentversion', 'signature_state')
|
db.delete_column('documents_documentversion', 'signature_state')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding field 'DocumentVersion.signature_file'
|
# Adding field 'DocumentVersion.signature_file'
|
||||||
db.add_column('documents_documentversion', 'signature_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True), keep_default=False)
|
db.add_column('documents_documentversion', 'signature_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True), keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Deleting field 'DocumentVersion.signature_file'
|
# Deleting field 'DocumentVersion.signature_file'
|
||||||
db.delete_column('documents_documentversion', 'signature_file')
|
db.delete_column('documents_documentversion', 'signature_file')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
depends_on = (
|
depends_on = (
|
||||||
@@ -11,23 +11,19 @@ class Migration(SchemaMigration):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Deleting field 'DocumentVersion.signature_file'
|
# Deleting field 'DocumentVersion.signature_file'
|
||||||
db.delete_column('documents_documentversion', 'signature_file')
|
db.delete_column('documents_documentversion', 'signature_file')
|
||||||
|
|
||||||
# Deleting field 'DocumentVersion.signature_state'
|
# Deleting field 'DocumentVersion.signature_state'
|
||||||
db.delete_column('documents_documentversion', 'signature_state')
|
db.delete_column('documents_documentversion', 'signature_state')
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Adding field 'DocumentVersion.signature_file'
|
# Adding field 'DocumentVersion.signature_file'
|
||||||
db.add_column('documents_documentversion', 'signature_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True), keep_default=False)
|
db.add_column('documents_documentversion', 'signature_file', self.gf('django.db.models.fields.files.FileField')(max_length=100, null=True, blank=True), keep_default=False)
|
||||||
|
|
||||||
# Adding field 'DocumentVersion.signature_state'
|
# 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)
|
db.add_column('documents_documentversion', 'signature_state', self.gf('django.db.models.fields.CharField')(max_length=16, null=True, blank=True), keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ from django.db import models
|
|||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'DocumentVersion.mimetype'
|
# Changing field 'DocumentVersion.mimetype'
|
||||||
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=64, null=True))
|
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=64, null=True))
|
||||||
|
|
||||||
@@ -16,7 +15,6 @@ class Migration(SchemaMigration):
|
|||||||
db.alter_column('documents_documentversion', 'encoding', self.gf('django.db.models.fields.CharField')(max_length=64, null=True))
|
db.alter_column('documents_documentversion', 'encoding', self.gf('django.db.models.fields.CharField')(max_length=64, null=True))
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'DocumentVersion.mimetype'
|
# Changing field 'DocumentVersion.mimetype'
|
||||||
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=64))
|
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=64))
|
||||||
|
|
||||||
|
|||||||
@@ -11,12 +11,10 @@ class Migration(SchemaMigration):
|
|||||||
# Adding unique constraint on 'DocumentType', fields ['name']
|
# Adding unique constraint on 'DocumentType', fields ['name']
|
||||||
db.create_unique('documents_documenttype', ['name'])
|
db.create_unique('documents_documenttype', ['name'])
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
# Removing unique constraint on 'DocumentType', fields ['name']
|
# Removing unique constraint on 'DocumentType', fields ['name']
|
||||||
db.delete_unique('documents_documenttype', ['name'])
|
db.delete_unique('documents_documenttype', ['name'])
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -8,12 +8,10 @@ from django.db import models
|
|||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'DocumentVersion.mimetype'
|
# Changing field 'DocumentVersion.mimetype'
|
||||||
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
|
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=255, null=True))
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'DocumentVersion.mimetype'
|
# Changing field 'DocumentVersion.mimetype'
|
||||||
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=64, null=True))
|
db.alter_column('documents_documentversion', 'mimetype', self.gf('django.db.models.fields.CharField')(max_length=64, null=True))
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ from django.template import Library, Node, Variable
|
|||||||
|
|
||||||
from converter.api import get_dimensions
|
from converter.api import get_dimensions
|
||||||
|
|
||||||
from documents.conf.settings import PRINT_SIZE
|
|
||||||
|
|
||||||
register = Library()
|
register = Library()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
|
|
||||||
from navigation.api import register_sidebar_template, register_links
|
from navigation.api import register_sidebar_template, register_links
|
||||||
|
|
||||||
from .links import search, search_advanced, search_again
|
from .links import search, search_advanced, search_again
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import re
|
|
||||||
import types
|
|
||||||
import logging
|
|
||||||
import datetime
|
import datetime
|
||||||
|
import logging
|
||||||
|
import re
|
||||||
|
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.db.models.loading import get_model
|
from django.db.models.loading import get_model
|
||||||
|
|||||||
@@ -1,22 +1,18 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import urlparse
|
|
||||||
import logging
|
import logging
|
||||||
|
import urlparse
|
||||||
|
|
||||||
|
from django.core.urlresolvers import reverse
|
||||||
|
from django.http import HttpResponseRedirect
|
||||||
from django.shortcuts import render_to_response
|
from django.shortcuts import render_to_response
|
||||||
from django.template import RequestContext
|
from django.template import RequestContext
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.contrib import messages
|
|
||||||
from django.conf import settings
|
|
||||||
from django.http import HttpResponseRedirect
|
|
||||||
from django.core.urlresolvers import reverse
|
|
||||||
from django.utils.http import urlencode
|
|
||||||
|
|
||||||
from .conf.settings import SHOW_OBJECT_TYPE
|
from .classes import SearchModel
|
||||||
from .conf.settings import LIMIT
|
from .conf.settings import LIMIT, SHOW_OBJECT_TYPE
|
||||||
from .forms import SearchForm, AdvancedSearchForm
|
from .forms import SearchForm, AdvancedSearchForm
|
||||||
from .models import RecentSearch
|
from .models import RecentSearch
|
||||||
from .classes import SearchModel
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
document_search = SearchModel.get('documents.Document')
|
document_search = SearchModel.get('documents.Document')
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
|
|
||||||
from acls.api import class_permissions
|
from acls.api import class_permissions
|
||||||
from acls.permissions import ACLS_EDIT_ACL, ACLS_VIEW_ACL
|
from acls.permissions import ACLS_EDIT_ACL, ACLS_VIEW_ACL
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
from documents.permissions import PERMISSION_DOCUMENT_VIEW
|
|
||||||
from navigation.api import (register_links, register_top_menu,
|
from navigation.api import (register_links, register_top_menu,
|
||||||
register_multi_item_links, register_sidebar_template)
|
register_multi_item_links, register_sidebar_template)
|
||||||
|
|
||||||
@@ -14,10 +11,9 @@ from .links import (folder_list, folder_create, folder_edit, folder_delete,
|
|||||||
folder_add_multiple_documents, document_folder_list, folder_acl_list,
|
folder_add_multiple_documents, document_folder_list, folder_acl_list,
|
||||||
folders_main_menu_link)
|
folders_main_menu_link)
|
||||||
from .models import Folder
|
from .models import Folder
|
||||||
from .permissions import (PERMISSION_FOLDER_CREATE,
|
from .permissions import (PERMISSION_FOLDER_EDIT,
|
||||||
PERMISSION_FOLDER_EDIT, PERMISSION_FOLDER_DELETE,
|
PERMISSION_FOLDER_DELETE, PERMISSION_FOLDER_REMOVE_DOCUMENT,
|
||||||
PERMISSION_FOLDER_REMOVE_DOCUMENT, PERMISSION_FOLDER_VIEW,
|
PERMISSION_FOLDER_VIEW, PERMISSION_FOLDER_ADD_DOCUMENT)
|
||||||
PERMISSION_FOLDER_ADD_DOCUMENT)
|
|
||||||
|
|
||||||
register_multi_item_links(['folder_view'], [folder_document_multiple_remove])
|
register_multi_item_links(['folder_view'], [folder_document_multiple_remove])
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ from __future__ import absolute_import
|
|||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from acls.permissions import ACLS_EDIT_ACL, ACLS_VIEW_ACL
|
from acls.permissions import ACLS_VIEW_ACL
|
||||||
from documents.permissions import PERMISSION_DOCUMENT_VIEW
|
from documents.permissions import PERMISSION_DOCUMENT_VIEW
|
||||||
|
|
||||||
from .permissions import (PERMISSION_FOLDER_CREATE,
|
from .permissions import (PERMISSION_FOLDER_CREATE,
|
||||||
|
|||||||
@@ -2,12 +2,11 @@ from __future__ import absolute_import
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.utils import unittest
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.files.base import File
|
from django.core.files.base import File
|
||||||
|
from django.utils import unittest
|
||||||
|
|
||||||
from documents.literals import VERSION_UPDATE_MAJOR, RELEASE_LEVEL_FINAL
|
|
||||||
from documents.models import Document, DocumentType
|
from documents.models import Document, DocumentType
|
||||||
|
|
||||||
from .models import Folder
|
from .models import Folder
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from navigation.api import register_model_list_columns, register_links
|
|||||||
from common.utils import encapsulate
|
from common.utils import encapsulate
|
||||||
|
|
||||||
from .models import History
|
from .models import History
|
||||||
from .widgets import history_entry_summary, history_entry_type_link
|
from .widgets import history_entry_type_link
|
||||||
from .links import history_list, history_details
|
from .links import history_list, history_details
|
||||||
|
|
||||||
register_tool(history_list)
|
register_tool(history_list)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
from django.db import models
|
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
#from django.shortcuts import get_object_or_404
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class ObjectHistoryManager(models.Manager):
|
class ObjectHistoryManager(models.Manager):
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.db.models.signals import post_save
|
|
||||||
from django.db.utils import DatabaseError
|
from django.db.utils import DatabaseError
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -17,12 +16,10 @@ class Migration(SchemaMigration):
|
|||||||
))
|
))
|
||||||
db.send_create_signal('installation', ['Installation'])
|
db.send_create_signal('installation', ['Installation'])
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
# Deleting model 'Installation'
|
# Deleting model 'Installation'
|
||||||
db.delete_table('installation_installation')
|
db.delete_table('installation_installation')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'installation.installation': {
|
'installation.installation': {
|
||||||
'Meta': {'object_name': 'Installation'},
|
'Meta': {'object_name': 'Installation'},
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ class SmartLinkImageWidget(forms.widgets.Widget):
|
|||||||
output.append(u'</div>')
|
output.append(u'</div>')
|
||||||
output.append(
|
output.append(
|
||||||
u'<br /><span class="famfam active famfam-magnifier"></span>%s' %
|
u'<br /><span class="famfam active famfam-magnifier"></span>%s' %
|
||||||
ugettext(u'Click on the image for full size view of the first page.'))
|
ugettext(u'Click on the image for full size view of the first page.')
|
||||||
|
)
|
||||||
|
|
||||||
return mark_safe(u''.join(output))
|
return mark_safe(u''.join(output))
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from navigation.api import register_top_menu
|
from navigation.api import register_top_menu
|
||||||
from navigation.api import register_links
|
|
||||||
from project_setup.api import register_setup
|
from project_setup.api import register_setup
|
||||||
from project_tools.api import register_tool
|
from project_tools.api import register_tool
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class_permissions(Document, [
|
|||||||
])
|
])
|
||||||
|
|
||||||
register_model_list_columns(Document, [
|
register_model_list_columns(Document, [
|
||||||
{'name': _(u'metadata'), 'attribute':
|
{
|
||||||
encapsulate(lambda x: get_metadata_string(x))
|
'name': _(u'metadata'), 'attribute': encapsulate(lambda x: get_metadata_string(x))
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -54,8 +54,7 @@ def save_metadata(metadata_dict, document, create=False):
|
|||||||
document=document,
|
document=document,
|
||||||
metadata_type=get_object_or_404(
|
metadata_type=get_object_or_404(
|
||||||
MetadataType,
|
MetadataType,
|
||||||
pk=metadata_dict['id']
|
pk=metadata_dict['id'])
|
||||||
),
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -65,7 +64,6 @@ class Migration(SchemaMigration):
|
|||||||
))
|
))
|
||||||
db.create_unique('metadata_documenttypedefaults_default_metadata', ['documenttypedefaults_id', 'metadatatype_id'])
|
db.create_unique('metadata_documenttypedefaults_default_metadata', ['documenttypedefaults_id', 'metadatatype_id'])
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
# Deleting model 'MetadataType'
|
# Deleting model 'MetadataType'
|
||||||
db.delete_table('metadata_metadatatype')
|
db.delete_table('metadata_metadatatype')
|
||||||
@@ -88,7 +86,6 @@ class Migration(SchemaMigration):
|
|||||||
# Removing M2M table for field default_metadata on 'DocumentTypeDefaults'
|
# Removing M2M table for field default_metadata on 'DocumentTypeDefaults'
|
||||||
db.delete_table('metadata_documenttypedefaults_default_metadata')
|
db.delete_table('metadata_documenttypedefaults_default_metadata')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -11,12 +10,10 @@ class Migration(SchemaMigration):
|
|||||||
# Adding unique constraint on 'MetadataSet', fields ['title']
|
# Adding unique constraint on 'MetadataSet', fields ['title']
|
||||||
db.create_unique('metadata_metadataset', ['title'])
|
db.create_unique('metadata_metadataset', ['title'])
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
# Removing unique constraint on 'MetadataSet', fields ['title']
|
# Removing unique constraint on 'MetadataSet', fields ['title']
|
||||||
db.delete_unique('metadata_metadataset', ['title'])
|
db.delete_unique('metadata_metadataset', ['title'])
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'auth.group': {
|
'auth.group': {
|
||||||
'Meta': {'object_name': 'Group'},
|
'Meta': {'object_name': 'Group'},
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
@@ -8,12 +7,10 @@ from django.db import models
|
|||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'MetadataType.lookup'
|
# Changing field 'MetadataType.lookup'
|
||||||
db.alter_column('metadata_metadatatype', 'lookup', self.gf('django.db.models.fields.TextField')(null=True))
|
db.alter_column('metadata_metadatatype', 'lookup', self.gf('django.db.models.fields.TextField')(null=True))
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'MetadataType.lookup'
|
# Changing field 'MetadataType.lookup'
|
||||||
db.alter_column('metadata_metadatatype', 'lookup', self.gf('django.db.models.fields.CharField')(max_length=128, null=True))
|
db.alter_column('metadata_metadatatype', 'lookup', self.gf('django.db.models.fields.CharField')(max_length=128, null=True))
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from django.template import (TemplateSyntaxError, Library,
|
|||||||
VariableDoesNotExist, Node, Variable)
|
VariableDoesNotExist, Node, Variable)
|
||||||
from django.utils.text import unescape_string_literal
|
from django.utils.text import unescape_string_literal
|
||||||
from django.utils.translation import ugettext as _
|
from django.utils.translation import ugettext as _
|
||||||
from django.utils.encoding import smart_str, force_unicode, smart_unicode
|
from django.utils.encoding import smart_str, smart_unicode
|
||||||
|
|
||||||
from common.utils import urlquote
|
from common.utils import urlquote
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,8 @@ from __future__ import absolute_import
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from django.db import transaction
|
|
||||||
from django.db.utils import DatabaseError
|
|
||||||
from django.db.models.signals import post_save, post_syncdb
|
from django.db.models.signals import post_save, post_syncdb
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import ugettext
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from acls.api import class_permissions
|
from acls.api import class_permissions
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ def queue_document_list(request, queue_name='default'):
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return render_to_response('generic_list.html', context,
|
return render_to_response('generic_list.html', context,
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
|
|
||||||
from navigation.api import register_top_menu
|
from navigation.api import register_top_menu
|
||||||
|
|
||||||
from .links import link_tools
|
from .links import link_tools
|
||||||
|
|||||||
@@ -4,23 +4,18 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
|
|
||||||
from common.utils import encapsulate
|
from common.utils import encapsulate
|
||||||
from documents.models import Document
|
from documents.models import Document
|
||||||
from documents.permissions import (PERMISSION_DOCUMENT_NEW_VERSION,
|
|
||||||
PERMISSION_DOCUMENT_CREATE)
|
|
||||||
from navigation.api import register_links, register_model_list_columns
|
from navigation.api import register_links, register_model_list_columns
|
||||||
from project_setup.api import register_setup
|
from project_setup.api import register_setup
|
||||||
|
|
||||||
from .links import (document_create_multiple, document_create_siblings,
|
from .links import (document_create_multiple, document_create_siblings,
|
||||||
staging_file_preview, staging_file_delete, setup_sources,
|
staging_file_delete, setup_sources, setup_web_form_list,
|
||||||
setup_web_form_list, setup_staging_folder_list,
|
setup_staging_folder_list, setup_watch_folder_list,
|
||||||
setup_watch_folder_list, setup_source_edit, setup_source_delete,
|
setup_source_edit, setup_source_delete, setup_source_create,
|
||||||
setup_source_create, setup_source_transformation_list,
|
setup_source_transformation_list, setup_source_transformation_create,
|
||||||
setup_source_transformation_create, setup_source_transformation_edit,
|
setup_source_transformation_edit, setup_source_transformation_delete,
|
||||||
setup_source_transformation_delete, source_list, upload_version)
|
upload_version)
|
||||||
from .models import (WebForm, StagingFolder, SourceTransformation,
|
from .models import (WebForm, StagingFolder, SourceTransformation,
|
||||||
WatchFolder)
|
WatchFolder)
|
||||||
from .permissions import (PERMISSION_SOURCES_SETUP_VIEW,
|
|
||||||
PERMISSION_SOURCES_SETUP_EDIT, PERMISSION_SOURCES_SETUP_DELETE,
|
|
||||||
PERMISSION_SOURCES_SETUP_CREATE)
|
|
||||||
from .staging import StagingFile
|
from .staging import StagingFile
|
||||||
from .widgets import staging_file_thumbnail
|
from .widgets import staging_file_thumbnail
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
from documents.permissions import (PERMISSION_DOCUMENT_NEW_VERSION,
|
from documents.permissions import (PERMISSION_DOCUMENT_NEW_VERSION,
|
||||||
PERMISSION_DOCUMENT_CREATE)
|
PERMISSION_DOCUMENT_CREATE)
|
||||||
|
|
||||||
from .models import (WebForm, StagingFolder, SourceTransformation,
|
from .models import (WebForm, StagingFolder, WatchFolder)
|
||||||
WatchFolder)
|
|
||||||
from .permissions import (PERMISSION_SOURCES_SETUP_VIEW,
|
from .permissions import (PERMISSION_SOURCES_SETUP_VIEW,
|
||||||
PERMISSION_SOURCES_SETUP_EDIT, PERMISSION_SOURCES_SETUP_DELETE,
|
PERMISSION_SOURCES_SETUP_EDIT, PERMISSION_SOURCES_SETUP_DELETE,
|
||||||
PERMISSION_SOURCES_SETUP_CREATE)
|
PERMISSION_SOURCES_SETUP_CREATE)
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ from south.db import db
|
|||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Adding model 'StagingFolder'
|
# Adding model 'StagingFolder'
|
||||||
db.create_table('sources_stagingfolder', (
|
db.create_table('sources_stagingfolder', (
|
||||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||||
@@ -71,7 +71,6 @@ class Migration(SchemaMigration):
|
|||||||
))
|
))
|
||||||
db.send_create_signal('sources', ['OutOfProcess'])
|
db.send_create_signal('sources', ['OutOfProcess'])
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Deleting model 'StagingFolder'
|
# Deleting model 'StagingFolder'
|
||||||
@@ -89,7 +88,6 @@ class Migration(SchemaMigration):
|
|||||||
# Deleting model 'OutOfProcess'
|
# Deleting model 'OutOfProcess'
|
||||||
db.delete_table('sources_outofprocess')
|
db.delete_table('sources_outofprocess')
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'contenttypes.contenttype': {
|
'contenttypes.contenttype': {
|
||||||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
import datetime
|
|
||||||
from south.db import db
|
from south.db import db
|
||||||
from south.v2 import SchemaMigration
|
from south.v2 import SchemaMigration
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class Migration(SchemaMigration):
|
class Migration(SchemaMigration):
|
||||||
|
|
||||||
def forwards(self, orm):
|
def forwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'StagingFolder.preview_width'
|
# Changing field 'StagingFolder.preview_width'
|
||||||
db.alter_column('sources_stagingfolder', 'preview_width', self.gf('django.db.models.fields.IntegerField')(default=640))
|
db.alter_column('sources_stagingfolder', 'preview_width', self.gf('django.db.models.fields.IntegerField')(default=640))
|
||||||
|
|
||||||
|
|
||||||
def backwards(self, orm):
|
def backwards(self, orm):
|
||||||
|
|
||||||
# Changing field 'StagingFolder.preview_width'
|
# Changing field 'StagingFolder.preview_width'
|
||||||
db.alter_column('sources_stagingfolder', 'preview_width', self.gf('django.db.models.fields.IntegerField')(null=True))
|
db.alter_column('sources_stagingfolder', 'preview_width', self.gf('django.db.models.fields.IntegerField')(null=True))
|
||||||
|
|
||||||
|
|
||||||
models = {
|
models = {
|
||||||
'contenttypes.contenttype': {
|
'contenttypes.contenttype': {
|
||||||
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
|
||||||
|
|||||||
@@ -18,12 +18,10 @@ from acls.models import AccessEntry
|
|||||||
from common.utils import encapsulate
|
from common.utils import encapsulate
|
||||||
from documents.conf.settings import THUMBNAIL_SIZE
|
from documents.conf.settings import THUMBNAIL_SIZE
|
||||||
from documents.exceptions import NewDocumentVersionNotAllowed
|
from documents.exceptions import NewDocumentVersionNotAllowed
|
||||||
from documents.forms import DocumentTypeSelectForm
|
|
||||||
from documents.models import DocumentType, Document
|
from documents.models import DocumentType, Document
|
||||||
from documents.permissions import (PERMISSION_DOCUMENT_CREATE,
|
from documents.permissions import (PERMISSION_DOCUMENT_CREATE,
|
||||||
PERMISSION_DOCUMENT_NEW_VERSION)
|
PERMISSION_DOCUMENT_NEW_VERSION)
|
||||||
from metadata.api import decode_metadata_from_url, metadata_repr_as_list
|
from metadata.api import decode_metadata_from_url, metadata_repr_as_list
|
||||||
from metadata.forms import MetadataSelectionForm, MetadataFormSet
|
|
||||||
from permissions.models import Permission
|
from permissions.models import Permission
|
||||||
|
|
||||||
from .forms import (SourceTransformationForm, SourceTransformationForm_create,
|
from .forms import (SourceTransformationForm, SourceTransformationForm_create,
|
||||||
@@ -37,7 +35,6 @@ from .permissions import (PERMISSION_SOURCES_SETUP_VIEW,
|
|||||||
PERMISSION_SOURCES_SETUP_EDIT, PERMISSION_SOURCES_SETUP_DELETE,
|
PERMISSION_SOURCES_SETUP_EDIT, PERMISSION_SOURCES_SETUP_DELETE,
|
||||||
PERMISSION_SOURCES_SETUP_CREATE)
|
PERMISSION_SOURCES_SETUP_CREATE)
|
||||||
from .staging import create_staging_file_class
|
from .staging import create_staging_file_class
|
||||||
from .wizards import DocumentCreateWizard
|
|
||||||
|
|
||||||
|
|
||||||
def document_create_siblings(request, document_id):
|
def document_create_siblings(request, document_id):
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
"""Configuration options for the storage app"""
|
"""Configuration options for the storage app"""
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from smart_settings.api import register_settings
|
from smart_settings.api import register_settings
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from django.utils.html import escape, strip_tags
|
from django.utils.html import escape
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
from optparse import make_option
|
from optparse import make_option
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand, CommandError, LabelCommand
|
from django.core.management.base import CommandError, LabelCommand
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.db.utils import IntegrityError
|
from django.db.utils import IntegrityError
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user