From 827508a4806a5faf3220ce6bf0324182e44b1bb9 Mon Sep 17 00:00:00 2001 From: Maximilian Giller Date: Sun, 25 Feb 2024 19:16:55 +0100 Subject: [PATCH] Created api v1 app --- mixr_api/user/models/user_services.py => api_v1/__init__.py | 0 api_v1/admin.py | 6 ++++++ api_v1/apps.py | 6 ++++++ api_v1/migrations/__init__.py | 0 api_v1/models.py | 4 ++++ api_v1/tests.py | 3 +++ api_v1/user/models/__init__.py | 1 + {mixr_api => api_v1}/user/models/user_information.py | 0 api_v1/user/models/user_services.py | 0 api_v1/views.py | 3 +++ mixr_api/settings.py | 1 + 11 files changed, 24 insertions(+) rename mixr_api/user/models/user_services.py => api_v1/__init__.py (100%) create mode 100644 api_v1/admin.py create mode 100644 api_v1/apps.py create mode 100644 api_v1/migrations/__init__.py create mode 100644 api_v1/models.py create mode 100644 api_v1/tests.py create mode 100644 api_v1/user/models/__init__.py rename {mixr_api => api_v1}/user/models/user_information.py (100%) create mode 100644 api_v1/user/models/user_services.py create mode 100644 api_v1/views.py diff --git a/mixr_api/user/models/user_services.py b/api_v1/__init__.py similarity index 100% rename from mixr_api/user/models/user_services.py rename to api_v1/__init__.py diff --git a/api_v1/admin.py b/api_v1/admin.py new file mode 100644 index 0000000..5fe1ec9 --- /dev/null +++ b/api_v1/admin.py @@ -0,0 +1,6 @@ +from django.contrib import admin +from .user.models import * + +admin.site.register(UserInformation) + +# Register your models here. diff --git a/api_v1/apps.py b/api_v1/apps.py new file mode 100644 index 0000000..25d545a --- /dev/null +++ b/api_v1/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ApiV1Config(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'api_v1' diff --git a/api_v1/migrations/__init__.py b/api_v1/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/api_v1/models.py b/api_v1/models.py new file mode 100644 index 0000000..15377ca --- /dev/null +++ b/api_v1/models.py @@ -0,0 +1,4 @@ +from django.db import models +from .user.models import * + +# Create your models here. diff --git a/api_v1/tests.py b/api_v1/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/api_v1/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/api_v1/user/models/__init__.py b/api_v1/user/models/__init__.py new file mode 100644 index 0000000..130f2ae --- /dev/null +++ b/api_v1/user/models/__init__.py @@ -0,0 +1 @@ +from .user_information import UserInformation \ No newline at end of file diff --git a/mixr_api/user/models/user_information.py b/api_v1/user/models/user_information.py similarity index 100% rename from mixr_api/user/models/user_information.py rename to api_v1/user/models/user_information.py diff --git a/api_v1/user/models/user_services.py b/api_v1/user/models/user_services.py new file mode 100644 index 0000000..e69de29 diff --git a/api_v1/views.py b/api_v1/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/api_v1/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/mixr_api/settings.py b/mixr_api/settings.py index 48e5b70..3edf9ac 100644 --- a/mixr_api/settings.py +++ b/mixr_api/settings.py @@ -31,6 +31,7 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ + 'api_v1.apps.ApiV1Config', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes',