-
Notifications
You must be signed in to change notification settings - Fork 0
admin
Django Admin — the super-user backend for full control over ITG Media App's data, users, and configuration.
The Django Admin panel is the true super-user backend for ITG Media App. While most day-to-day management happens through the frontend dashboard, the admin panel provides full access to every model, user, and setting in the database.
Access it at your configured admin URL (default: /admin/).
⚠️ Critical: The Django Admin panel is powerful — it gives full database access. Secure it properly before going to production.
The default /admin/ path is targeted by bots and attackers. Change it:
# .env
ADMIN_URL=my-secure-panel/Pick something hard to guess — avoid admin, backend, panel, dashboard.
Restrict access to trusted IP addresses only:
# .env
ADMIN_IP_WHITELIST=203.0.113.1,203.0.113.2- Only requests from these IPs can access the admin
- Use your office IP, VPN IP, or static home IP
- Leave blank to disable IP checking (not recommended)
- Multiple IPs are comma-separated
| Measure | Recommendation |
|---|---|
| Strong Password | Use a 20+ character random password for admin accounts |
| 2FA | Consider adding Django OTP or similar two-factor authentication |
| HTTPS Only | Always serve admin over HTTPS — never over plain HTTP |
| Limited Admin Users | Only create admin accounts for people who actually need them |
| Audit Logging | Monitor admin login attempts and actions |
ITG Media App registers these models in the Django Admin:
| Model | Purpose |
|---|---|
| Users | Django's built-in user management |
| Profiles | User profiles with roles, bio, social links |
| Shows | Scheduled shows with guest assignments |
| Guest Requests | Guest join requests with approval workflow |
| Blog Posts | Blog articles with categories and featured flag |
| Blog Comments | User comments on blog posts |
| Media Assets | Uploaded images, videos, with tags |
| Contact Inquiries | Messages from the contact form |
| Model | Purpose |
|---|---|
| AI Personalities | Define chatbot personality, tone, and behavior |
| AI Chat Sessions | User chat sessions with conversation history |
| AI Chat Messages | Individual messages within chat sessions |
| Site Chat Config | Chat widget settings (business hours, rate limits) |
| Site Chat FAQs | Pre-written FAQ responses |
| Model | Purpose |
|---|---|
| Streaming Platforms | Connected social platforms (YouTube, Facebook, TikTok) |
| Streaming Sessions | Active and past streaming sessions |
| WebRTC Rooms | LiveKit room configurations |
| WebRTC Participants | Participant records in WebRTC rooms |
| WebRTC Signals | Signaling events log |
| Model | Purpose |
|---|---|
| Avatar Configs | Avatar agent appearance and behavior settings |
| Guest Conversations | Pre-show guest conversation records |
| Model | Purpose |
|---|---|
| Sports | Available sports with attributes |
| Athlete Stat Entries | Recorded stats with history |
| Stat Verification Videos | Video proof for stat verification |
| Drills | Drill library entries |
| Media Tags | Key-value tags on media assets |
python manage.py createsuperuserFollow the prompts to set username, email, and password.
- Navigate to Members → Profiles
- Find the user and click to edit
- Change the Role dropdown (
host,guest,athlete,staff,admin) - Click Save
- Navigate to Authentication and Authorization → Users
- Find the user
- Click on the user, then use the password change form
- Or use the command line:
python manage.py changepassword <username>
The Django Admin supports bulk actions on most models:
- Select multiple rows using checkboxes
- Choose an action from the dropdown (delete, update role, etc.)
- Click Go
- Navigate to Members → Guest Requests
- Filter by status (Pending)
- Review the request details
- Click Approve or Reject
- Approved guests receive an email with their join link
- Navigate to Members → Shows
- Add, edit, or delete shows
- Assign guests to shows
- Set show date, time, and status
- Upload show cover images
- Navigate to Members → Blog Posts
- Create new posts with rich text content
- Set categories, tags, and featured status
- Schedule publish dates
- Moderate comments
- Navigate to Members → Site Chat FAQs
- Add new FAQ entries with question/answer pairs
- Set priority (higher checked first)
- Assign categories for organization
- FAQs are matched directly — no LLM call needed for a match
- Navigate to Members → AI Chat Sessions
- Select old or unwanted sessions
- Use bulk delete action
- This frees database space and respects user privacy
Most admin list views include a search bar at the top. Search by:
- Username or email (Users/Profiles)
- Show title (Shows)
- Blog title (Blog Posts)
- Guest name (Guest Requests)
Right sidebar filters help narrow down lists:
- Filter by role (Profiles)
- Filter by status (Guest Requests, Shows)
- Filter by date (Blog Posts, Shows)
- Filter by category (Blog Posts)
Customize which columns appear by clicking the column headers. Most lists support sorting.
Some models (like Profiles) include inline editing for related models — you can edit blog comments directly on the blog post page, or edit drill details inline.
The admin interface requires CSS and JavaScript files. After deploying, always run:
python manage.py collectstatic --noinputThis collects Django Admin static files into your STATIC_ROOT directory. If the admin looks unstyled (no CSS), you forgot this step.
- Changed
ADMIN_URLfrom the defaultadmin/ - Set
ADMIN_IP_WHITELISTto your IP(s) - Created admin user with strong password
-
DEBUG=Falsein production - Admin is only accessible over HTTPS
- Ran
python manage.py collectstatic --noinput - Tested admin access from a whitelisted IP
- Verified admin is blocked from non-whitelisted IPs
- Deployment — Full production deployment with Nginx + SSL
- Troubleshooting & FAQ — Common admin issues and solutions
← Back to Wiki Home