This section is to provide a high level overview of the project. You don't need to have a perfect mental model of the project, but knowing how things generally fit together will be helpful.
There are only a few models, but they are inter-related. They are Post, Category, User, Subscription, SubscriptionNotification.
Posthas a M2M (many to many) toCategory.Posthas a FK (foreign key / 1 to many) toUser.Userhas a nullable 1:1 (one to one) toSubscription.Subscriptionhas a M2M toCategorySubscriptionNotificationhas a FK toSubscription.SubscriptionNotificationhas a FK toPost.
erDiagram
Post }o--o{ Category : "0..* to 0..*"
Post ||--o{ User : "1 to 0..*"
User ||--o| Subscription : "1 to 0..1"
Subscription }o--o{ Category : "0..* to 0..*"
SubscriptionNotification ||--|{ Subscription : "1 to 1..*"
SubscriptionNotification ||--|{ Post : "1 to 1..*"
The Post model is worth discussing briefly as it's the center of the project. The fields to be aware of are:
is_public- Controls whether an unauthenticated user can view the post on the site.is_published- Signals that a post is no longer a draft and should be accessible to non-staff users.publish_at- Allows the author to schedule a post to be published in the future.publish_date- This is a calculated property that identifies the Post's publish datetime. It returnspublish_atif set otherwisecreated.