Merge branch 'master' of github.com:jamesturk/fowl

This commit is contained in:
Erin Braswell 2012-05-28 02:03:54 -04:00
commit dfa05b204a
5 changed files with 8 additions and 7 deletions

1
TODO
View File

@ -1,2 +1 @@
* actually have belts change hands when title is on the line in a match
* ability to add bonuses

View File

@ -3,8 +3,8 @@ from django.contrib import admin
from .models import Star, Match, Event, League, Team
class StarAdmin(admin.ModelAdmin):
list_display = ('name', 'division', 'active')
list_filter = ('division', 'active')
list_display = ('name', 'division')
list_filter = ('division',)
admin.site.register(Star, StarAdmin)
admin.site.register(Match)

File diff suppressed because one or more lines are too long

View File

@ -29,5 +29,4 @@ class Command(NoArgsCommand):
photo_url = url + div.xpath('a/img/@data-fullsrc')[0]
star = Star.objects.create(id=id, name=name, division=division,
photo_url=photo_url,
active=(division != 'other'))
photo_url=photo_url)

View File

@ -27,7 +27,10 @@ class Star(models.Model):
photo_url = models.URLField()
division = models.CharField(max_length=100)
title = models.CharField(max_length=20, choices=TITLES, null=True)
active = models.BooleanField()
@property
def active(self):
return self.division != 'other'
def win_title(self, title, tag_partner=None):
Star.objects.filter(title=title).update(title=None)