Skip to content

Get help_text from model instance #3

Description

@djjudas21

Hi there. I'm a django beginner and I'm trying to figure out how to display a field's help_text in a DetailView. I see you've got a template tag that can display the help text based on a model.field reference, but I need to display the text based on a field from a model instance object, where object is the entire record and object.field is the field.

I want to do something like this:

{% model_field_help_text from object %}

In the wider context of displaying some data in a DetailView template like this:

  <tr>
    <td>
      <strong>{% model_field_verbose_name from object.elements %}</strong>
      {% model_field_help_text from object.elements %}
    </td>
    <td>{{ object.elements }}</td>
  </tr>

Is it possible to somehow use the existing tags by referencing an instance, instead of a model? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions