#34360: Django development server doesn't reload on TypeError of a CharField
-------------------------------------+-------------------------------------
Reporter: dimyG | Owner: nobody
Type: Bug | Status: new
Component: Database | Version: 4.1
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
If you add "required=True" in the tier CharField below, a TypeError
exception is raised and development server doesn't reload.
Maybe this is related with https://code.djangoproject.com/ticket/30500
{{{
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.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701867397643b-4078be2c-6925-439f-b23a-6d9b04c2cc1a-000000%40eu-central-1.amazonses.com.