@ -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.
|
||||
|
||||
|
@ -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
|
@ -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')),
|
||||
|
||||
|
Reference in New Issue
Block a user