John,
If you don't have to fill any of Checkbox's fields (attended,
was_drunk, silly_walk, naughty or been_seen), then i don't think you
have to create an instance of it bounded with an Event. Create it when
you have one of these fields. This way if you want to get a real
statistic of how many Ch
So, I have it doing what I want now:
class Event(models.Model):
date = models.DateTimeField()
description = models.TextField()
def __init__(self, *args, **kwargs):
models.Model.__init__(self, *args, **kwargs)
self.checklist = CheckList(se
So, after re-reading the related_name / related_objects documentation
I've dealt with my lack of understand on properly getting __str__
method to return what I want, I thnk.
And the other part, creating an instance of CheckList whenever an
Event is created should be easy, too.
Just wasn't lookin
Hi,
I have the following:
class Event(models.Model):
date = models.DateTimeField()
description = models.TextField()
def __str__(self):
return self.date
class Admin:pass
class CheckList(models.Model):
name = models.CharField(max_length=32)
4 matches
Mail list logo