Code

Ticket #17504: patch.diff

File patch.diff, 687 bytes (added by karthikabinav, 2 years ago)

Replaced with the last occurence of @ symbol

Line 
1Index: django/contrib/auth/models.py
2===================================================================
3--- django/contrib/auth/models.py       (revision 17411)
4+++ django/contrib/auth/models.py       (working copy)
5@@ -121,12 +121,11 @@
6         Creates and saves a User with the given username, email and password.
7         """
8         now = timezone.now()
9-
10         # Normalize the address by lowercasing the domain part of the email
11         # address.
12         email = email or ''
13         try:
14-            email_name, domain_part = email.strip().split('@', 1)
15+            email_name, domain_part = email.strip().rsplit('@', 1)
16         except ValueError:
17             pass
18         else: