About
Blog posts with categories (public list/detail + admin CRUD)
Provides
Models
CategoryPost
Services
PostService
Routes
/admin/posts/admin/posts/<int:post_id>/delete/admin/posts/<int:post_id>/edit/admin/posts/<int:post_id>/preview/admin/posts/new/blog/blog/category/<slug>
Hooks filled
home.sectionlayout.authenticated_sidebar
Translations
enes
Commands
-
$
splent feature:post helloExample command, replace it with your own.
Run them in your workspace once the feature is installed in the selected product.
Configuration
| Setting | Default | What it does |
|---|---|---|
POST_PERMALINK |
/%Y/%m/%d/%postname%
|
The shape of a post URL. Dates come from the publication moment and %postname% from the slug. It is read for years after it is written, so a site replacing an older one sets this to whatever that one served. |
POST_INDEX_PATH |
/blog
|
Path of the public blog index. Category archives hang from it (<path>/category/<slug>). A product whose nav calls the entry "News" sets this to /news so the URL matches the label. |
POST_PAGE_SIZE |
10
|
Posts per page on the public blog index and category archives. |
POST_HOME_COUNT |
3
|
Recent posts the home "Latest posts" section shows. 0 hides the section. |
POST_NAV_LABEL |
Blog
|
Label of the feature's entry in the public main navigation. A product may prefer "News" or a translated word; pair it with POST_INDEX_PATH. |
These are the defaults. A product changes them in its own pyproject.toml, under [tool.splent.config], or in .env.deploy in production.
Dependencies
Used by
Collisions
-
Category(model) also provided by courses
In product lines
-
cms_spl
Optional in this line
Needs
authmedia
Extension points
Hook slots
post.comments
Templates
post/admin/form.htmlpost/admin/list.htmlpost/detail.htmlpost/home_latest.htmlpost/index.htmlpost/list.html
Services
PostService
Models
CategoryPost
Routes
A refinement can add routes to its blueprint
Other features fill its hook slots. A refinement can override its templates and services or extend its models without forking it.
Compatibility
Python
>=3.13
SPLENT framework
>=1.30.0