Coming back to our project, we will need two models in the initial phase: the
user model and the
tweet model. The
user model will be used for storing the basic user details of the users that have accounts in our project.
Then comes the
tweet model, which will store data related to the tweet, such as the tweet text, the user who has created that tweet, and other important details such as the timestamps of the tweet posted, and so on.
To list the tweets of a user, it will be better if we create a separate user application specific to all the users of our project. Our user models will be created by extending Django's
AbstractBaseUser user model class.
Changing the actual
user class in your Django source ...