Hi,
This is not a good way of building a Django user.
To your questions:
1. AbstractUser is a class that implements some of the methods / properties
that Django expects on a User model. See here :
https://docs.djangoproject.com/en/2.2/topics/auth/customizing/#substituting-a-custom-user-model
The
class User(AbstractUser):
tweet = models.ManyToManyField(Tweet, blank=True)
follower = models.ManyToManyField(settings.AUTH_USER_MODEL, blank=True)
pass
class Tweet(models.Model):
tweet = models.TextField()
favourite = models.ManyToManyField(settings.AUTH_USER_MODEL,
2 matches
Mail list logo