-
[Python] TypeError: 'ManyRelatedManager' object is not iterablePython/Django 2021. 12. 14. 03:08
<ul> # manytomany를 iterate 할 경우 뒤에 .all을 꼭 붙여주자 {% for a in room.amenities.all %} <li>{{a}}</li> {% endfor %} </ul>
'Python > Django' 카테고리의 다른 글
[Python] Autocomplete for both Django-template and HTML (0) 2021.12.15 [Python] CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False. (0) 2021.12.14 [Python] url tag 사용하기 (0) 2021.12.14 [Python] 'Specifying a namespace in include() without providing an app_name ' dj (0) 2021.12.14 [Python] VSCode에서 Django 템플릿 오토 포매팅하기 (0) 2021.12.13