I have a field with *limit_choices_to*, and want it to be only filtered 
items related the account ('ID') user. How can I do this?

Example (Does not work):

class Car(models.Model):
    user = models.ForeignKey(User)
    color = models.CharField(max_length=200)
    typeo = models.ForeignKey(Typeo, limit_choices_to={'user__id': 
session['user_id']})

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8d2b4b10-83b9-489c-b834-31ddebc0c9df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to