A mongo GridFS storage backend for django.
Project description
A helper app for using MongoDB’s GridFS as a storage backend for django.
mongo_storage contents include:
- models.py
MongoFileModel: a model mixin creating a MongoFileField called content
MongoDeleteFileModel: a model mixin that will delete the underlying file when the model is deleted
- fields.py
MongoFileField: a custom file field that gives you access to the file name through a ‘file_name’ property. Useful because the GridFSStorage makes Django store the MongoDB ObjectId instead of the file name.
- storage.py
GridFSStorage: the Django storage module to interact with the pymongo, MongoDB’s python adapters
- admin.py
MongoFileAdminMixin: gives the ModelAdmin access to the stored file’s file name and file size.
DeleteActionMixin: allows ModelAdmin to call the delete method on each model being deleted (so the underlying file will be delete also) when deleting items in bulk.
- Dependencies:
mongodb Database
pymongo
django
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-mongo-storage-0.3.1.tar.gz
.
File metadata
- Download URL: django-mongo-storage-0.3.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7c60bc198feea9555c62eb80830f73fc65096effacd0cafdf6a5f70f7881a73 |
|
MD5 | 7cd86450f8ace2f69f62cb23d9a3a94c |
|
BLAKE2b-256 | 15ff9452a7b86d7ce306c1de00dc4fbeebe3d7275528674b7673e819d636e3a0 |