Let us suppose that there is a admin page in my website designed by me for doing some actions on the website. now i want that only few user that belongs to a specific can visit that page. other users should redirected or should have see an error page when they try to go at that page.
for karan(admin ) can visit that page but not ram(simple user)
you can also refer any link from the django docs
thanks!