Opened 7 years ago
Closed 7 years ago
#29143 closed Bug (invalid)
IntConverter does not accept negative integers
Reported by: | Ashish Nitin Patil | Owned by: | |
---|---|---|---|
Component: | Core (URLs) | Version: | 2.0 |
Severity: | Normal | Keywords: | IntConverter, url, path |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Paths like
'/int/<int:integer>/'
do not accept negative integers, i.e.
'/int/-2/'
fails with a 404, which it should not (since -2 is an integer).
PS - Attributed to this StackOverflow question for discovery and potential fix : https://stackoverflow.com/questions/48867977/django-2-url-path-matching-negative-value
Attachments (1)
Change History (4)
by , 7 years ago
Attachment: | NegativeIntConverter.patch added |
---|
comment:1 by , 7 years ago
Owner: | changed from | to
---|
comment:2 by , 7 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:3 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This is intended behavior consistent with the documentation, "Matches zero or any positive integer".