Metadata-Version: 2.4
Name: splent_feature_research_projects
Version: 0.4.0
License-Expression: LGPL-3.0-or-later
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: COPYING
License-File: COPYING.LESSER
Requires-Dist: splent_framework>=1.20.0
Dynamic: license-file

# splent_feature_research_projects

The `research_projects` feature of a [SPLENT](https://splent.io) 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

A refinement of `projects` for funded research. It adds to the `Project`
model the acronym, the principal investigator, the funding agency, the
programme, the reference, the budget, the start and end dates, the partners
and the group's role, and it overrides the public list and detail pages and
the panel's list and form of projects so they show and edit those fields.
The routes and the admin screens stay those of `projects`.

The description is stored HTML, and the detail page draws it through the
framework's `rich_text` filter, which keeps the formatting and drops
scripts, event handlers and `javascript:` links.

Every page it overrides draws the project's stored link and image through
the framework's `safe_url` filter, so an address that is not `http`,
`https`, `mailto` or a path on the site renders as an empty `href` or
`src` instead of running. The `projects` form refuses such an address, and
the form this feature ships then shows what was typed, research fields
included, with the messages the refusal flashed.

## Use it in a product

```bash
splent feature:add splent_feature_research_projects
```

## Develop

```bash
splent feature:test splent_feature_research_projects
splent feature:contract splent_feature_research_projects
```

## Release

```bash
splent feature:release splent_feature_research_projects --dry-run --bump patch
splent feature:release splent_feature_research_projects
```

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.
