Rebrand base.html

Learn to customize the base.html file which is the template for all pages in html.

We'll cover the following...

Rebranding base.html

You are going to learn how to rebrand the base.html file and use the site layout of the template SB ADMIN.

First, you are going to deal with static assets such as CSS, javascript, etcetera. In your sample_app directory, you will create a static/admin folder.

mkdir sample_app/static
mkdir sample_app/static/admin

Next, you will copy all the directories from SB ADMIN of the downloaded templates in your new static/admin directory:

Then you will modify your settings.py to define STATIC_ROOT

STATIC_ROOT = 'static'

After this, you will launch a collectstatic command.

python manage.py collectstatic

At this stage, you will have two folders. Your custom sample_app/static/admin/ will contain the assets of the downloaded SB ADMIN template and your /static/ folder in your main directory which will contain the default Django admin assets.

The difficult part ...