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
22
votes
2 answers

django-taggit: make the tags not required in the admin

I've started using django-taggit and it seems to fit the bill. But for me there is still an issue with the admin site: I included the tags attribute in the ModelAdmin like this: class MyModel(db.models.Model): name =…
jammon
  • 3,404
  • 3
  • 20
  • 29
20
votes
2 answers

django-taggit - how do I display the tags related to each record

I'm using django-taggit on one of my projects and I'm able to save and tie the tags with specific records. Now the question is how do I display the tags related to each record? For example on my page I want to display a record which contains a title…
avatar
  • 12,087
  • 17
  • 66
  • 82
13
votes
2 answers

Don't know how to convert the Django field skills ()? graphql

I am trying to change my rest end points to graphql and I had a library called TaggableManager as one of the model fields. Anyone know how this can work with graphql? Thanks in advance
Tsuna
  • 2,098
  • 6
  • 24
  • 46
13
votes
3 answers

Using Django-taggit with django-rest-framework, i'm not able to save my tags

I'm trying to figure it out why when i submit my form, my tags are not saved in my db. Pretty new with the django-rest-framework and Django-taggit too, i think i'm doing something wrong :) First, before making my API with the rest-framework, i was…
Epok
  • 661
  • 1
  • 8
  • 16
13
votes
3 answers

Get all tags from taggit

How to get all the (unique) tags from django-taggit? I would like to display all the tags in a side bar. Currently I am able to get all the tags for a particular post, but now I need to get all the unique tags in the entire blog. code in…
Robby
  • 401
  • 2
  • 6
  • 17
10
votes
1 answer

How to combine multiple querysets and remove duplicates?

I'm using Django 1.6.1 with django-taggit. I'm trying to extend my search engine so that it searches for keywords in other fields besides the tag fields. The trouble is that when I iterate through the tags for an icontains search in the model's…
pyrodney
  • 370
  • 3
  • 14
9
votes
3 answers

django - django-taggit form

I would like to use django-taggit (click here ). The documentation ( click here) talks about using ModelForm to generate the form but I have already my form that I would like to use. Let's say if I have something like this: forms.py class…
avatar
  • 12,087
  • 17
  • 66
  • 82
9
votes
4 answers

Django-taggit prefetch_related

I'm building a basic time logging app right now and I have a todo model that uses django-taggit. My Todo model looks like this: class Todo(models.Model): project = models.ForeignKey(Project) description = models.CharField(max_length=300) …
bb89
  • 793
  • 2
  • 8
  • 23
8
votes
1 answer

In django-taggit, how to get tags for objects that are associated with a specific user?

I have a series of objects that are associated with specific users, like this: from django.db import models from django.contrib.auth.models import User from taggit.managers import TaggableManager class LibraryObject(models.Model): title =…
Joe Mornin
  • 8,766
  • 18
  • 57
  • 82
8
votes
1 answer

Using django user authentication & taggit for multiple apps in a single project

Background: I have 5 independent Django projects which I am attempting to combine in to 1 Django project composed of several apps. In other words: projA has appA, projB has appB & projC has appC, etc. I want 1 masterProj that has appA, appB &…
jewelia
  • 103
  • 5
7
votes
1 answer

How do I create list and detail views for django-taggit?

I have a fairly simple model that uses Django Taggit for tagging. Everything works great, but now I'd like to expand some functionality and I'm a little confused. What I want is two views. One that shows all my tags in the system. One that shows all…
Dave Merwin
  • 1,382
  • 2
  • 22
  • 44
7
votes
4 answers

make case-insensitive tags with django-taggit

I added tags = TaggableManager(blank=True) to my models, but I want my tags to be case-insensitive. I saw some snippets of work arounds for this and wanted to ask if there is an easy way to do it? If I have to override some methods from the…
alexarsh
  • 5,123
  • 12
  • 42
  • 51
7
votes
2 answers

Django-Taggit in Edit Form

This is a Model Class class ModelName(models.Model): (...) pasta = TaggableManager(verbose_name=u'Pasta') and a form template (normal :P ) {{form.as_p}} I'd like to leave everything very clean and usefull. But result is a list of TaggedItem…
Luiz Carvalho
  • 1,549
  • 1
  • 23
  • 46
7
votes
2 answers

Use django-taggit within south data migration?

I have a model that is using django-taggit. I want to perform a South data migration that adds tags to this model. However, the .tags manager is not available from within a South migration where you have to use the South orm['myapp.MyModel'] API…
Apreche
  • 30,042
  • 8
  • 41
  • 52
6
votes
2 answers

django-taggit: Is there a way to produce less db queries?

Say I have a model: class Entry(models.Model): ... tags = TaggableManager() When I iterate over Entry.objects.all() in a template, entry.tags.all produces one more query to the database. Is it possible to reduce queries number? Using…
dmrz
  • 2,243
  • 1
  • 16
  • 9
1
2 3
20 21