I need to be able to limit the ability to delete a record after it's been in
the system for X days.  Any ideas on how to approach that?

Basically I have a ticket system in Django, all works well with
add/edit/update/delete type functions.  But for our need I want our users to
be able to entree a ticket, then have a couple of days where they can delete
that ticket.  But once it's been in the system for a few days I need to
remove their ability to delete that ticket.

There is the view logic and template logic to deal with.  I know in the view
I can code in a conditional delete statement, but I'm not sure how to do
that inside the template.  From what I've seen and tried with the various
template filters I can't make it work correctly.

Ideally I'd like something like

{% if form.entered <= date -3 %}
  HTML Delete button
{% endif %}

But I'm not sure how I can make that happen.  Thanks for any suggestions,
this has been stumping me for over a week now.


-- 
Keith Pettit

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to