Initial version of the GridFS storage driver

This commit is contained in:
Roberto Rosario
2011-03-04 01:08:20 -04:00
parent 3f71ee1a06
commit d0bea8ffeb
13 changed files with 218 additions and 183 deletions

View File

@@ -1,3 +1,4 @@
import os
import types
from django.utils.http import urlquote as django_urlquote
@@ -75,3 +76,13 @@ def pretty_size(size):
continue
else:
return round(size/float(lim/2**10),2).__str__()+suf
def exists_with_famfam(path):
try:
if os.path.exists(path):
return '<span class="famfam active famfam-tick"></span>'
else:
return '<span class="famfam active famfam-cross"></span>'
except Exception, exc:
return exc