PEP8 cleanups, remove unused imports, add missing imports

This commit is contained in:
Roberto Rosario
2012-09-29 01:40:33 -04:00
parent 0f1e01084c
commit e62835fd27
25 changed files with 36 additions and 60 deletions

View File

@@ -28,7 +28,7 @@ from .links import (document_list, document_list_recent,
document_update_page_count, document_clear_transformations,
document_print, document_history_view,
document_missing_list)
from .links import (document_type_list, document_type_setup, document_type_document_list,
from .links import (document_type_list, document_type_document_list,
document_type_edit, document_type_delete, document_type_create, document_type_filename_list,
document_type_filename_create, document_type_filename_edit, document_type_filename_delete,
link_documents_menu)
@@ -121,4 +121,3 @@ class_permissions(Document, [
PERMISSION_DOCUMENT_VERSION_REVERT,
PERMISSION_HISTORY_VIEW
])

View File

@@ -31,6 +31,7 @@ from .icons import (icon_documents, icon_create_siblings, icon_document_delete,
icon_document_type_filename_edit, icon_document_type_filename_delete,
icon_document_missing_list)
# Document page links expressions
def is_first_page(context):
return context['page'].page_number <= 1

View File

@@ -5,7 +5,7 @@ import tempfile
from django.db import models
from django.utils.translation import ugettext_lazy as _
from common.utils import validate_path, encapsulate
from common.utils import validate_path
from .models import DocumentVersion, get_filename_from_uuid
from .settings import STORAGE_BACKEND, CACHE_PATH
@@ -15,4 +15,4 @@ from .settings import STORAGE_BACKEND, CACHE_PATH
if (validate_path(CACHE_PATH) == False) or (not CACHE_PATH):
setattr(document_settings, 'CACHE_PATH', tempfile.mkdtemp())
DocumentVersion._meta.get_field('file').storage=STORAGE_BACKEND()
DocumentVersion._meta.get_field('file').storage = STORAGE_BACKEND()