Hola que tal, eh buscado informacion en la documentaciony encontre
esta propiedad "ForeignKey.limit_choices_to"
para delimitar mi ForeignKey.
Lo que quiero hacer es delimitar mi ForeignKey de grupo_pregunta para
que solo me tome el id, del script

Eh intentado ponerlo asi pero me marca el sigiuente error:
'ForeignKey' object has no attribute 'id'

    script = models.ForeignKey(Script,limit_choices_to=
{'activo':True})
    grupo_pregunta = models.ForeignKey(GrupoPregunta,
limit_choices_to= {'script': script.id})

Alguien me podria ayudar

--~--~---------~--~----~------------~-------~--~----~
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