You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

44 lines
1.1 KiB

from ..api import BaseModelResource
from .models import (
CharacterClass,
EquipmentArmour,
EquipmentMeleeWeapon,
EquipmentRangedWeapon,
CharacterNPC,
Spell
)
class CharacterClassResource(BaseModelResource):
class Meta(BaseModelResource.Meta):
model = CharacterClass
name = 'classes'
class EquipmentArmourResource(BaseModelResource):
class Meta(BaseModelResource.Meta):
model = EquipmentArmour
class EquipmentMeleeWeaponResource(BaseModelResource):
class Meta(BaseModelResource.Meta):
model = EquipmentMeleeWeapon
class EquipmentRangedWeaponResource(BaseModelResource):
class Meta(BaseModelResource.Meta):
model = EquipmentRangedWeapon
class CharacterNPCResource(BaseModelResource):
class Meta(BaseModelResource.Meta):
model = CharacterNPC
class SpellResource(BaseModelResource):
class Meta(BaseModelResource.Meta):
model = Spell
resources = [
CharacterClassResource,
EquipmentArmourResource,
EquipmentMeleeWeaponResource,
EquipmentRangedWeaponResource,
CharacterNPCResource,
SpellResource
]