Fixed the documents app and updated to latest app registry api

This commit is contained in:
Roberto Rosario
2012-09-10 22:17:30 -04:00
parent e63b596ff5
commit 4d7999cadb
10 changed files with 98 additions and 84 deletions
+4 -1
View File
@@ -5,11 +5,12 @@ from django.db.models import Avg, Count, Min, Max
from common.utils import pretty_size, pretty_size_10
from .conf.settings import STORAGE_BACKEND
from .models import Document, DocumentType, DocumentPage, DocumentVersion
def get_used_size(path, file_list):
from .settings import STORAGE_BACKEND
total_size = 0
for filename in file_list:
try:
@@ -21,6 +22,8 @@ def get_used_size(path, file_list):
def storage_count(path=u'.'):
from .settings import STORAGE_BACKEND
try:
directories, files = STORAGE_BACKEND().listdir(path)
except OSError: