# Commandline
# create virtual env
python3 -m venv myvenv
# work in virtual envronmen
# cd into dir
# run this
myvenv\Scripts\activate
# install dependacies
python -m pip install -r requirements.txt
django-admin startproject appName
migrate
python manage.py migrate
create user
python manage.py createsuperuser
username: admin
email: admin@thirdeye.com
pass: secret19
python manage.py runserver
from django.contrib.auth.models import AbstractBaseUser
from django.db import models
class CustomUser(AbstractUser):
username = None
email = models.EmailField(_('email address'), unique=True)
USERNAME_FIELD = 'email'
REQUIRED_FIELDS = []
objects = CustomUserManager()
def __str__(self):
return self.email