How to debug in Django?
Aspirant Programmer

How can you debug the code while doing development and track the issue fast?

  • Total 1 Answer
  • 332
Can You answer this question?
Aspirant Programmer

To start debugging in django while doing development you will need to follow below steps and get to go:

1- $pip install django_extensions

Now include in under INSTALLED_APPS as 'django_extensions'.

2- $pip install werkzeug

You have set all required things for debugging, just need to write below statement where you want to debug:

3- assert False, latest_poll_list  

It will display in browser and start debugging, here latest_poll_list is result set of records.

django_extensions gives new feature to run server as runserver_plus

$python runserver_plus