дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-28 05:22:23 +02:00
Adds a Django Template language: .html/.txt files in a templates folder of a project with manage.py (new [[framework-files]] detection), a Lezer grammar for tags, variables, filters and comments with HTML mounted between them, block folding/indent/matching, {% %} / {{ }} / {# #} pairing, end-tag insertion and completion, per-line {# #} comments, HTML language server and Emmet in the HTML parts, a banner offering the language for HTML files with Django tags elsewhere, a fixture and docs. The built-in HTML syntax check skips Django templates, whose tags the HTML grammar reports as errors.
Refs #2581
Co-authored-by: andreabasile <[email protected]>
28 рядки
699 B
Python
28 рядки
699 B
Python
"""Settings of the shop fixture: one app, no database tables of its own."""
|
|
|
|
from pathlib import Path
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
|
|
|
SECRET_KEY = "fixture-only-not-a-secret"
|
|
DEBUG = True
|
|
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
|
|
|
|
INSTALLED_APPS = ["django.contrib.staticfiles", "shop"]
|
|
|
|
ROOT_URLCONF = "config.urls"
|
|
|
|
TEMPLATES = [
|
|
{
|
|
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
|
"DIRS": [],
|
|
"APP_DIRS": True,
|
|
"OPTIONS": {"context_processors": ["django.template.context_processors.request"]},
|
|
}
|
|
]
|
|
|
|
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
|
|
|
|
STATIC_URL = "static/"
|
|
USE_TZ = True
|