#36307: Support passing depth to naturaltime, timesince and timeuntil filters -------------------------------------+------------------------------------- Reporter: Giannis Terzopoulos | Owner: Giannis | Terzopoulos Type: New feature | Status: assigned Component: Template system | Version: dev Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Comment (by blighj):
This is less simple than it appears at first. The timesince and timeuntil filters can already take an optional argument, a variable containing the date to use as the comparison point. Since filters can only take one optional argument there is no room for depth. I've thought about overloading it, but I've concluded it's a bad thing to do. If people need this functionality in their projects, I think it is okay that they can create their own simple_tag for the job. The naturaltime filter does not have any arguments, you could add it there, but the justification Sarah used about timesince and timeuntil functions being updated is a little more of a stretch if it is only this filter from humanize that is being updated. I'd suggest this should be changed to wontfix. -- Ticket URL: <https://code.djangoproject.com/ticket/36307#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/django-updates/0107019755ab603c-7e0276a2-a3b7-4f96-a05b-8409fe2dfb91-000000%40eu-central-1.amazonses.com.