~homeworkprod/byceps

ref: 342e5296ae417372e544ce931b442e98301c17a1 byceps/byceps/blueprints/site/news/views.py -rw-r--r-- 2.1 KiB
39d7af84 — Jochen Kupperschmidt 7 months ago
Use `has_current_user_permission` in code
e5d69bca — Jochen Kupperschmidt 7 months ago
Do not explicitly pass current user to `_may_view_drafts()`, rename function
0f1c2941 — Jochen Kupperschmidt 8 months ago
Rename request-scope variable `current_user` to `user`
1b14010f — Jochen Kupperschmidt 8 months ago
Introduce `byceps.util.authorization.register_permission_enum` to be used in blueprint views
386eb13e — Jochen Kupperschmidt 8 months ago
Move permission registry module out of blueprints package
3d7b49f0 — Jochen Kupperschmidt 8 months ago
Update copyright notes for 2021
4ca65ed7 — Jochen Kupperschmidt 8 months ago
Move rendering of news item body to service
0b51dd42 — Jochen Kupperschmidt 10 months ago
Refer to license as "Revised BSD" to clarify that it is not customized

The common name "Modified BSD License" for the 3-clause BSD license can
be misleading as it might suggest it is a BSD license customized by the
project author.

To avoid this, refer to the license under one of its other names
instead.
97cfc473 — Jochen Kupperschmidt 1 year, 1 month ago
Move authorization blueprint into `common` subpackage
37e022c6 — Jochen Kupperschmidt 1 year, 1 month ago
Move news blueprint into `site` subpackage
e7160f27 — Jochen Kupperschmidt 1 year, 3 months ago
Obtain current site's news channel ID directly from site, not site settings
ba4f33d6 — Jochen Kupperschmidt 1 year, 6 months ago
Clarify service name on import
4ef91f31 — Jochen Kupperschmidt 1 year, 6 months ago
Move news image HTML rendering to separate service
95635235 — Jochen Kupperschmidt 1 year, 6 months ago
Pass image list to function that renders news item body to save database queries
0a5af42d — Jochen Kupperschmidt 1 year, 6 months ago
Add missing channel ID argument to render public news item body
37a7d8f3 — Jochen Kupperschmidt 1 year, 7 months ago
Handle errors on news item body rendering in public views
cbe76f8b — Jochen Kupperschmidt 1 year, 7 months ago
Render news item body in view function, not in template

This provides a chance to add clean handling of errors that occur while
rendering the body.

Replacing the raw body with the rendered one is not very clean, but
somewhat nicely saves from introducing a custom sub-dataclass with an
additional field.
ba269fc9 — Jochen Kupperschmidt 1 year, 7 months ago
Move news item body rendering out of (database) model, make it explicit
428eab3e — Jochen Kupperschmidt 1 year, 8 months ago
Update copyright notes for 2020
b4b8423a — Jochen Kupperschmidt 1 year, 10 months ago
Obtain number of news items to show per page from site settings instead of configuration file
Next