Johny Jho
Johny Jho

Reputation: 95

Django change queryset field not affecting DB

If there a method to change queryset field, applying a function to it, and then accessing this filed in a template?

@property (getter/setter) can't work with querysets, only model's fields. Any advices?

Upvotes: 0

Views: 54

Answers (1)

Tomas Walch
Tomas Walch

Reputation: 2305

Create a custom Manager returning a custom Queryset. Read more about it in the Django docs.

Upvotes: 1

Related Questions