Support HTML in consent requirement descriptions

Review Request #9965 — Created May 22, 2018 and updated — Latest diff uploaded

Information

Djblets
release-1.0.x
312d6ff...

Reviewers

Instead of juggling mark_safe vs mark_safe_lazy and ugettext vs
ugettext_lazy and string interpolation, we now have a flag on the
BaseConsentRequirement that indicates whether or not the description
fields are HTML (in which case they will be rendered as-is and marked
safe) or text (in which case they will be wrapped with <p> tags). This
allows the rendering code (which is handled by a new
render_{field}_description method that can be overridden in a pinch to
specialize its behaviour) instead of naively by the template.

Used this with https://reviews.reviewboard.org/r/9967/

    Loading...