Skip to content

Commit 20d649f

Browse files
committed
Update for RDMO 2.3.0
1 parent d797308 commit 20d649f

File tree

11 files changed

+207
-29
lines changed

11 files changed

+207
-29
lines changed

docs/configuration/authentication/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ RDMO has three main modes for Authentication:
88

99
If none of the modes is enabled, only a very basic login will be available and users need to be created using the Django Admin Interface.
1010

11+
A custom middleware can be enabled to force users to aknowlege the [Terms of use](terms-of-use-middleware) of the instance.
12+
1113
---
1214

1315
```{toctree}
@@ -16,4 +18,5 @@ If none of the modes is enabled, only a very basic login will be available and u
1618
allauth
1719
ldap
1820
shibboleth
21+
terms-of-use-middleware
1922
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Terms of use middleware
2+
3+
```{note}
4+
This feature was introduced in RDMO 2.3.
5+
```
6+
7+
A custom middleware can be enabled to force users to aknowlege the Terms of Use (TOS) of the instance (which themselves are configured as [part of the theme](/themes/index.html#terms-of-use).
8+
9+
To enable the middleware use the following in your `config/settings/local.py`:
10+
11+
```python
12+
MIDDLEWARE.append('rdmo.accounts.middleware.TermsAndConditionsRedirectMiddleware')
13+
```
14+
15+
If enabled, all users, regardless of the used authentication method, are redirected to the terms of use page when they first log in. Only if they accept, they are allowed to use the instance.
16+
17+
If you update the terms of use, you can use, e.g.:
18+
19+
```python
20+
ACCOUNT_TERMS_OF_USE_DATE = '2025-04-15'
21+
```
22+
23+
to force all users which accepted the TOS before this date to accept them again.

docs/configuration/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ authentication/index
2020
export-formats
2121
cache
2222
logging
23+
openapi
2324
projects
2425
multisite
2526
```

