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
1
vote
2 answers

AttributeError: 'QuerySet' object has no attribute 'tags' when trying to save quotes and tags with ClusterableModel and ClusterTaggableManager

I am trying to save some quotes from a csv file to my django model using python manage.py shell because I could not use django-import-export to do it. I asked about it at Tags imported but relationship not imported with django-import-export but…
Niq_Lin
  • 85
  • 1
  • 3
  • 10
1
vote
1 answer

django-autocomplete-light template not rendering autocomplete widget

I am trying to make a search field on my homepage where you search entries by tag, and within that search field as you type in letters it should suggest you tags that contain what you have typed so far. I am using django-taggit for tags. I have…
1
vote
1 answer

Get all elements that contain a specific tag in django-rest-framework

I am using django-rest-framework and django-taggit to add tags to my models. My models are movie and book and both have only a title and tags from django.db import models from taggit.managers import TaggableManager class Movie(models.Model): …
Leonardo
  • 2,439
  • 33
  • 17
  • 31
1
vote
1 answer

Django Taggit - Autocomplete Light (Guidance with configuring)

I have Taggit fully up and running and would like to configure Autocomplete Light in order to enable the Select2 dropdown when users select their preferred tags within my application. I have installed DAL, dal_select2 along with…
Jarjar95
  • 117
  • 2
  • 10
1
vote
2 answers

How can you limit the maximum number of tags an object can have in django-taggit?

I've been really impressed with the implementation of django-taggit as an application for handling tags within Django. However, I have been unable to find a way to set a maximum number of tags which can be applied to an object - a 'MAX_TAG' if you…
jvc26
  • 6,363
  • 6
  • 46
  • 75
1
vote
0 answers

Can't save tags in django

i am using django-taggit to save tags. It save some tags but now its not working and idk why! still finding the solution. Please help me to find out what i am doing wrong. I am not getting any errors. But when i save the form using form.save_m2m()…
CodeLover
  • 97
  • 1
  • 9
1
vote
0 answers

Wrong content_type_id when using Inheritance with django-taggit

I defined: from django.db import models from taggit.managers import TaggableManager class Parent(models.Model): tags = TaggableManager() class Child (models.Model): more_stuff = models.CharField(max_length=200, blank=True) When I add a Child…
Meir
  • 1,691
  • 2
  • 14
  • 15
1
vote
0 answers

Name a file from many-to-many field on model save django

I would like to save an image with specific name depending on other model fields, specifically, many-to-many field.The problem occurs when I try to access the tags post_save(or son save()) which gives me None tags. def path_to_upload(instance,…
1
vote
2 answers

How to have two tag fields i.e. two Taggable Managers in the same model?

I have a model for uploaded files and I now need to have two tag fields in that model. One for user tags and one for admin tags. I've tried several solutions but neither worked. Here is my code now and it doesn't work. Not sure if this is to create…
1
vote
1 answer

Django-taggit: add tags

django-taggit==1.2.0 class Post(models.Model): tags = TaggableManager() # django-taggit ... def save(self, *args, **kwargs): super().save(*args, **kwargs) tag_slugs_list = strip_and_split(self.tags_aux) #…
Michael
  • 4,273
  • 3
  • 40
  • 69
1
vote
1 answer

Django-taggit using choices select drop down

I am trying to figure out how to render a drop down field using choices with Django-taggit. For variable 'type' How do I pass categories(A,B,C) in Home.html and change input type to select ? I think it must be something like this and reference…
1
vote
1 answer

Django-taggit migration fails at AlterUniqueTogether

I'm trying to migrate my Django application which uses jazzband django-taggit The error I get is: django.db.utils.IntegrityError: could not create unique index "taggit_taggeditem_content_type_id_object_i_4bb97a8e_uniq" DETAIL: Key (content_type_id,…
Anatol
  • 1,923
  • 6
  • 26
  • 55
1
vote
0 answers

Is there a way to give a content_panel a "tagselect" style?

Is there a way to give a content_panel a "tagselect" style so that snippet choosing is as convenient as tag choosing? I need the "create new" functionality to be able to take more fields besides title (like a web link and a picture affiliated with a…
1
vote
0 answers

additional fields associated with wagtail tags?

I'm creating wagtail website that copies and adds to the functionality of old django website: there is a blog-like "animal-listing" and "plant-listing" pages with post-detail-like "animal detail" and "plant detail" pages. They share a common "need"…
illevens
  • 343
  • 1
  • 13
1
vote
1 answer

Can't save tags in admin using django-taggit

I am using django-taggit and I can't save the tags when creating a new post from the admin panel, when I edit a post I had already created before adding django-taggit, it saves the tags well, what might be the problem? Models.py class…
Billy Dan
  • 29
  • 1
  • 8