#19113: usermanager in new user auth produces error --------------------------------------+-------------------- Reporter: anonymous | Owner: nobody Type: Cleanup/optimization | Status: new Component: Documentation | Version: 1.4 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------+-------------------- def create_superuser(self, username, date_of_birth, password): """ Creates and saves a superuser with the given email, date of birth and password. """ user = self.create_user(username, password=password, date_of_birth=date_of_birth ) user.is_admin = True user.save(using=self._db) return user
The above code is example but in the model it specifies only email and not username, and so produces a type error - TypeError: create_superuser() got an unexpected keyword argument 'username' This is for version 1.5 and not 1.4 as it says below. -- Ticket URL: <https://code.djangoproject.com/ticket/19113> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.