I want to add a link to terms and conditions in help_text
property of django model_field, basically I would like to write code like:
class UserRegisterData(models.Model):
accepted_terms = models.BooleanField(
...
help_text = u""Terms and conditions are avilable on <a href="{reg}">this iste</a> stronie""".format(reg = reverse("terms"))
)
whis obviously fails, because urlconfs are unprepared while models are being instantiated.
I even tried to wrap help_test
in SimpleLazyObject
but it still didn't work.
I'd rather didn't touch the template code. Is there any way to achieve this without hardcoding url in either string or settings?