On Friday 26 May 2006 14:34, tsnyder wrote:
> Hi all,
>
> I'd like to add a "last modified on" bit to one of the pages generated by
> django.  I have noticed that the admin app keeps track of all the changes
> that are made.  Is it possible to access that information and display it on
> one of my pages?
>
> Thanks,
>
> Tamara

Hi Tamara,

I was wondering this the other day.  I just tried it and the following worked 
for me (from the python command line):

cd /path/to/project/dir
python manage.py shell

from django.contrib.admin.models import LogEntry
logs = LogEntry.objects.all()
len(logs)
dir(logs[0])
logs[0].__dict__
logs[0].action_time
logs[0].action_time.strftime('%Y-%M-%d')


Have fun!

Eric.

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

Reply via email to