Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
.. image:: https://travis-ci.org/shtalinberg/django-amp-tools.svg?branch=develop :target: https://travis-ci.org/shtalinberg/django-amp-tools
.. image:: https://img.shields.io/pypi/v/django-amp-tools.svg :target: https://pypi.python.org/pypi/django-amp-tools/
.. image:: https://img.shields.io/pypi/pyversions/django-amp-tools.svg
.. image:: https://img.shields.io/badge/django-1.11%20or%20newer-green.svg
.. _introduction:
django-amp-tools ( amp_tools ) provides a simple way to work with Accelerated mobile pages (AMP) in django and gives you tools at your hand to render some different templates to deliver an AMP version of your site to the user.
The initial idea, which has guided the development of this application from django-mobile app, is to keep your views exactly the same but to transparently interchange the templates used to render a response.
This is done in two steps:
.. _installation:
Pre-Requirements: django-amp-tools
depends on django's sites framework. So
before you try to use django-amp-tools
make sure that the sites framework
is enabled and working.
django-amp-tools
with your favourite python tool, e.g. with
easy_install django-amp-tools
or pip install django-amp-tools
.amp_tools
to your INSTALLED_APPS
setting in the
settings.py
.amp_tools.middleware.AMPDetectionMiddleware
to end of your
MIDDLEWARE_CLASSES
setting.amp_tools.loader.Loader
as first item to your
loaders
list for TEMPLATES
setting in settings.py
.See docs/usage.rst
Documentation is available online <http://django-amp-tools.readthedocs.org/>
_, or in the doc
directory of the project.
The source code for this app is hosted at https://github.com/shtalinberg/django-amp-tools.
Pull requests are welcome. See http://django-amp-tools.readthedocs.io/en/latest/contributing.html`_.
FAQs
Accelerated mobile pages (AMP) in django.
We found that django-amp-tools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.