How to reference allauth user as foreign key in Django

Viewed 592

If I use normal user provided django default, my model will be like this.

from django.db import models
from django.contrib.auth.models import Users

class Photo(models.Model):
    photographer=models.ForeignKey(User, on_delete=models.CASCADE, related_name='user') # 5
    # other fields

If I want to implement allauth, what should I have to pass for the first argument in line#5, instead of User?

1 Answers

Django-allauth still uses the User model from django's auth, so you don't have to change anything. Unless you've extended a custom user model.

Related