I've created a class called ElectionResults that contains the
following fields:

election = models.ForeignKey(Election)
precinct = models.ForeignKey(Precinct)
office = models.ForeignKey(Office)
candidate = models.ForeignKey(Candidate)
total_votes = models.PositiveIntegerField(default=0)

Here's the problem.  I will need to have a current Results table
generated for several reasons. One is performance.  Keeping Current
Election Results in their own table away from past election results
will result in quicker lookups.  The other reason is that the current
election results table will need to be dropped and recreated on a
timely basis.  The reason is the data will be imported from a CSV file
that gets updated frequently.

So should I just create two classes that are identical but name one
CurrentElectionResults and the other PastElectionResults?
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to