Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for new async api #865

Open
rasca opened this issue Jul 31, 2023 · 1 comment
Open

Add support for new async api #865

rasca opened this issue Jul 31, 2023 · 1 comment

Comments

@rasca
Copy link

rasca commented Jul 31, 2023

Django 4.2 added support for async m2m manipulation directly via aadd, aset, aclear, aremove`. Since taggit is based in that API it would be nice to also support it.

For now we can just:

from channels.db import database_sync_to_async

[...]

await database_sync_to_async(mymodel.tags.add)('mytag')
@rtpg
Copy link
Contributor

rtpg commented Sep 20, 2023

Not sure what we need to do exactly here, I would hope that models.Manager would get us this "for free", but seems like it might not. We'll likely need to do some work to add some tests on this front as well. Bit of a chill weekend commit, probably!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants