Commit c7ebbf41 authored by chris's avatar chris
Browse files

Added error handling for cases where path is passed.

parent 67a8a9c4
VERSION = (0, 3, 1)
VERSION = (0, 3, 2)
__version__ = '.'.join(map(str, VERSION))
\ No newline at end of file
......@@ -23,11 +23,13 @@ def serve(request, name):
response['Content-Length'] = f.size
return response
def serve_mixed(request, name, document_root=None):
def serve_mixed(request, *args, **kwargs):
First attempts to serve the file from the filesystem,
then tries the database.
name = kwargs.get('name') or kwargs.get('path')
document_root = kwargs.get('document_root')
document_root = document_root or settings.MEDIA_ROOT
# First attempt to serve from filesystem.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment