Answer the question
In order to leave comments, you need to log in
How to setup Django template debugging in Pycharm?
I'm just getting started with Django. Please help me master debugging in Pycharm.
If I put a breakpoint in Views, then debugging works, variables are available for calculation.
If I put a breakpoint in the template, then the breakpoint does not work.
I have variables written in the template and they are exactly drawn from the model, otherwise my table with data would not be filled.
setting Templates in settings.py is like this
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'TEMPLATE_DEBUG':'True',
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
#"django.core.context_processors.media",
#"django.core.context_processors.static",
],
},
},
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question