25 lines
812 B
Python
25 lines
812 B
Python
|
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)
|