I have two models:
Gallery and Photo, Photo has Gallery as FK.
Is it possible to return in one call one photo per gallery?
I already tried:
photos = Photo.objects.filter(active=True)
photos.annotate(g=Count('gallery'))
unfortunately when I call query I got something like that:
GROUP BY "wall_ph
I would like prepare django form for several entries for one model.
Let's assume I have model Photo where I upload and save image.
>From model I will takie 10 entries and for each of image I would like
generate forms to set title, description, check if photo is active.
That part I have it and is w
Hi
I was wondering is it possible to get information about two tables in one
query?
I have two models
Team (id, name, active, country) and Player (id, first_name, second_name,
active, team)
where Player.team = ForeignKey(Team)
Of course one team may have several players and one player have one
3 matches
Mail list logo