Closed simonw closed 2 months ago
Add is_draft boolean field to BaseModel and update views, templates, and feeds to handle draft items.
is_draft
BaseModel
Model Changes:
blog/models.py
False
View Changes:
index
blog/views.py
True
archive_item
Feed Changes:
items
Entries
Blogmarks
Everything
blog/feeds.py
Template Changes:
templates/entry.html
templates/blogmark.html
templates/quotation.html
Test Changes:
blog/tests.py
For more details, open the Copilot Workspace session.
Add
is_draft
boolean field toBaseModel
and update views, templates, and feeds to handle draft items.Model Changes:
is_draft
boolean field toBaseModel
inblog/models.py
, defaulted toFalse
.View Changes:
index
view inblog/views.py
to filter out items withis_draft
set toTrue
.archive_item
view inblog/views.py
to injectis_draft
variable into the template context and add a warning for draft items.Feed Changes:
items
method inEntries
,Blogmarks
, andEverything
classes inblog/feeds.py
to filter out items withis_draft
set toTrue
.Template Changes:
templates/entry.html
,templates/blogmark.html
, andtemplates/quotation.html
.Test Changes:
blog/tests.py
to verify that draft items are not displayed on the homepage, archive pages, and Atom feeds.For more details, open the Copilot Workspace session.