Questions tagged [django-taggit]

django-taggit is a reusable Django application designed to making adding tagging to your project easy and fun.

django-taggit works with Django 1.1 and 1.2 (see Known Issues for known issues with older versions of Django), and Python 2.4-2.X.

306 questions
6
votes
3 answers

django-taggit not working when using UUID

I have gone through the customization documentation here https://django-taggit.readthedocs.io/en/latest/custom_tagging.html#genericuuidtaggeditembase I am using the following code, when I save the product through django admin, tables are getting…
Chirdeep Tomar
  • 4,281
  • 8
  • 37
  • 66
6
votes
2 answers

django-taggit on models with UUID as pk throwing out of range on save

I have models that uses UUID as its PK class Foo(models.Model): foo_id = models.UUIDField( primary_key=True, default=uuid.uuid4, editable=False ) tags =…
Austin
  • 4,296
  • 6
  • 40
  • 52
5
votes
1 answer

Get objects for which a type of foreign key exists

I'm using django-taggit to create an app that stores not only to-do items but also informational items. Both a to-do items and informational items can be tagged. When I pull a list of tags for to-do items, I run the following query: action_tags =…
Ed.
  • 4,439
  • 10
  • 60
  • 78
5
votes
2 answers

django-taggit deep relationship query

I'm using django-taggit and I came upon a problem when trying to filter across relationships. Having the following models: class Artist(models.Model): tags = TaggableManager() class Gig(models.Model): artist =…
Jonas Geiregat
  • 5,214
  • 4
  • 41
  • 60
5
votes
4 answers

How can I limit django-taggit to accept only lowercase words?

I'm using django-taggit. I'd like to have all tags in lowercase, also set a range for tag numbers (say between 1 and 5, just like stackoverflow). Is there any way to do it easily with django-taggit? Thanks!
devfeng
  • 281
  • 4
  • 11
5
votes
2 answers

Django Taggit - Tag Associations not Saving from Custom Admin Form

Going nuts over here... From within the shell, I can do: product.tags.add("a_new_tag") The tag is added to the db, and the tag association with the product works correctly. (i.e., when I do Product.objects.filter(tags__name__in=["a_new_tag"] the…
ruedaminute
  • 579
  • 2
  • 5
  • 13
5
votes
2 answers

How to filter posts by tags using django-taggit in django

Currently, I'm still learning with Django and creating my blog using Django 2.2. but somehow there's an error when I using django-taggit. How to filter the post by tags? I've read the documentation but there's not fully covered about how to…
iColdPlayer
  • 475
  • 5
  • 11
5
votes
1 answer

Get similar objects of same type from django taggit

I am using django-taggit tags in two models, lets say Model1 and Model2. I am using below code to get similar objects from my one of the model. obj1 = Model1.objects.get(pk=1) similar = obj1.tags.similar_objects() In the similar objects I am…
kishore
  • 413
  • 1
  • 4
  • 20
5
votes
2 answers

django-taggit - display all tags based on date vlog published

Using django-taggit-templatetags2, I can display all the tags associated for a test vlog in a template page. I have vlogs stored in the db that are not yet released to the public (only displayed after a certain date), so that I can store numerous…
user1261774
  • 3,525
  • 10
  • 55
  • 103
5
votes
1 answer

django-taggit - display existing tags on the django-admin add record page

I have created a test vlog application using django/python and django-taggit. The vlog and tags are working as they should. However, I want to list all the existing tags in the django-admin interface for new and updated vlog entries - similar to…
user1261774
  • 3,525
  • 10
  • 55
  • 103
5
votes
2 answers

Django-taggit how to get all tags

I can get all tags' name one by one like this in template {% for tag in blog.tags.all %} {{ tag.name }} {% endfor %} And I can get a input from a form like this {{ form.tags }} and it gives me:
PikeSZfish
  • 109
  • 1
  • 10
4
votes
1 answer

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…
Jim Hefferon
  • 438
  • 2
  • 4
  • 11
4
votes
2 answers

get_extra_restriction() missing 1 required positional argument: 'related_alias' error django

I deployed my django site on heroku and when i run my url which uses django taggit in it error shows up. I am using django taggit for meta keys to find related blogs.
4
votes
1 answer

How to set initial tag data in django taggit Tag model

Would it be possible to initialize tag data by fixtures as below; [{ "fields": { "name": "tag1" }, "model": "taggit.Tag", "pk": 1 }, { "fields": { "name": "tag2" }, "model": "taggit.Tag", "pk": 2 }, { …
user44332
  • 85
  • 6
4
votes
1 answer

django taggit get all users tags from foreignkey lookup

I have the following model class Entry(models.Model): user = models.ForeignKey(User) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(default=timezone.now) tags = TaggableManager() I'm trying t get…
Mike
  • 7,769
  • 13
  • 57
  • 81
1
2
3
20 21