Template Context Debugger with Pydev

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from django.template import Library, Node
register = Library()


class PydevDebugNode(Node):
    def render(self, context):
        try:
            import pydevd #@UnresolvedImport
            pydevd.connected = True
            pydevd.settrace()
            return ''
        except:
            # It might be more clear to just let this exception pass through
            return 'Debugger was not turned on'

@register.tag
def pydev_debug(parser, token):
    return PydevDebugNode()

More like this

  1. Template context debugger with (I)Pdb by denis 3 years, 11 months ago
  2. manage.py for eclipse with pydev debugging by nickvlku 3 years, 11 months ago
  3. Updated - Template context debugger with (I)Pdb by dnordberg 3 years, 9 months ago
  4. testdata tag for templates by showell 4 years ago
  5. make templates fail loudly in dev by showell 4 years ago

Comments

(Forgotten your password?)