<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -254,6 +254,11 @@ def djangoerror():
         filename = tback.tb_frame.f_code.co_filename
         function = tback.tb_frame.f_code.co_name
         lineno = tback.tb_lineno - 1
+
+        # hack to get correct line number for templates
+        if function == &quot;__template__&quot;:
+            lineno -= 2
+        
         pre_context_lineno, pre_context, context_line, post_context = \
             _get_lines_from_file(filename, lineno, 7)
 </diff>
      <filename>web/debugerror.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6561539075bb854f4edc3e8e9e17c982645f1e44</id>
    </parent>
  </parents>
  <author>
    <name>Anand Chitipothu</name>
    <email>anandology@gmail.com</email>
  </author>
  <url>http://github.com/webpy/webpy/commit/ed4eba154f21d26b687867d0b97e1512313e4bb5</url>
  <id>ed4eba154f21d26b687867d0b97e1512313e4bb5</id>
  <committed-date>2009-11-07T05:31:07-08:00</committed-date>
  <authored-date>2009-11-07T00:59:26-08:00</authored-date>
  <message>hack to display correct template line numbers in debugerror</message>
  <tree>c7d237074d140d196974291b24c741ead3b66f8d</tree>
  <committer>
    <name>Anand Chitipothu</name>
    <email>anandology@gmail.com</email>
  </committer>
</commit>
