Russ,
I tried including the code that you recommended.  However, I'm still
getting the same error:

AttributeError at /admin/rugs/orders/1/
'unicode' object has no attribute 'strftime'

///////////////

I updated my view to include the following lines:

from datetime import datetime
...
o.timestamp = datetime.now()

////

When I drill down on the order from within my admin I still get the
error listed above.

Thanks

On Jul 29, 7:45 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to