Vicente G. Reyes
Posted on August 15, 2023
I'm using DRF for my project and I need help in automatically creating a Profile instance for a User model when a User is created. My signals is:
from django.db.models.signals import post_save
from django.conf import settings
from django.contrib.auth import get_user_model
from .models import Profile
User = get_user_model()
def create_user_profile(sender, instance,
…
💖 💪 🙅 🚩
Vicente G. Reyes
Posted on August 15, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.