Re: Using edit_inline DateField is not showing up
On Thu, 2007-10-25 at 11:07 -0700, ZebZiggle wrote: > Thanks Karen ... do you of a way to override this behavior? > > I can think of many situations where you would want to be able to > modify it. auto_now and auto_now_add *always* set the automatic value, they don't supply default values you can override (this is documented). If you want more fine-grained control, use the default attribute (which you can also set to datetime.datetime.now) on the field. Regards, Malcolm -- If Barbie is so popular, why do you have to buy her friends? http://www.pointy-stick.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Using edit_inline DateField is not showing up
Thanks Karen ... do you of a way to override this behavior? I can think of many situations where you would want to be able to modify it. -Z --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Using edit_inline DateField is not showing up
Specifying auto_add_now=True makes the field non-editable. Therefore the admin won't include it in the fields on a change page or in an edit-inline section. Karen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Using edit_inline DateField is not showing up
I'm having the same/similar problem. I have a field created = models.DateTimeField(auto_now_add = True) which doesn't show up in the admin interface, but everything else does ... including other datetime fields (just not auto_add_now). The field exists in the database, is used and getting populated correctly. Strange. -Z --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Using edit_inline DateField is not showing up
Hello, I have a table called Orders. Which stores information about each order that I get. It also has the ability to send email's to the customer's email address. I also have another table called EmailSent that store information about each email that I send through the admin. My EmailSent class has a ForeignKey to Orders class which also has edit_inline. So when i look at an order I'm able to see all the emails that I've sent tied to that order. I have a coulumn in EmailSent that looks like this: thetime = models.DateField(auto_now_add=True) This does not show up when I look at the emails tied to an order. I'm able to see all my other fields in the EmailSent class. Anybody have any suggestions? Below is my code: class EmailSent(models.Model): type = models.CharField(maxlength=100, core=True) message = models.TextField("Message", maxlength=1000) thetime = models.DateField(auto_now_add=True) order = models.ForeignKey(Orders, edit_inline=models.TABULAR) / This is my code from within my save method of my orders class def save(self): message = '' if self.send_email <> "": o = EmailSent() o.type = type o.message = message o.order = self.id o.save() super(Orders, self).save() /// Thanks for any help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---