Separate views into their own file

This commit is contained in:
2024-07-09 15:11:27 +02:00
parent e0dbfb1c46
commit ec75ce1ccb
6 changed files with 246 additions and 166 deletions

View File

@ -2,16 +2,18 @@ from __future__ import annotations
from django.urls import URLPattern, URLResolver, path
from . import views
from .views.games import GameView
from .views.index import index
from .views.webhooks import WebhooksView
app_name: str = "core"
urlpatterns: list[URLPattern | URLResolver] = [
path(route="", view=views.index, name="index"),
path(route="", view=index, name="index"),
path(
route="games/",
view=views.GameView.as_view(),
view=GameView.as_view(),
name="games",
),
path("webhooks/", views.WebhooksView.as_view(), name="webhooks"),
path("webhooks/", WebhooksView.as_view(), name="webhooks"),
]