O'Reilly logo

Django: Visual QuickPro Guide by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7. Inheriting Templates

As your applications grow larger, planning them becomes more important. For instance, you may have a Web application of a hundred pages and want to preserve a uniform look and feel across all those pages.

Template inheritance to the rescue! Django lets one template inherit from another, enabling you to easily create a consistent look for your pages—great for company Web sites or any Web site with more than just a few pages. For example, you may want to present a navigation bar at the bottom of all your Web pages and also a copyright notice. You may want to display a menu at the top of all pages and some company information, too. You can do all that easily with template inheritance.

To use template inheritance, you create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required