Commit 50e66336 by Bach Dániel

one: fix |timeuntil in mails/notification-*.txt

parent 9cbc7776
......@@ -38,7 +38,8 @@ class Job(HourlyJob):
pass
# print u'%s delete: %s' % (i.name, i.time_of_delete)
delete = i.time_of_delete.replace(minute=0, second=0, microsecond=0)
continue
if not settings.DELETE_VM:
continue
if i.time_of_delete < now:
msg = render_to_string('mails/notification-delete-now.txt',
{ 'user': i.owner, 'instance': i, 'url': url, 'site': site } )
......
......@@ -3,7 +3,7 @@
{% block body %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_delete time=exp|timeuntil %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_delete time=instance.time_of_delete|timeuntil %}
Your {{state}} virtual machine "{{vm}}" is going to be DELETED
at {{date}} (in {{time}}).
{% endblocktrans %}
......
......@@ -3,7 +3,7 @@
{% block body %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_suspend time=exp|timeuntil url=url %}
{% blocktrans with vm=instance.name state=instance.state|lower date=instance.time_of_suspend time=instance.time_of_suspend|timeuntil url=url %}
Your {{state}} virtual machine "{{vm}}" is going to be STOPPED
at {{date}} (in {{time}}).
{% endblocktrans %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment