Hi,

i use the django auth framework and have the following model:


class Sensor(models.Model):
    """
    auth_group = models.ForeignKey('auth.Group')
    identifier = models.CharField(help_text='identifier of the
sensor', max_length=30, db_index=True)
    comment = models.TextField(help_text='a comment for the sensor',
blank=True)


I know that i can access the groups with:

groups = request.user.groups.all()

Now, i want to have all sensors which are in the auth_group from the
actual logged in user.

How can i do that?


Best regards,

tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to