diff --git a/app/centurion/settings.py b/app/centurion/settings.py index 7addd1f9..b3f9de31 100644 --- a/app/centurion/settings.py +++ b/app/centurion/settings.py @@ -398,7 +398,7 @@ if API_ENABLED: 'TEST_REQUEST_DEFAULT_FORMAT': 'json', 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema', 'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.NamespaceVersioning', - 'DEFAULT_VERSION': 'v1', + 'DEFAULT_VERSION': 'v2', 'ALLOWED_VERSIONS': [ 'v1', 'v2' @@ -409,7 +409,7 @@ if API_ENABLED: 'TITLE': 'Centurion ERP API', 'DESCRIPTION': """This UI exists to server the purpose of being the API documentation. -Centurion ERP's API is versioned, with [v1 Depreciated](/api/swagger) and [v2 as the current](/api/v2/docs). +Centurion ERP's API is versioned, with v2 as the current. For CRUD actions `Add`, `update` and `replace` the serializer that returns is the Models `View` serializer. diff --git a/app/centurion/tests/unit/test_context_processor_base.py b/app/centurion/tests/unit/test_context_processor_base.py deleted file mode 100644 index e1e0c2a9..00000000 --- a/app/centurion/tests/unit/test_context_processor_base.py +++ /dev/null @@ -1,18 +0,0 @@ -from django.test import TestCase, Client - -import pytest -import unittest -import requests - - - -@pytest.mark.skip(reason="to be written") -def test_context_processor_base_user_settings_if_authenticated_only(): - """ Context Processor base to only provide `user_settings` for an authenticated user """ - pass - - -@pytest.mark.skip(reason="to be written") -def test_context_processor_base_user_settings_is_logged_in_user(): - """ Context Processor base to only provide `user_settings` for the current logged in user """ - pass diff --git a/app/centurion/urls.py b/app/centurion/urls.py index 335dcd1a..4970f85e 100644 --- a/app/centurion/urls.py +++ b/app/centurion/urls.py @@ -1,27 +1,9 @@ -""" -URL configuration for itsm project. - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/5.0/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_centurion.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" from django.conf import settings from django.contrib import admin from django.contrib.auth import views as auth_views from django.views.static import serve from django.urls import include, path, re_path -from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView - urlpatterns = [ @@ -49,8 +31,6 @@ if settings.API_ENABLED: urlpatterns += [ path("api/", include("api.urls", namespace = 'v1')), - path('api/schema/', SpectacularAPIView.as_view(api_version='v1'), name='schema'), - path('api/swagger/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'), path("api/v2/", include("api.urls_v2", namespace = 'v2')),