* Adding the GameVent model and migration * Initializing the GameEvent endpoint * GameEvent listing endpoint * Adding CLICK_NAIVE event * Added signal for identify what is on the click location * Using row and col integer is better than metadata with jsonfield * Create event for the same position is not allowed * Better signals control * Adding a board progress to Game model * Identifying the win status * Hide generated board from client
15 lines
463 B
Python
15 lines
463 B
Python
from django.urls import path
|
|
|
|
from .resources.main import MainResource
|
|
from .resources.game import GameResource, GameSingleResource, GameEventResource
|
|
|
|
|
|
app_name = "api"
|
|
|
|
urlpatterns = [
|
|
path("games/<game_id>/events", GameEventResource.as_view(), name="games_events"),
|
|
path("games/<game_id>", GameSingleResource.as_view(), name="games_single"),
|
|
path("games", GameResource.as_view(), name="games"),
|
|
path("", MainResource.as_view(), name="main"),
|
|
]
|