+ def make_for_contest(self):
+ assert not self.poem_set.filter(for_contest=True).exists()
+ for i in range(settings.POETRY_POEMS_FOR_CONTEST):
+ p = self.write()
+ p.for_contest = True
+ p.save()
+ return self.poem_set.filter(for_contest=True)
+
+ def contest_poems(self):
+ return self.poem_set.filter(in_contest=True)
+