Solved: code suggestion html not working in django-html

The main problem is that Django-HTML does not support rendering of HTML files from the command line.


I'm using Django 1.8 and django-html5-appcache 0.4.1, and I have the following code in my template:
<code>{% load appcache %}
&lt;!DOCTYPE html&gt;
&lt;html manifest="{{ STATIC_URL }}manifest.appcache" {% html5_appcache %}&gt;
However, when I type <code>manifest=</code>, the code suggestion doesn't work: it doesn't suggest <code>{{ STATIC_URL }}manifest.appcache</code>.  It does work if I type <code>manifest="{{ STATIC_URL }}</code>, but then it doesn't suggest <code>manifest.appcache</code>.  How can I get it to suggest both?

The code line {% load appcache %} loads the Django appcache template tag library.

The code line <html manifest="{{ STATIC_URL }}manifest.appcache" {% html5_appcache %}> sets the manifest attribute of the html tag to the value of the STATIC_URL variable, concatenated with “manifest.appcache”. The {% html5_appcache %} template tag is used to add a comment indicating that the page has been cached using HTML5 AppCache.

How can I autocomplete both HTML and Django-HTML

There is no built-in way to autocomplete both HTML and Django-HTML in Django. However, you can use a third-party library such as django-html5lib or html5lib to autocomplete both HTML and Django-HTML.

Related posts:

Leave a Comment