Skip to main content

A simple approach to Django tagging

Project description

Django Tag Me

Project Status: Active PyPI - Version PyPI - Python Version PyPI - Versions from Framework Classifiers Documentation Status

Total downloads Monthly downloads Weekly downloads

Simple, flexible tagging for Django.

Add tags to any Django model field -- with a polished widget, per-user tag customization, and automatic resilience to model renames.

Features

  • Easy setup -- Add TagMeCharField to your model and go
  • Beautiful widget -- Searchable dropdown with tag pills, powered by Alpine.js
  • User tags -- Each user gets their own customizable tag set per field
  • System tags -- Define default tags available to all users
  • Tag synchronization -- Keep tags in sync across related models
  • Model rename resilient -- FK-based lookups with automatic orphan detection and repair
  • CLI diagnostics -- Health checks, orphan repair, and built-in troubleshooting via tag_me command
  • Structured logging -- Observability via structlog for production monitoring
  • Form integration -- Drop-in mixin for your model forms
  • Template tags -- Display tags as styled pills

Quick Example

# models.py
from tag_me.models import TagMeCharField

class Article(models.Model):
    tags = TagMeCharField(blank=True)
    category = TagMeCharField(choices=CategoryChoices.choices, system_tag=True)
# forms.py
from tag_me.forms import TagMeModelFormMixin

class ArticleForm(TagMeModelFormMixin, forms.ModelForm):
    class Meta:
        model = Article
        fields = ["tags", "category"]

See the Quickstart for the full setup including templates and frontend requirements.

Widget Preview

Dropdown with tag options

Tag dropdown with options

Search and filter tags

Tag dropdown search functionality

Model Rename Resilience

Rename your Django models without breaking tags. Tag-me uses ContentType foreign keys instead of model name strings, and automatically detects and merges orphaned records during migration.

# Rename your model, then:
python manage.py makemigrations   # answer "yes" to rename prompt
python manage.py migrate          # tag-me handles the rest

# Verify everything is clean:
python manage.py tag_me check

See How to Upgrade to FK Lookup for details on the FK-based system.

Management Command

Tag-me includes a CLI for diagnostics and administration:

python manage.py tag_me populate              # create/update tags
python manage.py tag_me check                 # data integrity audit
python manage.py tag_me fix-orphans --dry-run # preview orphan repair
python manage.py tag_me help                  # built-in documentation

Tag population runs automatically after every migrate. The CLI exists for diagnostics, manual repair, and single-user operations.

See How to Use the Tag-me CLI for the full guide.

Installation

pip install django-tag-me

See the documentation for setup and usage instructions.

Links

Credits

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_tag_me-2026.6.2.1.tar.gz (211.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_tag_me-2026.6.2.1-py3-none-any.whl (112.0 kB view details)

Uploaded Python 3

File details

Details for the file django_tag_me-2026.6.2.1.tar.gz.

File metadata

  • Download URL: django_tag_me-2026.6.2.1.tar.gz
  • Upload date:
  • Size: 211.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for django_tag_me-2026.6.2.1.tar.gz
Algorithm Hash digest
SHA256 72594fd1aadc7e5a45702bd7d2232f36a48ca2084897d3f4ffbbd3e0d90e580a
MD5 dfc74c631d1e9157b94e1ef08f4e2fab
BLAKE2b-256 3a95cf6857d4b9ddc53d63f20d0a597f65831c449b3c43dbe99eab0809c4ef18

See more details on using hashes here.

File details

Details for the file django_tag_me-2026.6.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tag_me-2026.6.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0965a1f29820994cda04df5a2c343b4883e692cdab42d50f903dfe4dbff6ad
MD5 e5e377b1352f1657e814ec42facc6122
BLAKE2b-256 4bbbe9096e0a77b31266f75653df4a0a2372c889c1a341bc2f520accd496b940

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page