| | 284 | TECHNICAL_500_TEMPLATE_AJAX = """ |
| | 285 | |
| | 286 | {{ exception_type }} at {{ request.path_info|escape }} |
| | 287 | {% autoescape off %}{{ exception_value }}{% endautoescape %} |
| | 288 | |
| | 289 | Request Method: {{ request.META.REQUEST_METHOD }} |
| | 290 | Request URL: {{ request_protocol }}://{{ request.META.HTTP_HOST }}{{ request.path_info|escape }} |
| | 291 | |
| | 292 | Server time: {{server_time|date:"r"}} |
| | 293 | Django Version: {{ django_version_info }} |
| | 294 | Python Version: {{ sys_version_info }} |
| | 295 | Python Path: {% autoescape off %}{{ sys_path }}{% endautoescape %} |
| | 296 | Python Executable: {{ sys_executable|escape }} |
| | 297 | Installed Applications: |
| | 298 | {% autoescape off %}{{ settings.INSTALLED_APPS|pprint }}{% endautoescape %} |
| | 299 | Installed Middleware: |
| | 300 | {% autoescape off %}{{ settings.MIDDLEWARE_CLASSES|pprint }}{% endautoescape %} |
| | 301 | |
| | 302 | {% if template_does_not_exist %}Template Loader Error: |
| | 303 | {% if loader_debug_info %}Django tried loading these templates, in this order: |
| | 304 | {% for loader in loader_debug_info %}Using loader {{ loader.loader }}: |
| | 305 | {% for t in loader.templates %}{{ t.name }} (File {% if t.exists %}exists{% else %}does not exist{% endif %}) |
| | 306 | {% endfor %}{% endfor %} |
| | 307 | {% else %}Django couldn't find any templates because your TEMPLATE_LOADERS setting is empty! |
| | 308 | {% endif %} |
| | 309 | {% endif %}{% if template_info %} |
| | 310 | Template error: |
| | 311 | In template {{ template_info.name }}, error at line {{ template_info.line }} |
| | 312 | {{ template_info.message }}{% for source_line in template_info.source_lines %}{% ifequal source_line.0 template_info.line %} |
| | 313 | {{ source_line.0 }} : {{ template_info.before }} {{ template_info.during }} {{ template_info.after }} |
| | 314 | {% else %} |
| | 315 | {{ source_line.0 }} : {{ source_line.1 }} |
| | 316 | {% endifequal %}{% endfor %}{% endif %} |
| | 317 | Traceback: |
| | 318 | {% for frame in frames %}File "{{ frame.filename|escape }}" in {{ frame.function|escape }} |
| | 319 | {% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %} |
| | 320 | {% endfor %} |
| | 321 | Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }} |
| | 322 | Exception Value: {{ exception_value|escape }} |
| | 323 | |
| | 324 | Request information: |
| | 325 | GET:{% if request.GET %}{% for var in request.GET.items %}{% autoescape off %}{{ var.0 }} = {{ var.1 }}{% endautoescape %} |
| | 326 | {% endfor %} |
| | 327 | {% else %} No GET data |
| | 328 | {% endif %} |
| | 329 | |
| | 330 | POST:{% if request.POST %} |
| | 331 | {% for var in request.POST.items %}{% autoescape off %}{{ var.0 }} = {{ var.1 }}{% endautoescape %} |
| | 332 | {% endfor %} |
| | 333 | {% else %} No POST data |
| | 334 | {% endif %} |
| | 335 | |
| | 336 | FILES:{% if request.FILES %} |
| | 337 | {% for var in request.FILES.items %}{% autoescape off %}{{ var.0 }} = {{ var.1 }}{% endautoescape %} |
| | 338 | {% endfor %} |
| | 339 | {% else %} No FILES data |
| | 340 | {% endif %} |
| | 341 | |
| | 342 | COOKIES:{% if request.COOKIES %} |
| | 343 | {% for var in request.COOKIES.items %}{% autoescape off %}{{ var.0 }} = {{ var.1 }}{% endautoescape %} |
| | 344 | {% endfor %} |
| | 345 | {% else %} No cookie data |
| | 346 | {% endif %} |
| | 347 | |
| | 348 | META: |
| | 349 | {% for var in request.META.items|dictsort:"0" %}{% autoescape off %}{{ var.0 }} = {{ var.1 }}{% endautoescape %} |
| | 350 | {% endfor %} |
| | 351 | |
| | 352 | Settings: |
| | 353 | Using settings module {{ settings.SETTINGS_MODULE }} |
| | 354 | {% for var in settings.items|dictsort:"0" %}{% autoescape off %}{{ var.0 }} = {{ var.1 }}{% endautoescape %} |
| | 355 | {% endfor %} |
| | 356 | |
| | 357 | You're seeing this error because you have <code>DEBUG = True</code> in your |
| | 358 | Django settings file. Change that to <code>False</code>, and Django will |
| | 359 | display a standard 500 page. |
| | 360 | |
| | 361 | """ |
| | 362 | |