#26481 - Add a "strict mode" for defer()/only()

104 views
Skip to first unread message

Fabien Schwob

unread,
Apr 22, 2016, 7:07:07 AM4/22/16
to django-d...@googlegroups.com
Hello,

I would like to try to work on the #26481 ticket, and I'm new to the inner workings of Django, but I thinks it's the best way to learn more about it.

Several enhancements / modifications are related to this ticket :

* The first one is adding a strict argument to only() that will raise an AttributeError.
* The second one is adding option to the DATABASES settings to enable logging/warning (Maybe something like DATABASES[]['STRICT_DEFER_ALERT']). Or maybe using the -W option of Python.

I would like to have opinions about the best API to implement, and to know if nobody is already working on this ticket.

Thanks.

Tim Graham

unread,
Apr 26, 2016, 8:26:45 PM4/26/16
to Django developers (Contributions to Django itself)
I guess there's some question about whether or not we need to make changes in Django given Anssi's comment, "Overriding Model.refresh_from_db() allows raising failure when deferred field is accessed - is this enough for you use case?"

Fabien Schwob

unread,
May 2, 2016, 2:35:01 AM5/2/16
to django-d...@googlegroups.com
I understand, but it's maybe hard to be aware of this solution. Maybe it's just something that can be raised in the documentation ?

--
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 django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
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/4b7a45c8-5fae-46f7-a8c6-866d7f8f6939%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages