yourlabs / django-autocomplete-light

A fresh approach to autocomplete implementations, specially for Django. Status: v4 alpha, v3 stable, v2 & v1 deprecated.
https://django-autocomplete-light.readthedocs.io
MIT License
1.8k stars 467 forks source link

Update taggit.rst docs. #1336

Closed voberoi closed 1 year ago

voberoi commented 1 year ago

Hi! I ran into this issue and figured out a fix. Maybe this is not the correct change to make or document -- if it isn't, please let me know how to address this in my app + I'd be happy to update the PR to address the underlying code instead if that's the issue.


For taggit the create option is broken, and it is unnecessary.

One of the drop down options includes the new tag. So if you've typed funny and funny does not exist you'll have:

funny
Create 'funny'

Picking funny works as intended -- it creates a new tag properly.

Picking Create 'funny' creates two tags and labels them wonkily.

This change removes the create option entirely from the docs so this works out of the box for end-users.

voberoi commented 1 year ago

Seems like there was an issue in 2020 but it manifested itself differently: https://github.com/yourlabs/django-autocomplete-light/issues/1133

In my case, the creation event creates two tags, and the one that ends up being displayed contains a tag ID in the name. I haven't made any changes to my implementation and have done what's in the docs verbatim.

There's also comment in that issue that states the create option probably isn't necessary for taggit.

jpic commented 1 year ago

Great! Thanks a heap!

jpic commented 1 year ago

Please try 3.10.0-rc3 and let me know if it works for you