(frame)
| 179 | |
| 180 | |
| 181 | def _is_django_render_call(frame): |
| 182 | try: |
| 183 | name = frame.f_code.co_name |
| 184 | if name != "render": |
| 185 | return False |
| 186 | |
| 187 | if "self" not in frame.f_locals: |
| 188 | return False |
| 189 | |
| 190 | cls = frame.f_locals["self"].__class__ |
| 191 | |
| 192 | inherits_node = _inherits(cls, "Node") |
| 193 | |
| 194 | if not inherits_node: |
| 195 | return False |
| 196 | |
| 197 | clsname = cls.__name__ |
| 198 | if IS_DJANGO19: |
| 199 | # in Django 1.9 we need to save the flag that there is included template |
| 200 | if clsname == "IncludeNode": |
| 201 | if "context" in frame.f_locals: |
| 202 | context = frame.f_locals["context"] |
| 203 | context._has_included_template = True |
| 204 | |
| 205 | return clsname not in _IGNORE_RENDER_OF_CLASSES |
| 206 | except: |
| 207 | pydev_log.exception() |
| 208 | return False |
| 209 | |
| 210 | |
| 211 | def _is_django_context_get_call(frame): |
no test coverage detected