permanent_address_city = models.ForeignKey(Address,on_delete=models.CASCADE,related_name = 'permanent_address_city', null=True, blank=True)
phone_number = models.PositiveIntegerField(, null=True, blank=True)
gender = models.CharField(max_length = 5,choices = GENDER_CHOICES, null=True, blank=True)
profile_pic = models.ImageField(upload_to='profile_pic',default = 'default.jpg', null=True, blank=True)
created_at = models.DateField(auto_now_add = True, null=True, blank=True)
updated_at = models.DateField(auto_now = True, null=True, blank=True)```
use signal within your models.py to create a blank profile every time a User object is created:
```
from django.db.models.signals import post_save
from django.dispatch import receiver
@receiver(post_save, sender=settings.AUTH_USER_MODEL)
def create_user_profile(sender, instance, created, **kwargs):
if created:
UserProfile.objects.create(user=instance)
```
Now you can create an Update profile view to update the user based on the fields he has placed in the instance using your serialiser. You can have a separate view to create an address object. The User Profile update view can take the ID of an address and attach that address to the user.