ser has. If you just want the list of friends then
> extend that query with a values_list like so:
>
> Friendship.objects.filter(user__pk = 32, status__in = [Friendship.FRIEND,
> Friendship.FAVORITE]) .values_list('friend', flat=True)
>
>
>
> On Tuesday, December 17, 20
I want to query the friends of an User but I'm struggling to get the
correct query.
Models:
class User(AbstractUser, TimestampedModel, SerializeMixin):
city = models.CharField(max_length=60, blank=True)
picture = models.URLField(blank=True)
cover_picture =
4, 2013 10:50:54 AM UTC-3, Arthur Silva wrote:
>
> Here're my models
>
>
> class PingUser(AbstractUser):
> friends = models.ManyToManyField("self", through="Friendship",
> symmetrical=False)
>
> class Friendship(Ti
Here're my models
class PingUser(AbstractUser):
friends = models.ManyToManyField("self", through="Friendship",
symmetrical=False)
class Friendship(TimestampedModel, SerializeMixin):
STATUS_CHOICES = (
("pending", "Pending"),
("friend",
4 matches
Mail list logo