mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +00:00
Refs #30116 -- Simplified regex match group access with Match.__getitem__().
The method has been available since Python 3.6. The shorter syntax is also marginally faster.
This commit is contained in:
parent
23f6fbdd93
commit
d6aff369ad
36 changed files with 92 additions and 92 deletions
|
|
@ -9,7 +9,7 @@ from django.test import Client
|
|||
def extract_token_from_url(url):
|
||||
token_search = re.search(r'/reset/.*/(.+?)/', url)
|
||||
if token_search:
|
||||
return token_search.group(1)
|
||||
return token_search[1]
|
||||
|
||||
|
||||
class PasswordResetConfirmClient(Client):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue