{{{
class User(AbstractUser):
tier_choices = (
(Tiers.free, 'Free'),
(Tiers.basic, 'Basic'),
(Tiers.premium, 'Premium'),
)
tier = models.CharField(max_length=10, choices=tier_choices,
default=Tiers.free, required=True)
}}}
{{{
File "d:\Projects_D\web_ai\auth\auth_src\auth_app\models.py", line 9, in
<module>
class User(AbstractUser):
File "d:\Projects_D\web_ai\auth\auth_src\auth_app\models.py", line 16,
in User
tier = models.CharField(max_length=10, choices=tier_choices,
default='free', required=True)
File "d:\Projects_D\web_ai\auth\py3107\lib\site-
packages\django\db\models\fields\__init__.py", line 1121, in __init__
super().__init__(*args, **kwargs)
TypeError: Field.__init__() got an unexpected keyword argument 'required'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34360>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => duplicate
Comment:
Duplicate of #5245, see
[https://code.djangoproject.com/ticket/5245#comment:14 comment].
--
Ticket URL: <https://code.djangoproject.com/ticket/34360#comment:1>