Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numerous improvements and refactorings #1

Open
wants to merge 95 commits into
base: master
Choose a base branch
from

Conversation

chrisspen
Copy link

I've made several significant changes:

  1. 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_hash field. 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.
  2. 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.
  3. I've added Python3 support. This can be tested by running python setup.py test --pv=3

chrisspen and others added 30 commits February 22, 2012 11:55
commands to handle bulk load and dump of files to/from the filesystem.
Updated documentation to note differences from parent.
content from the database if there's a difference in file hashes.
read caused by partially pre-read file object.
database if they don't exist on the filesystem.
chrisspen and others added 30 commits August 4, 2017 14:23
trusty does not have 3.5 distribution
Import location changed in Django 2.0+
Import location changed in Django 2.0+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants