Skip to main content

Django Range Middleware

Project description

DjangoRangeMiddleware

Contributors

A Django Middleware Service

  • Implements HTTP bytes-range requests

When to use?

If you have ever served video file with django you will see that you can't rewind/forward the video, and thats because you don't have bytes-range requests implemented.So if you want to solve this problem you have to implement bytes-range requests. And Using this package you can easily do it :)

Bytes range:

Byte-range requests occur when a client asks the server for only a portion of the requested file. The purpose of this is essentially to conserve bandwidth usage by avoiding the need to download a complete file when all that is required is a small section

Installation

  1. install the package using pip

    C:/User> pip install DjangoRangeMiddleware
    
  2. Add this to middleware settings.py

    MIDDLEWARE = [
        '.........',
        'DjangoRangeMiddleware.middleware.RangesMiddleware',
    ]
    
  • And thats it.You're Done.Enjoy ;)

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

DjangoRangeMiddleware-1.0.1.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

DjangoRangeMiddleware-1.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page