GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Make ALL Your Django Forms Better
  • Jinja
  • When and how to use Django TemplateView

This view

  • Original page
  • New address

GeezerVison is showing www.fullstackpython.com — Django Templates

Full Stack Python
All topics | Blog | Supporter's Edition | @fullstackpython | Facebook | What's new?

Django Templates

The Django web framework contains its own template engine for generating HTML, XML and other output formats.

Django web framework logo. Trademark Django Software Foundation.

What's the difference between a "project template" and Django templates?

A project template contains the files and code to start a new web application. For example, when you run django-admin.py startproject abc, the Django admin script creates a new abc directory along with several Python configuration so the web app can be run by a WSGI server.

Django templates are different from a project template because they live within a project and are written by the developer to generate output, most commonly HTML.

Django templates are an implementation of the template engines concept. Learn more in the web development chapter or view the table of contents for all topics.

Django template resources

  • Make ALL Your Django Forms Better presents some tricks for customizing Django templates to handle the widgets on your site.

  • Python Templating Performance Showdown: Django vs Jinja provides some benchmarks for how Django templates compare with Jinja templates. Note that as with any benchmarks these only provide a few data points that can be useful rather than a definitive statement that one tool is always faster than the other.

  • Reconciling Backend Templates with Frontend Components explains how to use React components with the traditional server-side Django templates despite some mismatch in how each tool approaches the end goal of rendering a webpage.

  • When and how to use Django TemplateView is not specifically about using the Django template engine, but instead how to use the TemplateView in your views which lead directly into rendering a template.

Learn more about template engines or another topic?

What is the Django web framework?

What are template engines and why are they useful?

Tell me about standard relational databases.

Table of Contents

1. Introduction 2. Development Environments 3. Data 4. Web Development Web Frameworks Django Flask Bottle Pyramid TurboGears Falcon Morepath Sanic Other Web Frameworks Template Engines Jinja2 Mako Django Templates Web Design HTML Cascading Style Sheets (CSS) Responsive Design Minification CSS Frameworks Bootstrap Foundation JavaScript React Vue.js Angular Task Queues Celery Redis Queue (RQ) Dramatiq Static Site Generators Pelican Lektor MkDocs Testing Unit Testing Integration Testing Debugging Code Metrics Networking HTTPS WebSockets WebRTC Web APIs Microservices Webhooks Bots API Creation API Frameworks Django REST Framework API Integration Twilio Stripe Slack Okta Security SQL Injection CSRF 5. Deployment 6. DevOps Changelog What Full Stack Means About the Author Future Directions Page Statuses ...or view the full table of contents.

Full Stack Python

Full Stack Python is an open book that explains concepts in plain language and provides helpful resources for those topics.
Updates via Twitter & Facebook.

Chapters

1. Introduction 2. Development Environments 3. Data 4. Web Development » Django Templates 5. Deployment 6. DevOps Changelog What Full Stack Means About the Author Future Directions Page Statuses ...or view the full table of contents.

Matt Makai 2012-2022
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.