© Ben Lopatin 2020
B. LopatinDjango Standalone Appshttps://doi.org/10.1007/978-1-4842-5632-9_5

5. Templates

Ben Lopatin1 
(1)
New York, NY, USA
 

The mechanics of including HTML templates in your standalone app are no different than including templates in an app within a Django project. However, you do need to give careful consideration to naming and also to the content that you include in your templates. In this chapter, you’ll learn how to name your templates for end users and how to optimize your template content for developer users.

Three basic strategies

If your app includes views that return rendered HTML responses, it’ll be doing so by rendering HTML templates. Because of how Django loads templates, you have three options for handling initial template ...

Get Django Standalone Apps: Learn to Develop Reusable Django Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.