Django — Debugging {% url django-admindocs-docroot as docsroot %} / TemplateSyntaxError

I hate this error message with a passion. I’m 100% certain that I’ve spent the most time debugging on this specific error, because often times the error message is useless and the stack trace too deep to give any meaningful data.

Remember to remove all .pyc files in your project by running `find . -name “*.pyc” | xargs rm`.

Advertisements

3 thoughts on “Django — Debugging {% url django-admindocs-docroot as docsroot %} / TemplateSyntaxError

  1. So I have the same error and just removing the .pyc files does not clear it. Also running a manage.py flush doesn’t fix it either. Got any pointers?

  2. This is an exercise in hair pulling unfortunately. My only advice to you is: slowly disable one app at a time while running `find . -name “*.pyc” | xargs rm` until you narrow down the problem app.

    You can then check your version control system for recent modifications to the files in the app that may have caused the error, assuming this app was working before.

    Hope you figure it out!

  3. I just had to deal with this error. Make sure to look through the tracebacks for a local variable “e” – this could be an error that your view is throwing that Django isn’t showing you. Good luck.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s