mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Refs #34233 -- Used str.removeprefix()/removesuffix().
This commit is contained in:
parent
fd21f82aa8
commit
23e8868862
30 changed files with 42 additions and 53 deletions
|
|
@ -312,7 +312,7 @@ would override ``get_lookup`` with something like::
|
|||
def get_lookup(self, lookup_name):
|
||||
if lookup_name.startswith('x'):
|
||||
try:
|
||||
dimension = int(lookup_name[1:])
|
||||
dimension = int(lookup_name.removeprefix("x"))
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue