question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TemplateSyntaxError after include in exsting projects

See original GitHub issue

I get the following error if I try to integrated the framework into a existing project. I followed the instruction in the docs and I also added the unicorn to INSTALLED_APPS.

Django Version: 3.1.1 /usr/local/bin/python 3.8.7 (64bit)

TemplateSyntaxError Invalid block tag on line 11: unicorn_scripts. Did you forget to register or load this tag? /usr/local/lib/python3.8/site-packages/django/template/base.py, line 531, in invalid_block_tag

If I test the framework in a “clean” new project all work as expected. It should be something interfering with parts of the existing project. It seems that the {% load unicorn %} was not successful.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
adamghillcommented, Jan 24, 2021

Yep, TIL something new, too! 😃 Closing this, but let me know if you run into any other issues.

1reaction
adamghillcommented, Jan 24, 2021

Looks like this behavior is specified as a “feature” for maintainability in https://docs.djangoproject.com/en/3.1/ref/templates/language/#custom-libraries-and-template-inheritance.

I don’t know if that’s how I would classify it 😆, but good to know that it works “as expected”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I get a invalid TemplateSyntaxError in Django for using the ...
My django-project (a tutorial https://www.youtube.com/watch?v=PtQiiknWUcI) keeps crashing on the basis that it doesn't accept my '{% else %}'- ...
Read more >
django.template.exceptions.TemplateSyntaxError: Invalid ...
Hello, I tried to create LoginForm and RegisterForm in my application using the example in the demo app.
Read more >
28050 (TemplateSyntaxError should contain template name)
It contains even line number, but I have no idea in which file. I think, it is not that difficult to include template...
Read more >
expected 'endblock' or 'endblock content' - Google Groups
I'm running into a template syntax error where (as far as I can tell) there shouldn't be one (yes, I've loaded my tags...
Read more >
[Solved] My error is: jinja2.exceptions.templatesyntaxerror ...
My error is: jinja2.exceptions.templatesyntaxerror: encountered unknown tag ... I have a folder named Python Project 01. ... Add a Solution ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found