Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get all tags used in django-taggit short of raw sql?

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.)

like image 396
Jim Hefferon Avatar asked Jan 18 '23 12:01

Jim Hefferon


1 Answers

from taggit.models import Tag
tags = Tag.objects.all()
like image 153
Simon Kagwi Avatar answered Feb 13 '23 22:02

Simon Kagwi