Reputation: 494
I would like to know what would be the best practice. I have been using the @property
decorator a lot because it allows me to avoid creating custom context variables when I want to display something related to a model instance on a template.
I feel like my models are too big. Is this ok?
Upvotes: 6
Views: 1617
Reputation: 798804
It's not a problem unless you find yourself writing exactly the same code on model after model. At that point you should consider writing a template tag that takes the model as a parameter instead.
Upvotes: 4