Skip to main content
DjangoKit Log In

Templates

DjangoKit apps use standard Django templates. It includes a default base template djangokit/app.html that you can extend and customize or replace with your own version.

The head section contains the following blocks:

  • meta — meta tags
  • title — title tag
  • favicon — favicon link
  • links — arbitrary <link>s (e.g. for rel="me" links)
  • stylesheets — stylesheet links (and/or <style>s)
  • head_scripts — script tags (typically deferred)

The body section contains the following blocks:

  • layout — page layout
  • scripts — script tags

Customization

Depending on the level of customization needed:

  1. Add routes/app.html to your project with {% extends "djangokit/app.html" %} and override blocks as needed.
  2. Add routes/app.html to your project without the extends and create an entirely custom template.

Note

To change the global stylesheet(s) or global body scripts, you can set djangokit.global_stylesheets and/or djangokit.global_scripts in your project's settings.public.toml file instead of customizing the main template.