Django staticfiles extension for HTTP/2 push
Middleware and templatetag for Django to utilize HTTP/2 push for assets included in a Django template. The middleware injects a Link header in each response if there are files to be pushed to the client. All files in the template which are suitable for HTTP/2 push should be included with the staticpush templatetag instead of the vanilla static templatetag. The former simply augments the later and registers the resulting static URL with the middleware.
This package currently supports Apache2 webservers with mod_http2 enabled, as the actual HTTP/2 push is offloaded to the webserver.
This is ALPHA code. Do not use in production! It only serves as a proof-of-concept for now.
Conditional HTTP/2 push is not supported yet. This means that your site will actually perform worse than over HTTP/1.1 because each response will trigger a push of all incldued assets, irrespective of any cache on the webbrowser.
pip install django-static-push
To run the all tests run:
Note, to combine the coverage data from all the tox environments run:
set PYTEST_ADDOPTS=--cov-append tox
- First release on PyPI.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|django_static_push-0.1.0-py2.py3-none-any.whl (6.3 kB) Copy SHA256 hash SHA256||Wheel||py2.py3||Dec 31, 2016|
|django-static-push-0.1.0.tar.gz (10.3 kB) Copy SHA256 hash SHA256||Source||None||Dec 31, 2016|