Answer the question
In order to leave comments, you need to log in
Django: instead of foreign key - select another field from table in queryset?
The question is the following:
def ajax(request, client_id):<br/>
client = get_object_or_404(Client, pk=client_id)<br/>
works = Work.objects.values('short_description', 'thumb', 'content', 'real_size', 'type').filter(client=client)<br/>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question