Metadata-Version: 2.0
Name: django-fileprovider
Version: 0.1a3
Summary: django middleware for serving media files
Home-page: https://bitbucket.org/renlinx007/django-file-provider
Author: Renjith Thankachan
Author-email: mail3renjith@gmail.com
License: UNKNOWN
Download-URL: https://bitbucket.org/renlinx007/django-fileprovider/get/0.1a3.tar.gz
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Topic :: Utilities

# INSTALLATION  

  use pip to install package:  
  `pip install -e git+https://bitbucket.org/renlinx007/django-fileprovider.git@0.1a#egg=django-fileprovider`  

* add `fileprovider` to django `INSTALLED_APPS` section.  
* add `fileprovider.middleware.FileProviderMiddleware` to `MIDDLEWARE_CLASSES` section
* set django `settings` file with `FILEPROVIDER_NAME` any of  available providers {'python', 'nginx', 'apache'}

# USAGE  

 on django views where file response is required, fill response header `X-File` with absolute file path  
 for example,  

 ```python  

    def hello(request):
        response = HttpResponse()
        response['X-File'] = '/absolute/path/to/file'
        return response
 ```


