Im developing a childcare app and I have a problem when I want to relate an object of a table with a UserProfile field so for example:
user:some_parent In a view, I want to see only the childs of that parent. In python manage.py shell: -Example: Parent case- user.userprofile_set.create(tipo='padre', asoc=Padre.objects.get (pk=1)) models.py: class Parent(models.Model): childrens = models.ManyToManyField(Alumno) #another fields class Child(models.Model) class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) tipo = models.CharField(max_length=20) asoc = ??? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---