Are any Django developers working on building out AMP-HTML pages?
(For reference: Google AMP-project)
If I understand it correctly, the way AMP-HTML works is, you create 2 separate files for each page. The normal HTML result, plus a new AMP-HTML file. The AMP-HTML file is a slimmed-down version of the normal HTML page, and is used by Google to return an accelerated mobile page (hence the name, "Accelerated Mobile Pages"). Each of these files then reference each other in a tag in the head, which tells Google to use the AMP file for mobile results.
Within the Django framework, I'm wondering how to create 2 separate files based on the same set of content.
How might it be possible to make use of a single context that could be passed along to two HTML results? One result being the normal HTML page, the other being an AMP-HTML page.
In Django a URL must be created for each page to be returned. How might a second URL be automatically generated for each existing URL? Additionally, how can a single context be called up for each of those URLs?
Could it be done in the view perhaps? Such as, returning an .html extension which is the AMP page, and then also rendering the template for the URL?
I don't have any answers yet on how to tackle this. Looking for feedback and suggestions. It appears this is the first-ever question posted to stackoverflow on Django and AMP-HTML. It is likely to not be the last.