{{{
class User(AbstractUser):
database = models.CharField(max_length=20)
REQUIRED_FIELDS = ['database']
}}}
When we run `python manage.py createsuperuser`, we will get this error:
`argparse.ArgumentError: argument --database: conflicting option string:
--database`.
Because of `createsuperuser` adds a `--database` option by default and
also `database` is a required field of `User` model and command tries to
add `--database` again.
Possible solution: add a prefix to fields which already added by
`createsupperuser`.
--
Ticket URL: <https://code.djangoproject.com/ticket/30640>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Hasan Ramezani
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30640#comment:1>
* status: assigned => closed
* version: 2.2 => master
* resolution: => wontfix
Comment:
Thanks for the report, however even with a prefix we can encounter
conflicts. I don't think that we should change this, user can always use
`DJANGO_SUPERUSER_DATABASE` environment variable.
--
Ticket URL: <https://code.djangoproject.com/ticket/30640#comment:2>