-- MODELS -- ( Other, unimportant fields/models have been removed )
class Band(models.Model):
name = models.CharField(max_length = 50, unique = True)
class Venue(models.Model):
name = models.CharField(max_length = 50)
class Event(models.Model):
name = models.CharField(max_length = 50, unique = True)
info = models.TextField(max_length = 200, blank = True)
date = models.DateTimeField()
bands = models.ManyToManyField(Band)
venue = models.ForeignKey(Venue)
If an Event is part of a Tour/Festival that has multiple dates (not
necessarily consecutive) I don't want to re-enter the bands and extra
info for each Event - where, essentially, I'll only have a different
Venue and Date assigned.
Currently, the Automatic Admin gives me the ability to quickly add/
change Bands and Venues for an Event, in one place. I'd like to keep
it that way if possible.
I've been thinking this into the ground on the best way to abstract
the Bands/Dates/Venues from the Event without causing rediculous
amounts of Joins to happen just to list the Events by date, and show
which Bands will be at each.
Also, with Dates/Venues abstracted, it (seems like it) makes it harder
to just get a list of Events by date, and use Pagination, etc.
Any suggestions/ideas on how to alter the models to get a bit closer
to the functionality I desire?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---