I am working on an election application. I am at the point where I
would like to start putting together the data entry point for the app
and would like a little advice on how to proceed. Here is a
(simplified) version of my models:
class Candidate(models.Model):
f_name = models.CharField()
l_name = models.CharField()
class Campaign(models.Model):
candidate = models.ForeignKey(Candidate)
race = models.ForeignKey(Race)
vote_total = models.IntegerField()
class Race(models.Model):
election = models.ForeignKey(Elections)
name = models.CharField()
office = models.ForeignKey(Office)
class Elections(models.Model):
date = models.DateField()
class Office(models.Model):
office_number = models.IntegerField()
office_name = models.CharField()
I am wanting to set up a form that would allow me to iterate through a
list of races based on their Elections date and edit the Campaign
vote_total field inline with everything else.
Will a normal form handle this or am I needing to go after another
solution? I have worked with forms many tmies but only one form at a
time with no ForeignKey or recursive ForeignKey relationships.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.