- Add an admin command to remove orphaned tags
- Remove support for Python 3.8
- Fix an issue where the admin merge tag form redirect would fail when querystrings are present inside the URL
- Add a management command (
remove_orphaned_tags
) to remove orphaned tags - Add a fallback for when multiple tags are found in case-insensitivity mode (the earliest by PK is returned)
- Add a
deduplicate_tags
management command to remove duplicate tags based on case insensitivity. This feature is enabled whenTAGGIT_CASE_INSENSITIVE
is set toTrue
in the settings. - We no longer package tests, docs, or the sample taggit app into the distributed wheels. While we believe this shouldn't affect anything for users of the library, please tell us if you find yourself hitting issues (like around import errors)
- Fix missing template file for admin merge tag action
- By default, order tag items on instances by the primary key. This generally means that they will be ordered by "creation date" for the tag item.
The previous behavior for this was that by default tag items were not ordered. In practice tag items often end up ordered by creation date anyways, just due to how databases work, but this was not a guarantee.
If you wish to have the old behavior, set
ordering=[]
to yourTaggableManager
instance. We believe that this should not cause a noticable performance change, and the number of queries involved should not change. - Added the ability to merge tags via the admin
- Add Django 5.0 support (no code changes were needed, but now we test this release).
- Add Python 3.12 support
- Add support for dumpdata/loaddata using natural keys
- Fix the package metadata to properly reflect the right Django and Python version requirements Release 5.0.0 improperly stated its Django bounds as >=3.2, so people installing without bounds will end up on a version that won't work.
Backwards icompatible: Rename the (
content_type
,object_id
) index onTaggedItem
. It is very unlikely for this to affect your code itself, and a migration will rename the index. This should not cause any downtime according to my research (Postgres does not lock the table for index renames, and Oracle holds a tiny lock to do it, and the change is only to the metadata, so is not dependent on table size).Backwards incompatible: Remove the
.index_together
and.unique_together
attributes onTaggedItem
We are instead using
constraints
andindexes
to set up these properties.Remove support for Django 3.2.
Remove usage of deprecated APIs for Django 4.2
Remove support for Python 3.7 (no code changes involved)
Fix
tag_kwargs
andTAGGIT_CASE_INSENSITIVE=True
discrepency.
- Remove Python 3.6 support (no code changes occurred, but we no longer test this release).
- Remove Django 4.0 support (no code changes occurred, but we no longer test this release).
- Add Django 4.2 support.
- Add Python 3.11 support (no code changes were needed, but now we test this release).
- Add Django 4.1 support (no code changes were needed, but now we test this release).
- Fixed an issue where object caches would not be properly cleared after updating tags, leading
to stale reads in cases where
prefetch_related
is used. - Change
TagListSerializerField
to be a subclass ofListField
. This should improve support for API document generation. This change should not affect API behavior, but might affect metaprogramming code, so please procede carefully during this update.
Backwards incompatible: Tag slugification used to silently strip non-ASCII characters from the tag name to make the slug. This leads to a lot of confusion for anyone using languages with non-latin alphabets, as well as weird performance issues.
Tag slugification will now, by default, maintain unicode characters as-is during slugification. This will lead to less surprises, but might cause issues for you if you are expecting all of your tag slugs to fit within a regex like
[a-zA-Z0-9]
(for example in URL routing configurations).Generally speaking, this should not require action on your part as a library user, as existing tag slugs are persisted in the database, and only new tags will receive the enhanced unicode-compatible slug.
If you wish to maintain the old stripping behavior, set the setting
TAGGIT_STRIP_UNICODE_WHEN_SLUGIFYING
toTrue
.As a reminder, custom tag models can easily customize slugification behavior by overriding the
slugify
method to your business needs.
`` Drop Django 2.2 support.
- Add Python 3.10 support.
- Add Django 4.0 support.
- Drop Django 3.1 support.
- Backwards incompatible:
TaggableManager.set
now takes a list of tags (instead of varargs) so that its API matches Django'sRelatedManager.set
. Example:- previously:
item.tags.set("red", "blue")
- now:
item.tags.set(["red", "blue"])
- previously:
- Fix issue where
TagField
would incorrectly report that a field has changed on empty values. - Update Russian translation.
- Add Persian translation
- Fix issue for many languages where content types were not being properly translated.
- Provide translators additional context regarding strings in TagBase model.
- Fix compiled Ukranian translation (which would cause a failure on load for this locale).
- Update compiled Danish translation.
- Vendor in the django-taggit-serializer project (under taggit.serializers).
- Add Arabic translation.
- Add Ukranian translation.
- Add Python 3.9 support.
- Remove Python 3.5 support.
- Add Django 3.2 support.
- Remove Django 1.11 and 3.0 support.
- Add Danish translation.
- Fix crashing that could occur with
similar_objects
in multi-inheritance contexts. - Add support for custom fields on through table models with through_defaults for
TaggedManager.add
andTaggedManager.set
.
- Model and field
verbose_name
andverbose_name_plural
attributes are now lowercase. This simplifies using the name in the middle of a sentence. When used as a header, title, or at the beginning of a sentence, a text transformed can be used to adjust the case. - Fix prefetch_related when using UUIDTaggedItem.
- Allow for passing in extra constructor parameters when using
TaggableManager.add
. This is especially useful when using custom tag models.
- Removed support for end-of-life Django 2.0 and 2.1.
- Added support for Django 3.0.
- Added support for Python 3.8.
- Moved
TaggedItemBase.tags_for()
to ItemBase. - Replaced reference to removed Django's
.virtual_fields
with.private_field
. - Added
TextareaTagWidget
.
- Added Finnish translation.
- Updated Chinese translation.
- Updated Esperanto translation.
- Fix
form.changed_data
to allow early access for a tags defined withblank=True
.
- Backwards incompatible: Remove support for Python 2.
- Added
has_changed()
method totaggit.forms.TagField
. - Added multi-column unique constraint to model
TaggedItem
on fieldscontent_type
,object_id
, andtag
. Databases that contain duplicates will need to add a data migration to resolve these duplicates. - Fixed
TaggableManager.most_common()
to always evaluate lazily. Allows placing a.most_common()
query at the top level of a module. - Fixed setting the
related_name
on a tags manager that exists on a model namedName
.
- The project has moved to Jazzband. This is the first release under the new organization. The new repository URL is https://github.com/jazzband/django-taggit.
- Added support for Django 2.2.
- Fixed a race condition in
TaggableManager
. - Removed method
ItemBase.bulk_lookup_kwargs()
. - Fixed view
tagged_object_list
to setqueryset.model
asListView.model
(was previously set as aContentType
instance). _TaggableManager
andTaggableManager
now always call the parent class__init__
.- Removed
TaggableRel
and replaced uses withManyToManyRel
.
- Backwards incompatible: Remove support for Django < 1.11
- Added support for Django 2.1 and Python 3.7
- Moved TagWidget value conversion from TagWidget.render() to TagWidget.format_value()
- Added support for Django 2.0
- Backwards incompatible: Dropped support for EOL Python 3.3
- Update spanish translation
- Add testing for Django 1.11 and Python 3.6
- introduce isort and flake8 in the CI
- [docs] Fixed links to external apps
- Improved auto-slug in TagBase to support UUID pk
- [docs] Added contribution guidelines
- Backwards incompatible: Drop support for Django 1.7
- Fix case-insensitive tag creation when setting to a mix of new and existing tags are used
- Check for case-insensitive duplicates when creating new tags
- Support __gt__ and __lt__ ordering on Tags
- Fix list view
- Update Python version classifiers in setup.py
- Add Greek translation
- Document supported versions of Django; fix Travis to test these versions.
- Fix form tests on Django 1.10
- Address list_display and fieldsets in admin docs
- external_apps.txt improvements
- Remove support for Django 1.4-1.6, again.
- Add extra_filters argument to the manager's most_common method
- Specify app_label for Tag and TaggedItem
- Fix UnboundLocalError in _TaggableManager.set(..)
- Update doc links to reflect RTD domain changes
- Improve Russian translations
- Add app config, add simplified Chinese translation file
- Implementation of m2m_changed signal sending
- Code and tooling improvements
- Added Spanish and Turkish translations
- Add the min_count parameter to managers.most_common function
- Address deprecation warnings
- Add option to override default tag string parsing
- Drop support for Python 2.6
- Silence Django 1.9 warning
- Django 1.9 compatibility fix
- Allows custom Through Model with GenericForeignKey
- Silence Django 1.9 warning about on_delete
- Django 1.9 beta compatibility
- Fix unknown column object_id issue with Django 1.6+
- Database index added on TaggedItem fields content_type & object_id
- Access default manager via class instead of instance
- Prevent IntegrityError with custom TagBase classes
- Fix an admin bug related to the Manager property through_fields
- Fix bug that assumed all primary keys are named 'id'
- Add option to allow case-insensitive tags
- Fix wrong slugs for non-latin chars. Only works if optional GPL dependency (unidecode) is installed.
- Prevent extra JOIN when prefetching
- Prevent _meta warnings with Django 1.8
- Django 1.8 support
- Specify that the internal type of the TaggitManager is a ManyToManyField
- Fixed 1.7 migrations.
- Final (hopefully) fixes for the upcoming Django 1.7 release.
- Added Japanese translation.
- Backwards incompatible: Support for Django 1.7 migrations. South users
have to set
SOUTH_MIGRATION_MODULES
to usetaggit.south_migrations
for taggit. - Backwards incompatible: Django's new transaction handling is used on Django 1.6 and newer.
- Backwards incompatible:
Tag.save
got changed to opportunistically try to save the tag and if that fails fall back to selecting existing similar tags and retry -- if that fails too anIntegrityError
is raised by the database, your app will have to handle that. - Added Italian and Esperanto translations.
- Forbid multiple TaggableManagers via generic foreign keys.
- Fixed support for Django 1.4 and 1.5.
- Added support for prefetch_related on tags fields.
- Fixed support for Django 1.7.
- Made the tagging relations unserializeable again.
- Allow more than one TaggableManager on models (assuming concrete FKs are
- used for the relations).
- Support for Django 1.6 and 1.7.
- Python3 support
- Backwards incompatible: Dropped support for Django < 1.4.5.
- Tag names are unique now, use the provided South migrations to upgrade.
- Backwards incompatible: Forms containing a :class:`TaggableManager` by
default now require tags, to change this provide
blank=True
to the :class:`TaggableManager`. - Now works with Django 1.3 (as of beta-1).
- Added a Hebrew locale.
- Added an index on the
object_id
field ofTaggedItem
. - When displaying tags always join them with commas, never spaces.
- The docs are now available online.
- Custom
Tag
models are now allowed. - Backwards incompatible: Filtering on tags is no longer
filter(tags__in=["foo"])
, it is writtenfilter(tags__name__in=["foo"])
. - Added a German locale.
- Added a Dutch locale.
- Removed
taggit.contrib.suggest
, it now lives in an external application, - see :doc:`external_apps` for more information.
- Removed
- Fixed querying for objects using
exclude(tags__in=tags)
. - Marked strings as translatable.
- Added a Russian translation.
- Created a mailing list.
- Smarter tagstring parsing for form field; ported from Jonathan Buchanan's django-tagging. Now supports tags containing commas. See :ref:`tags-in-forms` for details.
- Switched to using savepoints around the slug generation for tags. This
ensures that it works fine on databases (such as Postgres) which dirty a
transaction with an
IntegrityError
. - Added Python 2.4 compatibility.
- Added Django 1.1 compatibility.