-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
Tags longer than 100 chars raise 500 error #872
Comments
@halitcelik are you also getting this error working off your development server? |
@Temidayo32 I saw the discussions in wagtail issues. So, maybe we can discuss possible solutions. I'm happy to help if I can. |
@halitcelik I would be interested in that |
@Temidayo32 I'm already halfway through for a PR. It would be good to get the opinion of the maintainer. |
@halitcelik Great! |
@halitcelik I made a pull request that resolves this in Wagtail. Hopefully, it get merged! |
@halitcelik this is a bit tricky, because the max length in What I think would be good is the following:
This would make the field work "as expected" out of the box, and offer a straightforward way forward for people upgrading in existing setups. Tell me if you're up for the PR! If you have a WIP set of changes, just pushing that up is also fine (I can make any final changes to get it to work if you want) |
@rtpg Thanks a lot. I'll create a PR. I thought this would not break the existing setups because we already have a database validation for 100 max length. |
@rtpg You mentioned:
What do you mean, it's not accessible? Can't we do this? Then no need to worry about |
@BertrandBordage well, you can customize the through model in This is one of those things where I wouldn't be surprised if nobody is actually in this scenario, but I would also not be surprised if someone was in this scenario, so I like a PR that handles both cases. Having said that.... I dunno, maybe that's a bit too wild of a concept |
@rtpg I see, if you override |
And in the doc, we would mention the need to fill |
Same issue here with drf: class BlogSerializer(TaggitSerializer, serializers.ModelSerializer):
tags = TagListSerializerField()
class Meta:
model = Blog
fields = (
"tags",
) and when i try to add one tag with more that 100 character:
|
i want to solve this issue , if this issue is still open @Temidayo32 and if possible kindly gave me required information to solve this issue |
In wagtail admin where
django-taggit
is being used for documents this error happens. It is mentioned in this wagtail issue. Locally I could fix the issue changing these lines to:I am not sure if this is the correct way to fix it. Please let me know if it is I can create a PR.
The text was updated successfully, but these errors were encountered: