파이썬 django is 연산자1 파이썬 Django Operator-1 파이썬 Django 논리 연산자(Operator) : and 둘 이상의 조건이 참인지 확인한다. 2개의 논리값이 모두 참일 때 참 결과값을 반환한다. 둘 중에 하나의 논리값이 거짓일 경우에는 거짓을 반환한다. template.html {% if greeting == 1 and day == "Friday" %} Hello Weekend! {% endif %} In views.py you can see what the variables look like. views.py from django.http import HttpResponse from django.template import loader def testing(request): template = loader.get_template('template.. 2024. 3. 5. 이전 1 다음