Changes between Initial Version and Version 1 of Ticket #16418, comment 7


Ignore:
Timestamp:
May 10, 2012, 2:13:44 AM (13 years ago)
Author:
Łukasz Rekucki

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16418, comment 7

    initial v1  
    11I have to disagree. Doing this kind of explicit checks for types is not very pythonic, unless you plan to change models.Model into an ABC. Duck typing is usefull. Sure, there will be cases where attribute names overlap and lead to some confusion, but those are fairly rare.
    22
    3 Lets not forget that the OP's problem, comes from misuse of the API (DetailView is designed to display instances of Model or objects behaving similar). @kd4ttc, if you need some extra objects (like a form) for rendering you can put the into context by overriding {{{get_context_data()}}}, no need to hack through the whole API.
     3Lets not forget that the OP's problem, comes from misuse of the API (DetailView is designed to display instances of Model or objects behaving similar). @kd4ttc, if you need some extra objects (like a form) for rendering you can put them into context by overriding {{{get_context_data()}}}, no need to hack through the whole API.
Back to Top