Skip to content

Commit

Permalink
trying to find where the avatar admin display is breaking (#851)
Browse files Browse the repository at this point in the history
* trying to find where it's breaking

* restart codeclimate - blank commit
  • Loading branch information
CelineBoudier committed Oct 11, 2018
1 parent f188996 commit 61f2ea6
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions aimmo/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,20 @@

class GameDataAdmin(admin.ModelAdmin):
list_display = ['id', 'name']

readonly_fields = ['players']

def players(self, obj):
return "\n".join([u.first_name for u in obj.can_play.all()])


class AvatarDataAdmin(admin.ModelAdmin):
list_display = ['id', 'game_identifier', 'game_name', 'owner_name']
list_display = ['id', 'owner_name']


def owner_name(self, obj):
return obj.owner

def game_name(self, obj):
return obj.game.name

def game_identifier(self, obj):
return obj.game.id


admin.site.register(Game, GameDataAdmin)
admin.site.register(Avatar, AvatarDataAdmin)

0 comments on commit 61f2ea6

Please sign in to comment.