DEV Community

Vicente G. Reyes
Vicente G. Reyes

Posted on

1 1

Profile not creating when creating a User with Django

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,

Top comments (0)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay