Opened 33 hours ago

Closed 13 hours ago

Last modified 13 hours ago

#36669 closed Cleanup/optimization (fixed)

Document `Negative indexing is not supported` for slicing F() expressions

Reported by: AJ Collins Owned by: AJ Collins
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: AJ Collins Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by AJ Collins)

I was planning to use F() expression slicing to take off the last character of a field. I was met with ValueError: Negative indexing is not supported.

I'd like to update the docs for https://docs.djangoproject.com/en/6.0/ref/models/expressions/#slicing-f-expressions

https://github.com/django/django/pull/19969

Change History (5)

comment:1 by AJ Collins, 33 hours ago

Description: modified (diff)

comment:2 by Jacob Walls, 33 hours ago

Owner: set to AJ Collins
Status: newassigned
Triage Stage: UnreviewedReady for checkin
Version: 5.2dev

comment:3 by GitHub <noreply@…>, 13 hours ago

Resolution: fixed
Status: assignedclosed

In f715bc8:

Fixed #36669 -- Doc'd that negative indexes are not supported in F() slices.

comment:4 by Jacob Walls <jacobtylerwalls@…>, 13 hours ago

In fa772f4:

[6.0.x] Fixed #36669 -- Doc'd that negative indexes are not supported in F() slices.

Backport of f715bc8990b5b8a1df948c2b71e8edbdda47e7db from main.

comment:5 by Jacob Walls <jacobtylerwalls@…>, 13 hours ago

In 83f6fe81:

[5.2.x] Fixed #36669 -- Doc'd that negative indexes are not supported in F() slices.

Backport of f715bc8990b5b8a1df948c2b71e8edbdda47e7db from main.

Note: See TracTickets for help on using tickets.
Back to Top