Open Virako opened 5 years ago
We need API call for obtain a some ContentTypes where key is a ContentType pk and value is a name of model.
GET: content/types/
return:
{ 15: 'item', 23: 'knowledge', 24: 'player', ... }
We only need 5 elements: Player, NPC, Item, Knowledge and Rol. This call will be necessary when are creating a new Content from frontend.
ContentType is a django model where are saved all django models:
from django.contrib.contenttypes.models import ContentType
We need API call for obtain a some ContentTypes where key is a ContentType pk and value is a name of model.
GET: content/types/
return:
We only need 5 elements: Player, NPC, Item, Knowledge and Rol. This call will be necessary when are creating a new Content from frontend.
ContentType is a django model where are saved all django models:
from django.contrib.contenttypes.models import ContentType