Youtube video for Customize User Model in Python Django
models.py
from django.db import models
from django.contrib.auth.models import AbstractUser
class CustomUser(AbstractUser):
USER = (
(1,'HOD'),
(2,'STAFF'),
(3,'STUDENT'),
)
user_type = models.CharField(choices=USER,max_length=50,default=1)
profile_pic = models.ImageField(upload_to='media/profile_pic')
how to install pillow module
pip install pillow
settings.py
AUTH_USER_MODEL = 'app.CustomUser'
admin.py
from django.contrib import admin
from .models import *
from django.contrib.auth.admin import UserAdmin
class UserModel(UserAdmin):
list_display = ['username','user_type']
admin.site.register(CustomUser,UserModel)
Playlist Links
Student Management System Project :- https://www.youtube.com/playlist?list=PLTV1jAY3nKHPvKZGpjxoIujxW05MTtEL6
Electronics Shopping System Project :- https://youtube.com/playlist?list=PLTV1jAY3nKHP6EL8afMpovb_o_-wpmesw
Ecommerce Website with Multiple Vendors :- https://youtube.com/playlist?list=PLTV1jAY3nKHOqKs4uDaBOdqL3jKK7fjSo
Blog Project using Python Django :- https://youtube.com/playlist?list=PLTV1jAY3nKHOj0d8mN8-WQVCiZtuLGjz-
Social Media Links
You Tube Channel :- https://www.youtube.com/channel/UCCZG...
Instagram :- https://www.instagram.com/coding_ex/
Facebook Page :- https://www.facebook.com/Web-developm...
Quora link :- https://codingextech.quora.com/
Tags
#pythonlife #pythonprojects #pythonlanguage #pythonsnake #pythontutorial #pythonbaba #pythoninhindi #python3 #pythonbasics #pythoncourse #pythonclass11cbse #pythonclassattenkasi #pythoncode #pythoncoding #pythonchatbot #pythoncowboy #pythondash #pythondatasciencetutorial #pythondjango #pythonedureka #pythonessentials #pythonfrieght #pythonforbegginers #pythonforbeginners #pythonfordatascience #pythonfullcourse #pythonfullstackdevelopercourseinbangalore #pythonfullstackdevelopercourseinhyderabad #pythonfundamentals #pythongui #pythongraphics #pythonguitutorial #pythonhunting #pythonintelugu #pythonimageprocessing #pythonintree #pythoninterview #pythoninonevideo #pythoninterviewquestions #pythonintro #pythonjarvis #pythonkannada #pythonloginsystem #pythonlogintkinter #pythonlanguagefordsssbexam #pythonmockinterview #pythonmachinelearning #pythonmcq #pythonmalayalam #pythononlinetraining #pythonprojectusingsqlconnectivity #pythonprogrammingforbeginners #pythonprogrammingfullcourse #pythonprojectideas #pythonprogramming #pythonprograms #pythonprogramsintamil #pythonregex #pythonrevisiontour #pythonrightnow