DEV Community

Mirzonabot
Mirzonabot

Posted on

How to add authentication to a Django custom admin view?

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 =

Top comments (0)