Open abitrolly opened 5 years ago
Yeah, it's a little awkward to have HTML-aware code in the model. I think it would probably be cleaner if it just had a nice rendering of a human readable title and then have the template code fix the & character as needed with a filter.
It will be cleaner if model just exposed all the names, and allow the actual formatting to be done in the template. For example, it is missing packages' array with names such as
qesteidutil` that the update instance covers. Can updates cover separate issues?
There is also a separate issue that it is impossible to trace to model from the template. There is no explicit link in the source code and I still don't understand how it ends up being used in the template.
I revisited my failed attempt https://github.com/fedora-infra/bodhi/pull/2155 to add link to more information about updated package such as https://apps.fedoraproject.org/packages/qesteidutil to update page and after grepping the source found that update model contains templating logic.
https://github.com/fedora-infra/bodhi/blob/a2f925d7aedbc9057634ff4129f129f45dfe7b54/bodhi/server/models.py#L2372