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
0
votes
3 answers

Import "taggit.managers" could not be resolved

Im currently learning django with the book "Django 2" by Antonio Melé. I got an error when I import "from taggit.managers import TaggableManager". I already install django-taggit and django-extensions. I also already added 'taggit' to…
Matias
  • 1
  • 1
0
votes
1 answer

when I try to render tags I get Wallpaper.Wallpaper.None

views.py def download(request, wallpaper_name): try: wallpaper = Wallpaper.objects.get(name=wallpaper_name) similar_wallpapers = wallpaper.tags.similar_objects()[:2] except Exception as exc: wallpaper = None similar_wallpapers =…
0
votes
1 answer

everytime i do some activity on my website i get this error :- Wallpaper.models.Wallpaper.DoesNotExist: Wallpaper matching query does not exist

Views.py def home(request): WAllPAPER_PER_PAGE = 4 WALL = Wallpaper.objects.all() from django.core.paginator import EmptyPage, Paginator from django.db.models import Q qd = request.GET.copy() qd.pop('page', None) …
0
votes
1 answer

how to render django-taggit common tags in template

I've seen a lot of questions and answers about how to get most common tags using django-taggit. However that's not really my issue. My issue is how to pass that common tags to my django templates. To return all tags I had: {% for tag in…
Yehuda
  • 27
  • 15
0
votes
1 answer

How to find the no of people following a hashtag - Django

I have used Django-Taggit in the posts to add tagging in my project. My post model schema is like this : class Feed(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE,related_name='feedposts') publish…
0
votes
1 answer

Aggregate tag names in Django Taggit

I am using the django taggit library. I have a Queryset that lists objects, which have a few tags attached to each object. How to get them all in one query? While I know how to get tags for each objects on model level, I haven't found a way to do so…
AlexA
  • 4,028
  • 8
  • 51
  • 84
0
votes
3 answers

ModuleNotFoundError: No module named 'taggit'

I used pip install to install django taggit, I am confirming that is there with pip freeze I am including taggit on installed apps and when I want to do the migrations it gives me this error ModuleNotFoundError: No module named 'taggit', I used pip…
0
votes
1 answer

Using Django-Taggit in Django Rest Framework 3.13.1 with Django 4.0.2 with Error "Invalid json list" in Serializing Tags Model Attribute

Older solutions uses django-taggit-serializer which is now been deprecated and doesn't work with the version I have. I have already done what the documentation says regarding the integration with DRF. However, I am getting this…
0
votes
1 answer

Is anyone familiar with Django-Taggit and Paginator? I keep receiving a TypeError when I click on my tags

So I am following a digital book on how to add tags to Django using Taggit. The List page is also using Paginator, but what is happening is I am getting this Type Error when I click on one of the tags which is supposed to take you to keep you on…
CAG081976
  • 1
  • 2
0
votes
0 answers

`category` and `tag` shared by multiple wagtail page types

I have a Django+Wagtail website, and have category and tag created to be applied to blog posts. from taggit.models import Tag as TaggitTag from taggit.models import TaggedItemBase class PostList(RoutablePageMixin, Page): template =…
Yan Tian
  • 377
  • 3
  • 11
0
votes
1 answer

django 4.0rc1 and django-taggit "TypeError: get_extra_restriction() missing 1 required positional argument: 'related_alias'" on filtering by Tag

After upgrading Django to 4.0rc1, wherever I try to filter Objects by it's Tag (django-taggit) entrys = Entry.objects.filter(tags__name__in=["Tag1", "Tag2"]) or entrys = Entry.objects.filter(tags__id=tag.id) I get the following error: Traceback…
dirkbo
  • 623
  • 9
  • 20
0
votes
1 answer

Install Django Taggit Inside Another App?

I am using Django taggit. Initially, I created a tags app and customized taggit slightly. It's not a lot of code and doesn't warrant it's own app (in my opinion) so I want to move the tags code to another app (let's call it content). from…
Jarad
  • 17,409
  • 19
  • 95
  • 154
0
votes
1 answer

Get tags user commented of blogpost on

I am building a Blog App and I am trying to get all the tags which a user commented and that comment's blog was attached with tags. For Example :-* If a blog_1 has tags named tag_1, tag_2 and tag_3 and user commented in it and in any of these blog…
Van
  • 107
  • 10
0
votes
0 answers

How to get a list of articles filtered by tag using django-taggit?

I want to list articles by tag to have the title of the tag in the title and the titles of the articles in the list. My view.py looks like this: from taggit.models import TaggedItem class ArticlesByTagsList(ListView): template_name =…
0
votes
1 answer

Taggit Django - Return View of Posts Based on User Post Tags)

I have recently been playing around Taggit. I have managed to filter my Posts model, based on different Tags by adding the following filter .filter(tags__name__in='categoryone'). Although, would anyone be able to provide me with guidance on how to…
Jarjar95
  • 117
  • 2
  • 10