[Answered ]-Django TemplateSyntaxError with no file or module name mentioned


In this case, the traceback is admittedly a little confusing. Django thinks this is a template error, and therefore gives you a snippet of the template and the traceback of where it thinks it occurred. But actually, the error is deeper – it’s occurring when Django tries to resolve the {% url %} tag, which does a reverse lookup on urls and views to provide a link.

But in order to do this, it must import all your views: and you have a syntax error in one of them, in line 124. Unfortunately, it doesn’t tell you which one.

Leave a comment