Django-Vorlage


  Übersetzungsergebnisse:

Es gibt viele verschiedene Web-Frameworks unter Python. Django ist der repräsentativste Schwergewichtsspieler. Viele erfolgreiche Websites und Apps basieren auf Django.

Django ist ein in Python geschriebenes Open-Source-Webanwendungs-Framework.

Django-VorlageSyntax

Eine Vorlage ist ein Text, der zur Trennung von Präsentation und Inhalt eines Dokuments verwendet wird.

Django-VorlageBeispiel

...TEMPLATES = [
    {         'BACKEND': 'django.template.backends.django.DjangoTemplates',        
                    'DIRS': [BASE_DIR+"/templates",],       # 修改位置
                'APP_DIRS': True,        'OPTIONS': {            
                    'context_processors': [
              'django.template.context_processors.debug',                
                    'django.template.context_processors.request',                
                    'django.contrib.auth.context_processors.auth',                
                    'django.contrib.messages.context_processors.messages',            ],
        },
    },]...

Beliebte Empfehlungen

Heim

Videos

Fragen und Antworten