0

In Django i want to know how to see the full objects which may have nested objects like model, formset etc in template as html or <pre> element

Is it possible.

Because it will help me to debug and check the results.

Santhosh
  • 9,965
  • 20
  • 103
  • 243

1 Answers1

3

I just came up on that question that hasn't the right answer which is using the special built-in template filter pprint.

# in your template

{{ my_value | pprint }}

As said in the docstring, it helps, really.

Emilio Conte
  • 1,105
  • 10
  • 29