On Friday, March 27, 2015 at 11:10:19 PM UTC+8, Filipe Ximenes wrote:
>
> Just checking: when you say you are adding users using
>
> Group.users.add(user)
>
> in this case `Group` is an instance of the Group model and NOT the actual
> model, correct?
>
> if so, you can make a query using the s
Just checking: when you say you are adding users using
Group.users.add(user)
in this case `Group` is an instance of the Group model and NOT the actual
model, correct?
if so, you can make a query using the same instance, looking for the user:
user = Group.user.filter(user).first()
if user:
Hi,
Sorry for asking a new B question. I have following code in a module.py:
class Group(models.Model):
..
users = models.ManyToManyField(User, blank=True, null=True)
.
I can add user or delete user by calling Group.users.add(user) or
Group.users.remove(user), but how can I check if t
3 matches
Mail list logo