Skip to content

Commit

Permalink
Merge pull request #787 from jazzband/test-documentation
Browse files Browse the repository at this point in the history
Prepare Django Taggit 2.1.0 Release
  • Loading branch information
rtpg committed Jan 24, 2022
2 parents 9d9ca4b + 148076e commit 5f3d0df
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ Changelog
(Unreleased)
~~~~~~~~~~~~

2.1.0 (2022-01-24)
~~~~~~~~~~~~~~~~~~

* Add Python 3.10 support.
* Add Django 4.0 support.
* Drop Django 3.1 support.


2.0.0 (2021-11-14)
~~~~~~~~~~~~~~~~~~

Expand Down
13 changes: 13 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ Frequently Asked Questions
- How can I use this with factory_boy?

Since these are all built off of many-to-many relationships, you can check out `factory_boy's documentation on this topic <https://factoryboy.readthedocs.io/en/stable/recipes.html#simple-many-to-many-relationship>`_ and get some ideas on how to deal with tags.


One way to handle this is with post-generation hooks::
class ProductFactory(DjangoModelFactory):
# Rest of the stuff

@post_generation
def tags(self, create, extracted, **kwargs):
if not create:
return

if extracted:
self.tags.add(*extracted)
2 changes: 1 addition & 1 deletion taggit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# setup.py and docs do not have Django installed.
django = None

VERSION = (2, 0, 0)
VERSION = (2, 1, 0)
__version__ = ".".join(str(i) for i in VERSION)

if django and django.VERSION < (3, 2):
Expand Down

0 comments on commit 5f3d0df

Please sign in to comment.