django-database-files
django-database-files copied to clipboard
Numerous improvements and refactorings
I've made several significant changes:
- I've added support for serving files from the local file system. When a file is uploaded, a database record is still created but the file is copied to the local file system where it is served from. Its hash is recorded, in a *.hash file on the file system, as well as in the database in a new
content_hashfield. The database serves as the master repository, so if the file system's hash differs (e.g. because a user uploaded a new file from a different server), it's replaced with the version from the database. There are four management commands to aid in various maintenance actions, such as loading files into the database, dumping everything out of the database, deleting orphaned files and regenerating file hashes. - I've refactored the general package layout and setup.py to make it a little easier to manage and test. Namely, all unittests can be run directly from setup.py with
python setup.py test. - I've added Python3 support. This can be tested by running
python setup.py test --pv=3
Let me know if you have any questions. I've tried to document as much as I can, but I haven't had time to get to everything. However, unittests should cover the bulk of the new functionality.
Btw, If you don't want to maintain the project any longer, I'm willing to take over.
Any update on this?
I'll interpret the lack of response to mean you're not interested. I'll publish my changes as a separate package.
Sorry @chrisspen – I am definitely interested, but haven't got time to review right now. I'll leave this open for when I have time to take a look. :)