I created a custom admin view in django for one of the models. But the url is available to anyone who is not logged it.
from django.contrib import admin from django.urls import path from django.shortcuts import render, redirect from .models import Question from django.contrib.admin.views.decorators import staff_member_required class QuestionAdmin(admin.ModelAdmin): list_display =
The above is the detailed content of How to add authentication to a Django custom admin view?. For more information, please follow other related articles on the PHP Chinese website!