Admin Panel

The Django admin interface provides a powerful dashboard to manage your application's data. Before deploying to production, follow these critical setup steps to ensure secure access and configuration.

 

django admin panel

Django Admin Panel Interface

Create a superuser account

A superuser account provides full administrative access to your application through Django's admin interface. This account has unlimited permissions to manage all data, users, and features of your application.

 

Enter the command below and follow the prompts to set up your admin email and password.

# Terminal
python manage.py createsuperuser

Access to the Admin Panel

By default, Django's admin panel is accessible at: http://127.0.0.1:8000/admin/ 

 

Always change the default admin URL in production:

  • use a non-obvious path
  • consider including random characters
  • avoid common terms like 'admin', 'backend', 'manage'
# saas > urls.py

urlpatterns = [
    # /!\ Change the admin URL to a custom one
    path('change-this-admin-path/', admin.site.urls),]
]

Customize the admin interface

The boilerplate comes with pre-configured admin interfaces for all models through their respective admin.py files. You can customize how your models appear and behave in the admin interface by modifying these files. Each app's admin.py file controls the display, filtering, search, and editing capabilities for its models in the Django admin panel.

saas/
├── app_customer/
│   └── admin.py          # Customer related models admin setup  
├── app_features/
│   └── admin.py          # Features related models admin setup  
├── app_main/
│   └── admin.py          # Main app models admin setup
├── app_subscriber/
│   └── admin.py          # Subscription models admin setup
└── user/
   └── admin.py          # User model admin setup

 

Official Django Documentation: Django Admin site