On 7/30/07, Greg <[EMAIL PROTECTED]> wrote: > > Ok, > I just added a Field in my Orders class. It looks like this: ... > Do I need to put something into my timestamp field when I create the > Orders instance? For example:
Yes; your field is a required field, so you will need to provide timestamp data. DateFields store their data in datatime format; so you will need to do something like: >>> from datetime import datetime >>> o.timestamp = datetime(2007,7,30) To assist with form handling, Django also allows string inputs to date fields: >>> o.timestamp = "2007-07-30" > I would like to be able to create the current date when I' working > with the Orders instance (o.timestamp) For this one, try: >>> o.timestamp = datetime.now() Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---