#21798: Model validation should complain if both `add_now` and `auto_add_now` 
are
specified.
-------------------------------------+-------------------------------------
     Reporter:  charettes            |                    Owner:  anonymous
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |                  Version:  master
    Component:  Database layer       |               Resolution:
  (models, ORM)                      |             Triage Stage:  Accepted
     Severity:  Normal               |      Needs documentation:  1
     Keywords:                       |  Patch needs improvement:  0
    Has patch:  0                    |                    UI/UX:  0
  Needs tests:  1                    |
Easy pickings:  1                    |
-------------------------------------+-------------------------------------

Comment (by erikr):

 Well, the decision of which option is enabled has already been made
 implicitly by the code. If one sets both `auto_now_add` and `auto_now`,
 the behaviour is identical to only providing `auto_now`. The warning could
 indicate that. I'm sure a similar deterministic precedence is present for
 `default`.

 The warning could be something along the lines of (not polished): `The
 combining of auto_now, auto_now_add and/or default paramaters of a ..field
 is deprecated. X takes precedence over Y, which takes precedence over Z`.
 Note also that there are three fields that have these parameters:
 DateTimeField, DateField and TimeField, to my knowledge.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21798#comment:11>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.d6e7d546a43dc254071def13195170c1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to