Django Admin Custom Login Page

Rendering django admin login page with customized html file (with bootstrap).

Step 1: Preparation, Create Django Project, Initial Migration
Install virtualenv: pip install virtualenv
Create virtualenv: virtualenv venv
Start virtualenv: venv/Scripts/activate
Install Django in virtualenv: pip install django
Create Django: django-admin startproject myproject
Go to myproject folder: cd myproject
Initial Migration: python migrate
Create superuser: python superuser

Step 2: Preparing Template and HTML files
Create templates folder, base.html, login.html


Step 3: Setup
Add template folder in TEMPLATES parameter in myproject/

Add parameter LOGIN_REDIRECT_URL in myproject/

Step 4: Update

Step 5: Run server
Run server: python runserver



Software Engineer, Indonesia

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store