Merge branch 'master' of github.com:jamesturk/fowl
This commit is contained in:
commit
dfa05b204a
1
TODO
1
TODO
@ -1,2 +1 @@
|
||||
* actually have belts change hands when title is on the line in a match
|
||||
* ability to add bonuses
|
||||
|
@ -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
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user