No description
  • Python 77.8%
  • HTML 19%
  • JavaScript 2%
  • Mako 1.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-08 11:49:29 +01:00
src chore: release splent_io/splent_feature_about to v0.4.1 2026-11-08 11:49:29 +01:00
.gitignore feat: about pages for an organisation site, with admin CRUD and DiversoLab seed content 2026-08-12 16:37:48 +02:00
COPYING License under LGPL-3.0-or-later 2026-10-11 11:47:20 +02:00
COPYING.LESSER License under LGPL-3.0-or-later 2026-10-11 11:47:20 +02:00
MANIFEST.in chore: ship no seed content, a site's own story belongs to the product 2026-08-13 11:46:58 +02:00
pyproject.toml chore: release splent_io/splent_feature_about to v0.4.1 2026-11-08 11:49:29 +01:00
README.md fix: clean a section's stored HTML and keep its title out of confirm 2026-10-21 05:42:56 +02:00

splent_feature_about

The about feature of a SPLENT product line.

A SPLENT feature is a Python package that a product composes with others: its models, routes, services, templates and hooks are registered when the product starts. What this feature provides and requires is listed in the [tool.splent.contract] section of pyproject.toml, which splent feature:contract --write keeps in sync with the source.

What it does

The About page of the organisation. /about shows the published sections in their order, each one with an anchor named after its slug. A section that is not published stays out of the page. A section's content is stored HTML, and the page draws it through the framework's rich_text filter, which keeps the formatting and drops scripts, event handlers and javascript: links.

The panel manages the sections at /admin/about, where they are added, edited, moved up or down and deleted. ABOUT_NAV_LABEL renames the main navigation entry, which reads "About" when it is left empty.

Access

The screens under /admin/about open for the accounts whose role is admin or staff, the same pair the admin dashboard lets in. Any other signed-in account gets 403 and does not see the About link in the sidebar, and an anonymous visitor is sent to log in. The /about page stays open to everyone, signed in or not.

There is no setting for these roles, and a refinement cannot replace the views that check them, because it may add routes to this feature but never replace one of its own. Another feature can decide for these screens with an access policy registered for the prefix about.admin (register_access_policy, splent_framework 1.20.0). The framework asks the policy before the roles. It answers True to let an account in, False to refuse it, or None to leave the decision to the roles, and the sidebar link follows the same answer. That is the way to let a group of accounts manage only this section, for example the people who write the About page, without giving them a panel role. See Access control.

Without such a feature, give the person's account the staff role. Staff opens every panel screen that asks for PANEL_ROLES, not only this one, so a person who should manage nothing but the About page needs a policy instead.

splent feature:auth set-role someone@example.com staff

Use it in a product

splent feature:add splent_feature_about

Develop

splent feature:test splent_feature_about
splent feature:contract splent_feature_about

Release

splent feature:release splent_feature_about --dry-run --bump patch
splent feature:release splent_feature_about

The first command rehearses the release and changes nothing. The second publishes it to the git forge and to PyPI, and a PyPI version is permanent.