Search⌘ K
AI Features

Customising the Admin Template

Explore how to customize Django admin templates by setting the templates directory, overriding global and model-specific templates, and adding personalized content. Understand directory structures and learn how to make changes visible in the admin interface for improved design customization.

We'll cover the following...

Customising admin templates

To override or replace Django admin templates, you first need to configure your project to tell Django where to find your custom templates. To do so, you need to define the path in the DIRS option of the TEMPLATES parameter, which is located in helloworld/settings.py.

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
            BASE_DIR,
            os.path.join(BASE_DIR, 'templates')
        ],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
               
...