docs/configuration/openapi.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# OpenAPI, Swagger and Redoc
2+
3+
```{note}
4+
This feature was introduced in RDMO 2.3.
5+
```
6+
7+
Optionally, RDMO can be configured to use [drf-spectacular](https://drf-spectacular.readthedocs.io/en/latest/readme.html), which provides:
8+
9+
* the automatic generation of an [OpenAPI 3.0 specification](https://www.openapis.org) at `/api/v1/schema/`
10+
* a browsable [Swagger](https://swagger.io) interface at `/api/v1/swagger/`
11+
* a browsable [Redoc](https://redocly.com) API documentation at `/api/v1/redoc/`
12+
13+
To enable those features install the `openapi` dependency group together with RDMO:
14+
15+
```bash
16+
pip install rdmo[openapi]
17+
```
18+
19+
Then add the following to your `config/settings/local.py:
20+
21+
```python
22+
INSTALLED_APPS += [
23+
'drf_spectacular',
24+
'drf_spectacular_sidecar'
25+
]
26+
27+
REST_FRAMEWORK.update({
28+
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
29+
'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.URLPathVersioning',
30+
'DEFAULT_VERSION': 'v1',
31+
'ALLOWED_VERSIONS': ('v1', ),
32+
})
33+
```
34+
35+
and the following to your `config/urls.py`:
36+
37+
```python
38+
urlpatterns = [
39+
path('', home, name='home'),
40+
path('about/', about, name='about'),
41+
path('api/', api, name='api'),
42+
43+
path('', include('rdmo.core.urls')),
44+
path('api/v1/', include('rdmo.core.urls.v1')),
45+
path('api/v1/', include('rdmo.core.urls.v1.openapi')), # <-- this line
46+
47+
path('admin/', admin.site.urls),
48+
]
49+
```

docs/configuration/projects.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
# Project settings
22

3-
## Auto-Save
3+
## Project tasks and views
44

5-
By default, users need to save their input in the interview explicitly using the save button. This behavior can be changed adding the `PROJECT_QUESTIONS_AUTOSAVE` entry to your configuration.
5+
Before RDMO 1.6, tasks and views were completely hidden from the user, if no tasks or views have been configured. Now, interface elements are displayed regardless. If you don't need tasks and/or views in your RDMO instance, they can be hidden using:
66

77
```python
8-
PROJECT_QUESTIONS_AUTOSAVE = True
8+
PROJECT_ISSUES = False
9+
PROJECT_VIEWS = False
910
```
1011

11-
With this setting, all input **except typing into text or text area fields** will be saved on the server immediately. This comprises, e.g. using the Navigation, radio buttons, check boxes.
12+
## Automatically synchronize tasks and views to projects
1213

13-
## Project tasks and views
14+
```{note}
15+
This feature was introduced in RDMO 2.3.
16+
```
1417

15-
Before RDMO 1.6, tasks and views were completely hidden from the user, if no tasks or views have been configured. Now, interface elements are displayed regardless. If you don't need tasks and/or views in your RDMO instance, they can be hidden using:
18+
Tasks and views can be configured to "belong" to specific catalogs. By default, this information is only used to filter the tasks and views for newly created projects. Afterwards, users can asign any task or view to any project.
19+
20+
Optionally, RDMO can be configured to automatically update projects when the catalog for a task or view is changed. This can be done independently for tasks and views:
1621

1722
```python
18-
PROJECT_ISSUES = False
19-
PROJECT_VIEWS = False
23+
PROJECT_TASKS_SYNC = True
24+
PROJECT_VIEWS_SYNC = True
2025
```
2126

27+
If these settings are set, the user interface elements for changing the tasks or views in a project are hidden.
28+
2229
## Sending tasks
2330

2431
Sending tasks from projects is described [in the section on email](/configuration/email.md#send-tasks-via-email).
@@ -31,6 +38,18 @@ With RDMO 1.5, projects can be nested. If this feature is not desired, the UI el
3138
NESTED_PROJECTS = False
3239
```
3340

41+
## Visible projects
42+
43+
In order to make projects available to all users (e.g. to be used as a template), project can be made visible
44+
by `site_managers` or Admins (see [Roles](/administration/users.md#roles)). This feature can be enabled using:
45+
46+
```python
47+
PROJECT_VISIBILITY = True
48+
```
49+
50+
Project visibility can be restricted to certain sites in a [Multisite Setup](/configuration/multisite.md) (i.e. when `MULTISITE = True`) or
51+
groups (when `GROUP = True`).
52+
3453
## Project file quota
3554

3655
The size of files which can be uploaded for a project is limited (default: 10 MB). This can setting can be changed, e.g.:
@@ -57,3 +76,19 @@ PROJECT_CREATE_GROUPS = [
5776
'internal'
5877
]
5978
```
79+
80+
## Project contact form
81+
82+
```{note}
83+
This feature was introduced in RDMO 2.3.
84+
```
85+
86+
Contact forms for each question in the interview can be used to allow the users to contact the management of the RDMO instance via email. To enable this feature use:
87+
88+
```
89+
PROJECT_CONTACT = True
90+
PROJECT_CONTACT_RECIPIENTS = [
91+
('[email protected]', 'Manni Manager <[email protected]>'),
92+
...
93+
]
94+
```

docs/development/i18n.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
11
Internationalisation
22
====================
33

4-
To update the locale files, change to the `rdmo` directory **inside** the `rdmo` repository and run:
4+
Run
5+
6+
```bash
7+
rdmo-admin messages make
8+
```
9+
10+
to create/update the `.po` files for the translation. Then run
11+
12+
```bash
13+
rdmo-admin poedit de
14+
rdmo-admin poedit fr
15+
...
16+
rdmo-admin poedit de --js
17+
```
18+
19+
to open the different `.po` files in [Poedit](https://poedit.net) and update the tranlations (manually).
20+
21+
Afterwards run
22+
23+
```bash
24+
rdmo-admin messages compile
25+
```
26+
27+
to create/update the corresponding `.mo` files.
28+
29+
Without `rdmo-admin` you need to change to the `rdmo` directory **inside** the `rdmo` repository and run:
530

631
```bash
732
django-admin makemessages -a
833
django-admin makemessages -a -d djangojs
934
```
1035

11-
Then, edit the `.po` files in the `locale` directory. This can be done using [Poedit](https://poedit.net), e.g.
36+
To create the `.po` files. Then, edit the files using, e.g.:
1237

1338
```bash
1439
poedit locale/de/LC_MESSAGES/django.po
@@ -21,4 +46,4 @@ Afterwards run
2146
django-admin compilemessages
2247
```
2348

24-
to compile the `.po` file to a `.mo` file.
49+
to compile the `.po` file to `.mo` files.

docs/development/releases.md

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
Releases
22
========
33

4-
0) Install [build](https://github.com/pypa/build) and [twine](https://github.com/pypa/twine): `python -m pip install build twine`
4+
0) Install `rdmo[dev]`.
55

66
1) Ensure tests are passing.
77

8-
2) Update version in `rdmo/__init__.py`.
8+
3) Check that version in `rdmo/__init__.py`, `CHANGELOG.md` and *all the other things* are up to date.
99

10-
3) Build production front-end files
10+
4) Build production front-end files, source-distribution and wheel using:
1111

12+
```python
13+
rdmo-admin build
1214
```
13-
nvm use
14-
npm install
15-
npm run build:prod
16-
```
17-
18-
4) Build source-distribution and wheel with `build`:
1915

20-
```
21-
python -m build
22-
```
16+
which calls `npm ci` and `npm run build:prod` and `python -m build`
2317

2418
5) Upload with `twine` to Test PyPI:
2519

@@ -37,8 +31,4 @@ Releases
3731

3832
8) Check https://pypi.org/project/rdmo/.
3933

40-
9) Commit local changes.
41-
42-
10) Push changes.
43-
44-
11) Create release on [GitHub](https://github.com/rdmorganiser/rdmo/releases).
34+
9) Create release on [GitHub](https://github.com/rdmorganiser/rdmo/releases).

docs/development/setup.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] = (
126126
Then, initialize the application, using:
127127

128128
```bash
129-
python manage.py download_vendor_files # download front-end vendor files
130129
python manage.py migrate # initializes the database
131130
python manage.py setup_groups # optional: create groups with different permissions
132131
```
@@ -202,6 +201,14 @@ npm install # to install the many, many javascript dependencies
202201
npm run watch # to build the front-end and rebuild it when changing the source
203202
```
204203

204+
If you don't want to source the `nvm.sh` enviroment in every terminal session, you can use the shortcuts`rdmo-admin`:
205+
206+
```bash
207+
rdmo-admin npm install
208+
rdmo-admin npm run watch
209+
...
210+
```
211+
205212
Now the development server can be started (in a different terminal) using:
206213

207214
```

docs/installation/setup.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ python manage.py createsuperuser # creates the admin user
2929

3030
## Third party vendor files
3131

32+
```{warning}
33+
This step is only needed for older RDMO versions **before** RDMO 2.3.
34+
```
35+
3236
By default third party vendor files (like jQuery or Bootstrap javascript's) are retrieved from the content delivery networks that they are hosted on. If you would like to avoid third party requests you could host them yourself. This can be achieved easily with two simple steps.
3337

3438
1. download the vendor files from the cdns by running the provided script

docs/plugins/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,22 @@ PROJECT_EXPORTS = [
7575
]
7676
```
7777

78+
## Snapshot export plugins
79+
80+
```{note}
81+
This feature was introduced in RDMO 2.3.
82+
```
83+
84+
Custom snapshot exports are created very similar to project exports. They are inherited from `rdmo.projects.export.Export` as well, the difference is that `self.snapshot` is set, but `self.project` is not. For an example, please refer to `rdmo.projects.exports.RDMOXMLExport`.
85+
86+
The export plugin needs to be added to the `PROJECT_SNAPSHOT_EXPORTS` in `config/settings/local.py`, e.g.:
87+
88+
```python
89+
PROJECT_EXPORTS = [
90+
('xml', _('as RDMO XML'), 'rdmo.projects.exports.RDMOXMLExport'),
91+
]
92+
```
93+
7894
## Project import plugins
7995

8096
Similarly, custom project imports can be created implementing a class inheriting from `rdmo.projects.imports.Import`. They can be used to import project data from files which are uploaded by the user.

0 commit comments

Comments
 (0)