I have a Django app on a Linux server. In one of the views, some form of print command is executed, and some string gets printed. How can I find out what the printed string was? Is there some log in which these things are kept?
I have a Django app on a Linux server. In one of the views,
Share
The output should be in the terminal, where django was started. (if you don’t started it directly, I don’t believe there’s a way to read it)
As linkedlinked pointed out, it’s the best to not use
print, because this can cause Exceptions! But that’s not the only reason: There are modules (like logging) made for such purposes and they have a lot more options.This site (even when it’s from 2008) confirm my statements:
For debugging-purposes you could also enable the debug-mode or use the django-debug-toolbar.
Hope it helps! 🙂