Monday, April 29, 2019

about abstract user

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, blank=True, related_name='user_favourite')        def __unicode__(self):          return self.tweet


1) in above user model has passed AbbstractUser so what does it mean
2) also in follower field of User model ManyToManyField has setting.AUTH_USER_MODEL what does it mean

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4574d8ae-b0eb-4c4d-8f77-90b3be0a54ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment