Implemented the size method in GridFS storage, updated docs
This commit is contained in:
@@ -27,7 +27,7 @@ Features
|
||||
* Multilingual (English, Spanish)
|
||||
* Duplicated document search
|
||||
* Upload multiple documents inside a ZIP file
|
||||
|
||||
* Plugable storage backend (File based and GridFS included)
|
||||
|
||||
Requirements
|
||||
---
|
||||
@@ -40,6 +40,10 @@ Python:
|
||||
* django-celery
|
||||
* celery
|
||||
|
||||
For the GridFS storage backend:
|
||||
* PyMongo
|
||||
* GridFS
|
||||
|
||||
Or execute pip install -r requirements/production.txt to install the dependencies automatically.
|
||||
|
||||
Executables:
|
||||
@@ -48,7 +52,7 @@ Executables:
|
||||
* libmagic
|
||||
* tesseract-ocr - An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
|
||||
* unpaper - post-processing scanned and photocopied book pages
|
||||
|
||||
* MongoDB
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
@@ -71,8 +71,7 @@ class GridFSStorage(Storage):
|
||||
|
||||
|
||||
def size(self, name):
|
||||
#TODO: Implement
|
||||
return 0
|
||||
return self.fs.get_last_version(name).length
|
||||
|
||||
|
||||
def move(self, old_file_name, name, chunk_size=1024*64):
|
||||
|
||||
19
docs/CREDITS
19
docs/CREDITS
@@ -93,9 +93,18 @@ favicon
|
||||
http://www.iconfinder.com/icondetails/21581/24/draw_pyramid_icon
|
||||
by Gnome Project
|
||||
|
||||
MongoDB
|
||||
|
||||
PyMongo
|
||||
|
||||
GridFS
|
||||
MongoDB - (from "humongous") is a scalable, high-performance, open
|
||||
source, document-oriented database.
|
||||
Copyright 10gen
|
||||
http://www.mongodb.org/
|
||||
|
||||
PyMongo - is a Python distribution containing tools for working with
|
||||
MongoDB, and is the recommended way to work with MongoDB from
|
||||
Python.
|
||||
|
||||
Copyright 2009, Michael Dirolf
|
||||
http://api.mongodb.org/python/
|
||||
|
||||
GridFS - is a storage specification for large objects in MongoDB
|
||||
Copyright 10gen
|
||||
http://www.mongodb.org/display/DOCS/GridFS+Specification
|
||||
|
||||
@@ -51,3 +51,4 @@
|
||||
|
||||
2011-Mar 04
|
||||
* Initial GridFS storage support
|
||||
* Implemented size and delete methods for GridFS
|
||||
|
||||
Reference in New Issue
Block a user