D
D
Dauren S2016-07-27 11:48:03
Django
Dauren S, 2016-07-27 11:48:03

Django how to view selection? Make an analogue of print_r in php?

For example, there is a request in the inclusion_tag. How can I see what I have generated?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Gornostaev, 2016-07-27
@dauren101

Native python's print copes well with beautiful and informative output. If you want more, you can try pprint .
The built-in functions dir and vars can also be useful , showing the attributes of an object and their values, respectively.

C
cold147, 2016-07-27
@cold147

For example, there is a request in the inclusion_tag. How can I see what I have generated?

debugger

E
Evgeny Maltsev, 2016-07-27
@hellpirat

https://github.com/jazzband/django-debug-toolbar

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question