<filename>src/core/views/miscellanous.py
from django.shortcuts import redirect


def index(request):
    """ Redirect from main page to swagger """
    return redirect('/swagger')

<filename>src/core/views/miscellanous.py
from django.shortcuts import redirect


def index(request):
    """ Redirect from main page to swagger """
    return redirect('/swagger')

Redirect from main page to swagger