Ok,
I've made some changes and now I'm able to add styles in the admin.
However, it required me to change change a django file that I'm not
sure I should change.  Here is what i changed.

In c:\Python24\lib\site-packages\django\db\models\fields\__init__.py
and changed the method 'flatten_data(self, follow, obj=None):'.  I
changed the following line of code from:

return {self.attname: (val is not None and val.strftime("%Y-%m-%d") or
'')}

to

return {self.attname: (val is not None or '')}

/////////

That seems to fix the problem.  Is the code that I took needed there
for a reason?  Will this changed have an effect on how other areas of
my application work?

Thanks


On Oct 12, 5:34 pm, Greg <[EMAIL PROTECTED]> wrote:
> Hello,
> I just added the following field to my Style class:
>
> newrugs = models.DateField(auto_now_add=True)
>
> Now, when I try to view my Style objects in the admin I get the
> following error:
>
> AttributeError at /admin/plush/style/5/
> 'unicode' object has no attribute 'strftime'
>
> ////////////////////
>
> Any suggestions on what's causing this?


--~--~---------~--~----~------------~-------~--~----~
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