Terpecahkan: saran kode html tidak berfungsi di django-html

Pembaharuan Terakhir: 09/11/2023

Masalah utamanya adalah bahwa Django-HTML tidak mendukung pembuatan berkas HTML dari baris perintah.

5-appcache

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;
</code>
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?

Baris kode {% load appcache %} memuat pustaka tag cetakan appcache Django.

Baris kode <html manifest="{{ STATIC_URL }}manifest.appcache" {% html5_appcache %}> menyetel atribut manifes tag html ke nilai variabel STATIC_URL, digabungkan dengan “manifest.appcache”. Tag template {% html5_appcache %} digunakan untuk menambahkan komentar yang menunjukkan bahwa halaman telah di-cache menggunakan HTML5 AppCache.

Bagaimana saya bisa melengkapi otomatis HTML dan Django-HTML

Tidak ada cara bawaan untuk melengkapi otomatis HTML dan Django-HTML di Django. Namun, Anda dapat menggunakan pustaka pihak ketiga seperti django-html5lib atau html5lib untuk melengkapi otomatis HTML dan Django-HTML.

Pos terkait: