Skip to content

Embeddable text

Sigurd Tullander requested to merge embeddable_text into main

Closes #194 (closed).

Implements a generic system for admin-editable texts that can be used by any app that wants a piece of text that is easy to update.

The system is also taken in use by the buttonpdfgenerator.

The use of get_or_create in the template tag is definitely debatable, since it's not really clean, but I think it's clean enough and it is a very simple and powerful way to automatically set up the embeddable texts that are required by an app with the correct name.

Another thing I want your opinion about is; should we use english snake_case, nynorsk snake_case or straight up nynorsk for the EmbeddableText.name fields? This convention should be documented on the wiki.

Also, is it better to move this functionality to its own app? (perhaps a rethorical question, but I want to here your thought to be sure before I refactor it)

Edited by Sigurd Tullander

Merge request reports