O'Reilly logo

Django Unleashed by Andrew Pinkham

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

17.2.3 Anticipating Behavior Overrides

Our GCBV, when compared to Django’s GCBVs, is somewhat problematic. If we wanted to override behavior, we would be stuck overriding the entirety of the get() method, which rather defeats the purposes. Instead, we should provide multiple methods that each provide different behavior.

In the case of an object detail page, we are doing several things:

Image Getting an object (Tag, Startup, etc.) from the database

Image Building a dictionary for the template context

Setting the new object in the template context as a specific ...

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