0Pricing
Django Academy · Lesson

Including App URLs and Naming Routes

Use include() and name routes for reverse().

Two Levels of URLs

Django splits routing into the project's urls.py and each app's own. The project includes app URLs to keep things tidy.

Why Apps Get Their Own urls.py

Giving each app its own URL file keeps routes reusable and self-contained. You can drop an app into any project cleanly.

All lessons in this course

  1. Writing a Function-Based View
  2. URL Patterns with path()
  3. Capturing URL Parameters
  4. Including App URLs and Naming Routes
← Back to Django Academy