change django administration title

  1. Open the Django project in a code editor.

  2. Navigate to the application directory where the admin.py file is located.

  3. Import the AdminSite class from django.contrib.admin.

from django.contrib.admin import AdminSite
  1. Create a custom admin class that inherits from AdminSite.
class CustomAdminSite(AdminSite):
    site_header = 'Your Custom Title'

Replace 'Your Custom Title' with the desired title for the Django administration.

  1. Instantiate the custom admin site.
custom_admin_site = CustomAdminSite(name='custom_admin')

Replace 'custom_admin' with the desired name for the custom admin site.

  1. Update the urls.py file in the same application directory.
from django.contrib import admin

urlpatterns = [
    # Replace the default admin.site.urls with the custom admin site
    path('admin/', custom_admin_site.urls),
    # Add other URL patterns as needed
]
  1. Save the changes to the admin.py and urls.py files.

  2. Run the Django development server to apply the changes.

python manage.py runserver

Visit the admin URL in your browser, and you should see the updated title in the Django administration.