Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aidenellis/djangorangemiddleware
A Django range middleware
https://github.com/aidenellis/djangorangemiddleware
aidenellis django middleware range range-middleware
Last synced: 3 months ago
JSON representation
A Django range middleware
- Host: GitHub
- URL: https://github.com/aidenellis/djangorangemiddleware
- Owner: AidenEllis
- License: mit
- Created: 2021-05-10T10:15:36.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-30T18:02:53.000Z (over 2 years ago)
- Last Synced: 2024-11-19T23:50:06.542Z (3 months ago)
- Topics: aidenellis, django, middleware, range, range-middleware
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# DjangoRangeMiddleware
### 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
```shell script
C:/User> pip install DjangoRangeMiddleware
```2. Add this to middleware `settings.py`
```python
MIDDLEWARE = [
'.........',
'DjangoRangeMiddleware.middleware.RangesMiddleware',
]
```* `And thats it.You're Done.Enjoy ;)`