Skip to content
Snippets Groups Projects
Commit c4b7e0fa authored by Vaibhav Mule's avatar Vaibhav Mule Committed by Fredrik Jonsson
Browse files

remove propert and use template based dateformat

parent cc166072
No related branches found
No related tags found
No related merge requests found
...@@ -49,10 +49,6 @@ class Reminder(models.Model): ...@@ -49,10 +49,6 @@ class Reminder(models.Model):
def is_expired(self): def is_expired(self):
return timezone.now() > self.time return timezone.now() > self.time
@property
def time_with_format(self):
return self.time.strftime('%Y-%m-%d %I:%M %p')
@property @property
def action_message(self): def action_message(self):
return self.ACTION_MESSAGE[f'{self.action}-{self.medium}'] return self.ACTION_MESSAGE[f'{self.action}-{self.medium}']
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
{% regroup object.reminders.all by get_action_display as action_list %} {% regroup object.reminders.all by get_action_display as action_list %}
<ul> <ul>
{% for action in action_list %} {% for action in action_list %}
<li><strong>{{action.grouper}}</strong> <li><strong>{{ action.grouper }}</strong>
<ul> <ul>
{% for reminder in action.list %} {% for reminder in action.list %}
<li class="{% if reminder.is_expired %}expired-reminder{% endif %}"> <li class="{% if reminder.is_expired %}expired-reminder{% endif %}">
{{reminder.time_with_format}} {{ reminder.time|date:"SHORT_DATETIME_FORMAT" }}
<a class="link" href="{% url 'funds:submissions:reminders:delete' object.id reminder.id %}"> <a class="link" href="{% url 'funds:submissions:reminders:delete' object.id reminder.id %}">
<svg class="icon icon--delete"><use xlink:href="#delete"></use></svg> <svg class="icon icon--delete"><use xlink:href="#delete"></use></svg>
</a> </a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment