1👍
✅
There’s no reason to be using F objects here. Those are useful when doing an update
query directly, but here you have the object already. Just reference the values:
survey_counter.survey_wizard_count += 1
survey_counter.total_max_counter += 1
survey_counter.save()
Now you can log the values directly:
logger.debug('This is your survey_wizard_count = %s', survey_counter.survey_wizard_count)
0👍
You may try:
logger.debug("This is your survey_wizard_count is: " + survey_counter.survey_wizard_count)
- Django ORM create troubles
- Django queryset subset with custom manager?
- How is value for content_type_id generated in generic foreign key?
- Why does render_to_response work even if it does not match the url in urls.py?
Source:stackexchange.com