djangodebuggingwerkzeugdjango-extensions

Add debugging console to django error page


How can I access the console from the django error page?

When my template produces an error I want to be able to check out my variables/ query sets without having to go back and add import pdb; pdb.set_trace() to my views every time I want to get to the console from a running app.


Solution

  • pip3 install django-extensions
    # add 'django-extensions' to INSTALLED_APPS in settings.py
    pip3 install werkzeug
    
    python3 manage.py runserver_plus
    

    Now when you get errors in the browser you can click on the little console button when you hover over the output. thanks @thebjorn and @allcaps for pointing me in the right direction

    enter image description here

    ^ >>> is where you can write your own comands