~homeworkprod/byceps

ref: 342e5296ae417372e544ce931b442e98301c17a1 byceps/byceps/blueprints/site/snippet/views.py -rw-r--r-- 1019 bytes
3d7b49f0 — Jochen Kupperschmidt 8 months ago
Update copyright notes for 2021
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.
4ac2adcd — Jochen Kupperschmidt 1 year, 27 days ago
Move snippet blueprint into `site` subpackage
428eab3e — Jochen Kupperschmidt 1 year, 8 months ago
Update copyright notes for 2020
d9bb2e49 — Jochen Kupperschmidt 1 year, 8 months ago
Generate and match snippet routes dynamically

The previous behavior is to register snippet routes on application
start. This has some performance advantages. But also disadvantages:
- Changes to mountpoints only come into effect after the application is
  restarted.
- These routes are global and do not allow multiple sites' routes to
  exist without affecting each other.

This change introduces a catch-all route for snippets and matches the
URL path against the current site's mountpoints (retrieved from the
database for every request). URL generation now also requires
mountpoints to be loaded from the database, but only once per request.

Resulting advantages:
- Independent site-specifc mountpoints. This paves the way to serving
  multiple sites from a single application instance.
- Changes to snippet routes become active right away, without the need
  to restart the application.
c842cee9 — Jochen Kupperschmidt 1 year, 8 months ago
Move `url_for_snippet` implementation to `byceps.blueprints.snippet.templating`

This allows to use it in that module without depending on the view module.
ee130df5 — Jochen Kupperschmidt 1 year, 8 months ago
Introduce global template function `url_for_snippet`

Use it to ease the transition to a multisite-capable snippet URL rule system.
9d9e06c6 — Jochen Kupperschmidt 1 year, 8 months ago
Move blueprint view to export snippet as JSON to API, add tests
634080d4 — Jochen Kupperschmidt 1 year, 11 months ago
Format calls according to Black
d0d41972 — Jochen Kupperschmidt 1 year, 11 months ago
Format imports according to Black
25952c51 — Jochen Kupperschmidt 2 years ago
Look up mounted snippet via endpoint suffix (and site ID) instead of snippet name
2371053c — Jochen Kupperschmidt 2 years ago
Clarify names and docstrings
c3ab153f — Jochen Kupperschmidt 2 years ago
Move snippets from party scope to site scope
09ac81e9 — Jochen Kupperschmidt 2 years ago
Pass scope instead of party ID to snippet service
1d33981d — Jochen Kupperschmidt 2 years ago
Update copyright notes for 2019
c1fa0abd — Jochen Kupperschmidt 3 years ago
Update copyright notes for 2018
e5d7558a — Jochen Kupperschmidt 3 years ago
Provide party ID on `g` thread-local
1456997a — Jochen Kupperschmidt 4 years ago
Don't raise exception if current snippet version isn't found for name
cf201ce7 — Jochen Kupperschmidt 4 years ago
Add endpoint to return the current party's snippets as JSON to be included elsewhere
1819c68b — Jochen Kupperschmidt 4 years ago
Only pass party ID instead of entity
Next