Write a method is_modified in your Post model.
You can use datetime.timedelta to compare dates.

def is_modified(self):
   second = datetime.timedelta(seconds=1)
   delta = self.last_modified - self.created
   return delta >= second

Then use it in your template :

{% if post.is_modified %}
{{ ... }}
{% endif %}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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