Skip to content

Commit

Permalink
style(backend): linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuukis committed Nov 13, 2024
1 parent 7a30007 commit 4e2fe1e
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions kobo/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,29 @@
from django.views.generic.base import RedirectView
from rest_framework import status
from rest_framework.exceptions import server_error
from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, SpectacularSwaggerView
from drf_spectacular.views import (
SpectacularAPIView,
SpectacularRedocView,
SpectacularSwaggerView,
)

from kpi.utils.urls import is_request_for_html

admin.autodiscover()
admin.site.login = staff_member_required(
admin.site.login, login_url=settings.LOGIN_URL
)
admin.site.login = staff_member_required(admin.site.login, login_url=settings.LOGIN_URL)

urlpatterns = [

# YOUR PATTERNS
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
# Optional UI:
path('api/schema/swagger/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
path('api/schema/redoc/', SpectacularRedocView.as_view(url_name='schema'), name='redoc'),

path(
'api/schema/swagger/',
SpectacularSwaggerView.as_view(url_name='schema'),
name='swagger-ui',
),
path(
'api/schema/redoc/',
SpectacularRedocView.as_view(url_name='schema'),
name='redoc',
),
# https://github.com/stochastic-technologies/django-loginas
re_path(r'^admin/', include('loginas.urls')),
# Disable admin login form
Expand Down

0 comments on commit 4e2fe1e

Please sign in to comment.