
Django 4 By Example
By :

A very common functionality in blogs is to categorize posts using tags. Tags allow you to categorize content in a non-hierarchical manner, using simple keywords. A tag is simply a label or keyword that can be assigned to posts. We will create a tagging system by integrating a third-party Django tagging application into the project.
django-taggit
is a reusable application that primarily offers you a Tag
model and a manager to easily add tags to any model. You can take a look at its source code at https://github.com/jazzband/django-taggit.
First, you need to install django-taggit
via pip
by running the following command:
pip install django-taggit==3.0.0
Then, open the settings.py
file of the mysite
project and add taggit
to your INSTALLED_APPS
setting, as follows:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions...