tibia-website/accounts/admin.py

25 lines
812 B
Python
Raw Normal View History

2019-01-20 16:48:54 +01:00
from django.contrib import admin
from .models import Accounts, Players, Towns
class AccountsAdmin(admin.ModelAdmin):
list_display = ('name',)
fields = ['name', 'password', 'type', 'email']
class PlayersAdmin(admin.ModelAdmin):
list_display = ('name', 'account',)
fields = [
'name', 'group_id', 'account', 'level', 'vocation',
'health', 'healthmax', 'maglevel', 'mana', 'manamax',
'town_id', 'posx', 'posy', 'posz', 'cap', 'sex', 'balance',
'skill_fist', 'skill_club', 'skill_sword', 'skill_axe',
'skill_dist', 'skill_shielding',
'skill_fishing',
]
class TownsAdmin(admin.ModelAdmin):
list_display = ('name',)
admin.site.register(Accounts, AccountsAdmin)
admin.site.register(Players, PlayersAdmin)
admin.site.register(Towns, TownsAdmin)