feat: remove format_date pipe

This commit is contained in:
Ayo Ayco 2024-05-02 14:17:51 +02:00
parent bbe2f41c5e
commit e6e5672a69
2 changed files with 2 additions and 7 deletions

View file

@ -253,7 +253,7 @@
</h3> </h3>
<div class="right_menu"> <div class="right_menu">
<a href="{{ thread.url }}" title="{{ thread.created_at | format_date }}">{{ thread.created_at | time_ago }}</a> &middot; <a href="{{ thread.url }}" title="{{ thread.created_at }}">{{ thread.created_at | time_ago }}</a> &middot;
<a href="{{ url_for('threads.thread', id=thread['id']) + '#' + thread['id'] }}">Anchor</a> <a href="{{ url_for('threads.thread', id=thread['id']) + '#' + thread['id'] }}">Anchor</a>
</div> </div>
</div> </div>
@ -325,7 +325,7 @@
</h3> </h3>
<div class="right_menu"> <div class="right_menu">
<a href="{{ descendant.url }}" title="{{ descendant.created_at | format_date }}">{{ descendant.created_at | time_ago }}</a> &middot; <a href="{{ descendant.url }}" title="{{ descendant.created_at }}">{{ descendant.created_at | time_ago }}</a> &middot;
<a href="{{ url_for('threads.thread', id=thread['id']) + '#' + descendant['id'] }}">Anchor</a> <a href="{{ url_for('threads.thread', id=thread['id']) + '#' + descendant['id'] }}">Anchor</a>
</div> </div>
</div> </div>

View file

@ -49,11 +49,6 @@ def time_ago(date):
return str(weeks) + ' weeks ago' return str(weeks) + ' weeks ago'
return date_obj.strftime('%b %d, %Y') return date_obj.strftime('%b %d, %Y')
@threads.app_template_filter('format_date')
def format_date(date):
return date.replace('T', ' ').split('.')[0]
@threads.route('/') @threads.route('/')
def home(): def home():
statuses = fetch_statuses() statuses = fetch_statuses()