Please don't do this.

There are very good reasons for NOT including blank=False fields by default
such as batch-editing some field with a formset or inlineformset or just
offering different forms to users with different access levels (as Tobias
wrote).

Django started recommending using `fields` instead of `exclude` with good
reasons. Why push people towards `exclude` again now? I think we should
instead trust developers who specify `fields` that those actually are the
fields they want in the form. Using `fields` *is* explicit already.

If it is hard to put this behavior into a base form class in your own
project and use this base class everywhere then that would be a good reason
to consider changing a thing or two in Django.

Thanks,
m.

On Wed, Apr 17, 2019 at 3:14 AM Will Gordon <[email protected]> wrote:

> Would it be weird to just make it so that the "required" field *must* be
> present in exclude? This way, if you *accidentally* leave off a required
> field, you're quickly notified about it....but if you explicitly mark it as
> something to exclude, it makes it clear to everyone exactly what you're
> trying to do? The whole "explicit is better than implicit" and what not.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/c0b7e5d5-f422-42be-ace8-c0201a2f79a7%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/c0b7e5d5-f422-42be-ace8-c0201a2f79a7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
www.feinheit.ch — [email protected] — +41 555 11 11 41

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANvPqgDoTQoh1WDzNXaj1Ob%2BOV-pG8CxugQhwumuZQ_VQLPnzA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to