Chapter 6: Django Admin – Add Members

Django Admin – Add Members: How to add new members (staff users, content editors, moderators, support team, etc.) to the Django admin.

This is the moment when your app stops being “just my personal project” and starts feeling like something a team can actually use.

Many beginners think “creating users = only createsuperuser command” — but that gives full god-mode access. In real life you almost never want to give full access to anyone except 1–2 trusted developers. Instead you create limited staff users with exactly the permissions they need.

We’re going to do this very slowly, practically, screen-by-screen — like I’m holding your mouse and explaining every click and decision.

Let’s build a realistic team setup for your Polls app.

Step 1 – Make Sure You Are Superuser & Admin Works

  1. Run server if not already running:

    Bash
  2. Open incognito/private tab (important — to avoid confusion with existing sessions)

  3. Go to: http://127.0.0.1:8000/admin/

  4. Login with your superuser account (the one you created with createsuperuser)

    → Username: webliance (or whatever you chose) → Password: the strong one you set

If you haven’t created superuser yet:

Bash

Do it now — this is the only user who can create other users by default.

Step 2 – Understand the Goal: Who Do We Want to Add?

Realistic team for a small-to-medium Polls app in 2026:

  • You → superuser (full access)
  • Content Editor → can add/edit/delete questions & choices
  • Moderator / Reviewer → can view & change status (active/inactive), delete bad choices
  • Viewer / Analyst → can only see questions, choices, vote counts (read-only)
  • Support person → can see user list (if you have user registration later)

We’ll create these four types today.

Step 3 – Create Groups First (Recommended Best Practice)

Never assign permissions directly to users — always use Groups.

Go to admin home → under Authentication and Authorization → click GroupsADD GROUP

Create these groups one by one:

Group 1: Poll Editors (full CRUD on polls)

  • Group name: Poll Editors
  • Scroll to Available permissions
  • Filter: polls
  • Select everything that starts with polls | question and polls | choice:
    • Can add question / choice
    • Can change question / choice
    • Can delete question / choice
    • Can view question / choice
  • Move them to Chosen permissions (right arrow)
  • Save

Group 2: Poll Moderators (change status + delete)

  • Group name: Poll Moderators
  • Select:
    • Can change question (for is_active)
    • Can delete question
    • Can change choice
    • Can delete choice
    • Can view everything
  • Save

Group 3: Poll Viewers (read-only)

  • Group name: Poll Viewers
  • Select only:
    • Can view question
    • Can view choice
  • Save

Step 4 – Now Create Actual Team Members (Users)

Go to UsersADD USER

User 1: Content Editor (Rani)

  1. Username: rani-editor
  2. Password: choose strong password (you will give it to her securely)
  3. Password confirmation: same
  4. (Email optional but recommended)
  5. Click Save and continue editing

Now on the change page:

  • Check Staff status → Yes (this allows admin login)
  • Do NOT check Superuser status
  • Scroll to Groups section
  • Move Poll Editors from Available to Chosen groups
  • (Optional) Fill first name: Rani, last name: Sharma
  • Save

User 2: Moderator (Rahul)

  • Username: rahul-mod
  • Password: …
  • Staff status: Yes
  • Groups: Poll Moderators
  • Save

User 3: Read-Only Analyst (Sneha)

  • Username: sneha-view
  • Staff status: Yes
  • Groups: Poll Viewers
  • Save

Step 5 – Test Each New Member (Very Important – Do This Live)

Open a new incognito/private window for each test (so superuser session doesn’t interfere).

  1. Login as rani-editor

    → Sees Polls section → Can add, edit, delete questions & choices → Cannot see Users, Groups, or any other apps

  2. Login as rahul-mod

    → Can change is_active, delete bad polls/choices → Cannot add new questions (if you didn’t give add permission)

  3. Login as sneha-view

    → Sees Polls section → Can only view — no Add / Change / Delete buttons

  4. Logout & login as yourself (superuser)

    → Full access — you can see and edit everything

Step 6 – Common Real-Life “Add Member” Scenarios (Copy-Paste These)

Scenario A: New content writer joins team

  1. Users → Add user
  2. Username: writer-anjali
  3. Staff status: Yes
  4. Groups: Poll Editors
  5. Give her the username & temporary password (ask her to change it)

Scenario B: Someone leaves company

  1. Find user → edit

  2. Uncheck Active → Save → Can no longer login anywhere

    (Better than deleting — keeps audit history)

Scenario C: Give someone temporary full access (rare)

  1. Edit user
  2. Check Superuser status → Save
  3. After work → uncheck it again

Step 7 – Quick Security Reminders (Very Important)

  • Never share superuser login
  • Use groups — never assign individual permissions to 10+ users
  • Set is_active=False when someone leaves
  • In production: force password change on first login, enable 2FA
  • Regularly audit: Users → filter is_staff=True → review list

Your Quick Task Right Now (Do It – It Will Stick Forever)

  1. Create the 3 groups (Poll Editors, Poll Moderators, Poll Viewers)
  2. Create 2–3 staff users and assign them to different groups
  3. Open incognito windows and login as each user → see exactly what they can/can’t do
  4. As superuser → create one new question → see it appear when logged in as editor user

Tell me what feels next:

  • “Done! Now show me how to reset a forgotten password via admin/email”
  • “How to add custom fields to User (phone number, profile picture)?”
  • “I want object-level permissions (editor can only edit their own polls)”
  • “Permission denied error – here’s what happened”
  • Or finally ready for: “Let’s build the public voting flow – form + POST + atomic vote + results”

You now know how to safely and professionally add team members to your Django admin — this is what separates hobby projects from real products used by actual teams.

You’re doing really well — let’s keep building! 🚀🇮🇳

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *