From d1c3ac607974504ee4c956ea8e0f882dcad5ac79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 29 Nov 2023 21:18:02 +0100 Subject: [PATCH] Revert "Move GraphQL to separata app" This reverts commit 6ac4209492c95e7fc06b6a7ba9fced42d42037b8. --- api/__init__.py | 0 api/admin.py | 3 --- api/apps.py | 6 ------ api/migrations/__init__.py | 0 api/models.py | 3 --- api/tests.py | 3 --- api/views.py | 3 --- {api => games}/schema.py | 12 ++++++------ timetracker/settings.py | 3 +-- 9 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 api/__init__.py delete mode 100644 api/admin.py delete mode 100644 api/apps.py delete mode 100644 api/migrations/__init__.py delete mode 100644 api/models.py delete mode 100644 api/tests.py delete mode 100644 api/views.py rename {api => games}/schema.py (86%) diff --git a/api/__init__.py b/api/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/api/admin.py b/api/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/api/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/api/apps.py b/api/apps.py deleted file mode 100644 index 878e7d5..0000000 --- a/api/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.apps import AppConfig - - -class ApiConfig(AppConfig): - default_auto_field = "django.db.models.BigAutoField" - name = "api" diff --git a/api/migrations/__init__.py b/api/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/api/models.py b/api/models.py deleted file mode 100644 index 71a8362..0000000 --- a/api/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/api/tests.py b/api/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/api/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/api/views.py b/api/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/api/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. diff --git a/api/schema.py b/games/schema.py similarity index 86% rename from api/schema.py rename to games/schema.py index 98f3860..a5d2908 100644 --- a/api/schema.py +++ b/games/schema.py @@ -1,12 +1,12 @@ import graphene from graphene_django import DjangoObjectType -from games.models import Device as DeviceModel -from games.models import Edition as EditionModel -from games.models import Game as GameModel -from games.models import Platform as PlatformModel -from games.models import Purchase as PurchaseModel -from games.models import Session as SessionModel +from .models import Device as DeviceModel +from .models import Edition as EditionModel +from .models import Game as GameModel +from .models import Platform as PlatformModel +from .models import Purchase as PurchaseModel +from .models import Session as SessionModel class Game(DjangoObjectType): diff --git a/timetracker/settings.py b/timetracker/settings.py index 47e5e21..6386976 100644 --- a/timetracker/settings.py +++ b/timetracker/settings.py @@ -33,7 +33,6 @@ ALLOWED_HOSTS = ["*"] INSTALLED_APPS = [ "games.apps.GamesConfig", - "api.apps.ApiConfig", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", @@ -42,7 +41,7 @@ INSTALLED_APPS = [ "graphene_django", ] -GRAPHENE = {"SCHEMA": "api.schema.schema"} +GRAPHENE = {"SCHEMA": "games.schema.schema"} if DEBUG: INSTALLED_APPS.append("django_extensions")