GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix #479 · meldoessystemdesign/pythonVSCode@51581e9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • package.json
  • pythonFiles/PythonTools
    • visualstudio_py_debugger.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@
286286
"DebugStdLib",
287287
"BreakOnSystemExitZero",
288288
"DjangoDebugging",
289-
"Sudo"
289+
"Sudo",
290+
"IgnoreDjangoTemplateWarnings"
290291
]
291292
},
292293
"default": [
Collapse file

‎pythonFiles/PythonTools/visualstudio_py_debugger.py‎

Copy file name to clipboardExpand all lines: pythonFiles/PythonTools/visualstudio_py_debugger.py
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def thread_creator(func, args, kwargs = {}, *extra_args):
119119
BREAK_ON_SYSTEMEXIT_ZERO = False
120120
DEBUG_STDLIB = False
121121
DJANGO_DEBUG = False
122+
IGNORE_DJANGO_TEMPLATE_WARNINGS = False
122123

123124
# Py3k compat - alias unicode to str
124125
try:
@@ -2289,6 +2290,7 @@ def attach_process_from_socket(sock, debug_options, report = False, block = Fals
22892290

22902291
BREAK_ON_SYSTEMEXIT_ZERO = 'BreakOnSystemExitZero' in debug_options
22912292
DJANGO_DEBUG = 'DjangoDebugging' in debug_options
2293+
IGNORE_DJANGO_TEMPLATE_WARNINGS = 'IgnoreDjangoTemplateWarnings' in debug_options
22922294

22932295
if '' in PREFIXES:
22942296
# If one or more of the prefixes are empty, we can't reliably distinguish stdlib
@@ -2649,6 +2651,9 @@ def _get_source_django_18_or_lower(frame):
26492651
if hasattr(node, 'source'):
26502652
return node.source
26512653
else:
2654+
if IGNORE_DJANGO_TEMPLATE_WARNINGS:
2655+
return None
2656+
26522657
if IS_DJANGO18:
26532658
# The debug setting was changed since Django 1.8
26542659
print("WARNING: Template path is not available. Set the 'debug' option in the OPTIONS of a DjangoTemplates "
@@ -2675,12 +2680,14 @@ def _get_template_file_name(frame):
26752680
return None
26762681
source = _get_source_django_18_or_lower(frame)
26772682
if source is None:
2678-
print("Source is None\n")
2683+
if not IGNORE_DJANGO_TEMPLATE_WARNINGS:
2684+
print("Source is None\n")
26792685
return None
26802686
fname = source[0].name
26812687

26822688
if fname == '<unknown source>':
2683-
print("Source name is %s\n" + fname)
2689+
if not IGNORE_DJANGO_TEMPLATE_WARNINGS:
2690+
print("Source name is %s\n" + fname)
26842691
return None
26852692
else:
26862693
abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_file(fname)

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.