Answers for "django template syntax"

2

how to connect templates in django

# Template directory setting
TEMPLATE_DIRS = (
    os.path.join(os.path.dirname(__file__), 'templates'),
)
Posted by: Guest on April-05-2021
0

access django object in html

data = model1.objects.all()
     return TemplateResponse(request, 'index.html', {'data': data})
Posted by: Guest on July-29-2020
0

template tag django

if create_time >= last_date:
Posted by: Guest on April-14-2021

Browse Popular Code Answers by Language