Skip to content

Instantly share code, notes, and snippets.

View Saalim95's full-sized avatar

Saalim Khan Saalim95

View GitHub Profile
@Saalim95
Saalim95 / models.py
Created July 29, 2018 10:39
Implementation of Signal module to create custom User model in Django Web Framework
from django.db import models
from django.contrib.auth.models import User
from django.dispatch import receiver
from django.db.models.signals import post_save
class Profile(models.Model):
user = models.OneToOneField(
User, related_name='profile', on_delete=models.CASCADE)