2 ms·
I've found this view_class_decorator and MultipleFormView particularly helpful with class-based views: https://gist.github.com/1953579 https://gist.github.com/1
by tkaemming 15y ago
I've found this view_class_decorator and MultipleFormView particularly helpful with class-based views: https://gist.github.com/1953579 https://gist.github.com/1953579
- kennethlove 15y agoI don't care for the decorator at all, but the MultipleFormView mixin looks very handy. Thanks.
- andrewingram 15y agoThe decorator actually raises an interesting issue. Are permissions and security part of the core application logic, or are they wrappers. The mixin approach is nice and OO, but it's potentially tying two different layers of functionality together. Whereas the decorator is closer to aspect-oriented programming which attempts to isolate core business logic from such modifiers. I'm actually quite interested in the challenge of applying design patterns for large systems (inversion-of-control, AOP etc) to Django, which has some stubborn behaviours that get in the way.
- kennethlove 15y agoTrue, that does bring up an interesting point. I'll have to give it another look later, maybe I'll change my mind.