تم الحل: اقتراح كود html لا يعمل في django-html

آخر تحديث: 09/11/2023
نبذة عن الكاتب: مسار مصدر بايثون

المشكلة الرئيسية هي أن Django-HTML لا يدعم عرض ملفات HTML من سطر الأوامر.

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?

خط الكود {% load appcache %} تحميل مكتبة علامات قالب Django appcache.

خط الكود <html manifest="{{ STATIC_URL }}manifest.appcache" {% html5_appcache %}> يعيّن سمة البيان لعلامة html على قيمة متغير STATIC_URL ، متسلسلًا مع "manifest.appcache". تُستخدم علامة القالب {٪ html5_appcache٪} لإضافة تعليق يشير إلى أن الصفحة قد تم تخزينها مؤقتًا باستخدام HTML5 AppCache.

كيف يمكنني الإكمال التلقائي لكل من HTML و Django-HTML

لا توجد طريقة مضمنة للإكمال التلقائي لكل من HTML و Django-HTML في Django. ومع ذلك ، يمكنك استخدام مكتبة جهة خارجية مثل django-html5lib أو html5lib للإكمال التلقائي لكل من HTML و Django-HTML.

الوظائف ذات الصلة: