Skip to content

Commit

Permalink
chore(urls): add redirect base to admin url
Browse files Browse the repository at this point in the history
  • Loading branch information
Shavkatjon-O committed Sep 9, 2024
1 parent a47f6dc commit dad9c30
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
from django.urls import re_path, path, include
from django.conf.urls.static import static
from django.conf import settings
from django.shortcuts import redirect

from drf_yasg import openapi
from drf_yasg.views import get_schema_view

from rest_framework import permissions


def redirect_base_to_admin(request):
return redirect("admin/")


schema_view = get_schema_view(
openapi.Info(
title="BRB Titans API",
Expand Down Expand Up @@ -50,6 +56,7 @@

# Admin urls
urlpatterns += [
path("", redirect_base_to_admin),
path("admin/", admin.site.urls),
]

Expand Down

0 comments on commit dad9c30

Please sign in to comment.