Templates
DTL (Django Template Language)
Ground Rule
Basic syntax
1. Output {{ }}
{{ }}{{ menu }}
{{ menu.0 }}2. Syntax {% %}
{% %}3. Comments
Loops
Variable
Description
Conditionals
built-in tag, filter (|)
|)Template Extension
Template Configuration - DIR
DIRBASE_DIR
Check folder structure through path definition in DIRS list
Multiple Apps
1. URL configuration separation
2. templates folder structure
Processing Requests through Forms
1. Provide form to users
1-1 URL specification
1-2 Create view function
1-3 template
2. Process user requests
2-1. urls.py definition
2-2. views.py
2-3. template
Tip) Creating project easily!
Last updated