Skip to content

AidenEllis/DjangoRangeMiddleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 ;)

About

A Django range middleware

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages