Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- bootstrap4
- error
- include
- Uncaught SyntaxError
- ValueError
- Python
- TemplateSyntaxError
- 취미미술
- 마이그레이트
- 조맹크로키
- Django
- scotty
- 오류
- navbar
- ModuleNotFoundError
- Migrate
- pip install --upgrade pip
- 마이그레이션
- JavaScript
- 블린이
- 조맹클래스101
- junny
- You should consider upgrading
- 크로키
- 알리
Archives
- Today
- Total
내가 하고 싶은 것들 중 하나
{% empty %} 템플릿 태그 본문
template tag 정리
{% empty %}
가 무엇인지 알아보다가... (너무 쉬운건데 말이죠..)
{% for comment in review.comment_set.all %}
<small> {{ comment.user }}</small>
<div class='row mb-2'>
<p class='col-11'>{{ comment.content }} </p>
<a data-toggle="tooltip" data-placement="bottom" title="delete this comment" href = "{%url 'community:comment_delete' review.pk comment.pk %}" class='btn btn-outline-dark btn-sm col-1 font-weight-bolder'>x</a>
</div>
{% empty %}
<p> No comment yet! </p><br>
{% endfor %}
comment가 없을 경우 p태그를 출력합니다...?
공식문서도 함께 봐주기
https://docs.djangoproject.com/en/3.0/ref/templates/builtins/
django 공식문서 Built-in template tags and filters
- 아래 사이트에는 탬플릿 태그와 필터가 한국어로 잘 정리되어 있습니다.
https://goodmorningcody.wordpress.com/tag/django/
Basic Template Tags and Filters.
'웹 세상 > django' 카테고리의 다른 글
Model 설정할 때 NameError가 뜬다면? (0) | 2020.05.06 |
---|---|
jquery 다운받아 사용하기 (0) | 2020.05.05 |
pip install --upgrade pip (0) | 2020.05.04 |
네비게이션바 include 하기 (0) | 2020.05.02 |
[에러 해결] TemplateSyntaxError 'bootstarap4' is not registered tag library. (0) | 2020.04.26 |
Comments