title: Accelerated mobile pages in django?
body: <p>Are any Django developers working on building out AMP-HTML pages?</p>
  
  <p>(For reference: <a href="https://www.ampproject.org/" rel="noreferrer">Google AMP-project</a>)</p>
  
  <p>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.</p>
  
  <p>Within the Django framework, I'm wondering how to create 2 separate files based on the same set of content.</p>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>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?</p>
  
  <p>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.</p>