I’m trying to print data to stdout, as a debugging step.
I’ve trid both print, and using loggiing to do it. I’m calling it from within a view class. It will print the statement when the django app is started, but never upon sucessive page calls. Which doesn’t work as i’m trying to debug data that comes after some page calls.
Currently I have django dockerized , I’ve set PYTHONUNBUFFERED=1 in my dockerfile. I’m starting django using the develoment server as well.
Welcome @thekraken !
Please show the view class and the print statments you’re trying to execute.
Keep in mind that classes themselves are only interpreted / executed when the module is loaded. If you’re looking for print functions to be called when the view is being executed, the print calls must be in one of the functions being executed within the view. (This is assuming we’re talking about CBVs here. With FBVs, then the print calls need to be in those view functions.)