#1030: auto_now_add is broken for edit_inline field
------------------------+---------------------------------------------------
   Reporter:  titoo     |                Owner:  adrian         
     Status:  reopened  |            Component:  Admin interface
    Version:  SVN       |           Resolution:                 
   Keywords:            |                Stage:  Accepted       
  Has_patch:  1         |           Needs_docs:  0              
Needs_tests:  1         |   Needs_better_patch:  1              
------------------------+---------------------------------------------------
Comment (by anonymous):

 Looked in django/db/models/fields/__init__.py and saw that DateField has
 the following get_follow() method:
 
 {{{
     # Needed because of horrible auto_now[_add] behaviour wrt. editable
     def get_follow(self, override=None):
         if override != None:
             return override
         else:
             return self.editable or self.auto_now or self.auto_now_add
 }}}
 
 BUT, DateTimeField has the following get_follow() instead:
 
 {{{
     def get_follow(self, override=None):
         if override != None:
             return override
         else:
             return self.editable
 }}}
 
 Shouldn't they be the same? I have DateTimeFields with auto_add_now and
 they are causing the same problem described.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/1030#comment:24>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to