Changes between Version 1 and Version 2 of Ticket #25009, comment 2
- Timestamp:
- Jun 19, 2015, 6:10:37 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25009, comment 2
v1 v2 10 10 extra_fields.setdefault('is_staff', True) 11 11 extra_fields.setdefault('is_superuser', True) 12 if extra_fields.get('is_staff') is False:12 if not extra_fields.get('is_staff'): 13 13 raise ValueError('Superuser needs to be staff. Do not set is_staff.') 14 if extra_fields.get('is_superuser') is False:14 if not extra_fields.get('is_superuser'): 15 15 raise ValueError('Superuser needs to be superuser. Do not set is_superuser.') 16 17 16 return self._create_user(username, email, password, **extra_fields) 18 17 }}}