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

Remove custom IntegerConverter #438

Open
lukasjuhrich opened this issue Jun 2, 2022 · 1 comment
Open

Remove custom IntegerConverter #438

lukasjuhrich opened this issue Jun 2, 2022 · 1 comment

Comments

@lukasjuhrich
Copy link
Collaborator

lukasjuhrich commented Jun 2, 2022

Werkzeug now supports signed values viasigned=True for its IntegerConverter, so the workaround introduced in ea9bbc2 is unnecessary.

Relevant lines:

sipa/sipa/base.py

Lines 19 to 27 in 1d5547b

class IntegerConverter(BaseIntegerConverter):
"""IntegerConverter supporting negative values
This is a Modification of the standard IntegerConverter which does
not support negative values. See the corresponding `werkzeug
documentation
<http://werkzeug.pocoo.org/docs/0.10/routing/#werkzeug.routing.IntegerConverter>`_.
"""
regex = r'-?\d+'

app.url_map.converters['int'] = IntegerConverter

@lukasjuhrich
Copy link
Collaborator Author

It has been introduced to support negative values in query parameters, more specifically, to make an URL like https://agdsn.de/sipa/news/?start=-2&end=-1 work.

@FestplattenSchnitzel FestplattenSchnitzel changed the title Remove custom IntegerContverter Remove custom IntegerConverter Feb 5, 2024
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

1 participant