Simple Django User Sign Up

Basic sign up user with login-logout apps with bootstrap template.

Apps Design

Using UserCreationForm, official docs here.

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

Step 2: Create Django Apps
Create apps: python startapp myapp
Add myapp to INSTALLED_APPS in myproject/

INSTALLED_APPS in myproject/

Step 3: Set up Templates Folder
Create folder templates in myapp

Add template directory in TEMPLATES parameter in myproject/

TEMPLATES in myproject/

Step 4: Create HTML Files in myapp/templates Folder
Create bootstrap base, create myapp/templates/base.html CDN Bootstrap.


Create signup html, create myapp/templates/signup.html


Create login html, create myapp/templates/login.html


Create logout html, create myapp/templates/logout.html


Create secure html, create myapp/templates/secure.html


Step 5: Create Function Based View in myapp/
Update myapp/ Add Function Based View method.
For secure page, add login_required annotation.


Step 6: Setup URLs in myapp and myproject Folder
Create myapp/


Update myproject/


Step 7: Setup Login URL and Login Redirect Page
Add in myproject/


Step 8: Run Server and Testing
Run Server: python runserver

Try login with registered user,



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