#23816: Ability to defer model field by default
-------------------------------------+-------------------------------------
     Reporter:  rcoup                |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by dfunckt):

 I'm inclined to have a go at this. Here's how I envision it:

 {{{
 class Post(models.Model):
     body_text = models.TextField()
     body_html = models.TextField(blank=True)

     class Meta:
         initially_deferred_fields = ('body_text', 'body_html')
 }}}


 Some thoughts:

 - Not sure about the name of the meta attribute, it requires almost as
 much effort to get the spelling right as creating a custom manager, but
 I'd like to avoid naming it `defer` or `deferred_fields`. I'd like input
 on this, but it's not pressing.
 - The patch author should be aware of the model meta refactor, perhaps
 beginning work after it lands?

--
Ticket URL: <https://code.djangoproject.com/ticket/23816#comment:5>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.f9abc26eeb5a67e1b1d221a149fac800%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to