I need to add key/val开发者_如何转开发ue to queryset per each object based on stuff in request.session.
How to do that?
Alan
Historical answer:
You can use the .extra()
method on a queryset to add extra 'fields'.
There is some documentation that may be useful.
New answer:
You should use the .annotate()
method to add extra fields.
View the documentation.
精彩评论