0Pricing
Django Academy · Lesson

The url Tag and static Tag

Link routes and assets without hardcoding paths.

Never Hardcode Paths

Typing URLs and file paths by hand breaks the moment they change. Django gives you the url and static tags to build them safely. 🔗

The url Tag Builds Routes

The url tag turns a route name into its real path. Rename the URL pattern later and every link updates automatically.

<a href="{% url 'home' %}">Home</a>

All lessons in this course

  1. render() and the Template Context
  2. Template Tags and Filters
  3. Template Inheritance with extends and block
  4. The url Tag and static Tag
← Back to Django Academy