Drew Ferguson
unread,Jan 14, 2014, 11:26:12 AM1/14/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi
Django 1.5
I have a model which includes a ForeignKey field defined likes this
class Document(models.Model):
name = models.CharField(max_length=25, unique=True,
null=False,blank=False)
target = models.CharField(max_length=12,
choices=TARGETS,default='report')
content = models.TextField(null=False, blank=False)
fieldlist = models.TextField(null=True, blank=True)
multitarget = models.BooleanField(default=True, null=False,blank=False)
template = models.ForeignKey('Template',null=True,blank=True,
related_name='documents')
animal = models.ForeignKey('Animal',null=True,blank=True,
related_name='+')
the Animal table is quite large (>3000 records)
When a form template is called, there are no input fields rendered, just a
"save" button
If the Animal field is suppressed in the form with
class Meta(object):
model = Document
exclude = ['animal',]
the form renders correctly with appropriate input fields
Could someone suggest how to track down what is causing the problem with
the Animal selector when it is being generated? Is there a data issue
perhaps?
Thanks
--
Drew