You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create serializers and use deserializers for create/update
Create factories for tests with factory-boy
For create content, there are two ways:
content-way1: { // Thing or Character already exist in DB
game: game_pk, // int,
position: (lat, lng), // tuple(float, float),
content_type: "Item/Knowledge/Rol/Player/NPC", // str
content_id: item_id, rol_id, ..., // id
}
content-way2: { // Thing or Character not exist and you should create
game: game_pk, // int,
position: (lat, lng), // tuple(float, float),
content_type: "Item/Knowledge/Rol/Player/NPC", // str
content: {
// Thing or Character serializered
},
content_id: item_id, rol_id, ... (when content will be created), // id
}
Create contents inside games:
When we are creating a game, we should be able to create contents inside game. There are two ways for create:
game-way1: { // Thing or Character already exist
'title': 'Example',
'start': '2018-02-04T07:28:12.546030+00:00',
'preferences': {
'vision_distance': 100,
'meeting_distance': 20,
'visible_character': True
}
'contents': [
{
game: not neccesary you should use this game,
position: (lat, lng), // tuple(float, float),
content_type: "Item/Knowledge/Rol/Player/NPC", // str
content_id: item_id, rol_id, ..., // id
},
],
}
game-way2: { // Thing or Character not exist and you should create
'title': 'Example',
'start': '2018-02-04T07:28:12.546030+00:00',
'preferences': {
'vision_distance': 100,
'meeting_distance': 20,
'visible_character': True
}
'contents': [
{
game: not neccesary you should use this game,
position: (lat, lng), // tuple(float, float),
content_type: "Item/Knowledge/Rol/Player/NPC", // str
content: {
// Thing or Character serializered
},
content_id: item_id, rol_id, ..., // id
},
],
}
The text was updated successfully, but these errors were encountered:
* Added for contents: serializers/deserializers for create/update, factories, api rest and tests
* Improved game views and test for added contents to Game
Create API REST for Content:
When we are creating a game, we should be able to create contents inside game. There are two ways for create:
The text was updated successfully, but these errors were encountered: