Hello, Am 03.04.19 um 21:28 schrieb Mohammad Etemaddar: > Set default value: > year = forms.ChoiceField(required=False, choices=[(j, j) for j in range(2018, > 2021)], default=2019)
Thanks for your reply, but unfortunately, `default` is a keyword for model fields only, not for form fields: TypeError: __init__() got an unexpected keyword argument 'default' Best regards, Carsten -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/666f4ad3-cc32-ce9d-7a21-d860223ba2a9%40cafu.de. For more options, visit https://groups.google.com/d/optout.