diff --git a/fowl/game/models.py b/fowl/game/models.py index 74f876e..0aa02f8 100644 --- a/fowl/game/models.py +++ b/fowl/game/models.py @@ -69,6 +69,10 @@ class TitleReign(models.Model): begin_date = models.DateField() end_date = models.DateField(null=True) + def __unicode__(self): + return '{0} champion from {1}-{2}'.format(self.get_title_display(), + self.begin_date, + self.end_date or '') class Event(models.Model): name = models.CharField(max_length=100) diff --git a/setup_league.py b/setup_league.py index f0a2234..b928ab2 100644 --- a/setup_league.py +++ b/setup_league.py @@ -95,9 +95,9 @@ event.add_match('sheamus', 'randyorton', 'chrisjericho', 'albertodelrio', winner='sheamus', outcome='normal', title_at_stake='heavyweight') event.add_match('brodusclay', 'themiz', winner='brodusclay', outcome='normal') -event.add_match('christian', 'codyrhodes', winner='christian', - outcome='normal', title_at_stake='ic') -_give_belt('christian', 'ic') +m = event.add_match('christian', 'codyrhodes', winner='christian', + outcome='normal', title_at_stake='ic') +m.do_title_change() event.add_match('cmpunk', 'danielbryan', winner='cmpunk', outcome='normal', title_at_stake='wwe') event.add_match('ryback', 'camacho', winner='ryback', outcome='normal') @@ -140,6 +140,7 @@ event.add_match('christian', 'hunico', winner='christian', event.add_match(['titusoneil', 'darrenyoung'], ['jimmyuso', 'jeyuso'], winner='titusoneil', outcome='normal') +Star.objects.filter(name__startswith='Nobody').delete() Star.objects.create(name='Nobody One', pk='nobody1') Star.objects.create(name='Nobody Two', pk='nobody2') event.add_match('ryback',