문제

I want to have a user select tags with a radio button widget, not with a char box. So I want to get all candidate tags as in "SELECT slug,name FROM taggit_tag;". Is there a way to do that without issuing raw sql? (I am shy of the transaction handling, which has bit me in the past.)

도움이 되었습니까?

해결책

from taggit.models import Tag
tags = Tag.objects.all()
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top