How to add tags in Django || Django taggit tutorial || Django project - #10 | SEO like tags
How to add tags in django , django taggit ,add wordpress like tags, add tags for all particular post , a django project for beginners and all , Use Django taggit , SEO like tags in django , Add tags like wordpress in django
How to add tags in Django || Django taggit || Django project - #10 | SEO like tags
django project for beginners and all , in this video i have seen you how to use django taggit and how to add django tags in your django website
if you follow the project then you will better understand
if any query then comment please ,
django tags is very useful in any django project , you must know how to use it , django tags very helpful ,this is tags like wordpress in django
join telegram ::
Blearningclub Telegram channel ::
https://t.me/blearningclub
*****************
don't worry about the code i will upload it , but at first you have to do this alone , and for the time saving i just tell you how to do , have any query then comment
****** story list function
if tag_slug:
tag=get_object_or_404(Tag,slug=tag_slug)
story=Story.objects.filter(tags__in=[tag])
remember here Story is the model , Tag is also model you have to import it
put this line before the render
************* story detail functions
post_tags_ids = Story.tags.values_list('id', flat=True)
similar_posts = Story.objects.filter(tags__in=post_tags_ids).exclude(id=story.id)
similar_posts = similar_posts.annotate(same_tags=Count('tags')).order_by('-same_tags','-publish')[:3]
you can create your own algorithms , but for similar post i just exclude the same story and show all 2 or 3 story with same tags
publish is the field in Story model
and you have to import count from django.db.models
************
This is a complete django project for all and beginners
you can create this project
you will understand a lot of concept in django
tags-:
How to add tags in django ,
django taggit ,
add wordpress like tags,
add tags for all particular post ,
a django project for beginners and all ,
Use Django taggit ,
SEO like tags in django ,
Add tags like wordpress in django
THANKS FOR SUPPORT
LIKE || SHARE || SUBSCRIBE
#django #taggit