diff --git a/brutaldon/templates/main/fav.html b/brutaldon/templates/main/fav.html
new file mode 100644
index 0000000..d60792b
--- /dev/null
+++ b/brutaldon/templates/main/fav.html
@@ -0,0 +1,31 @@
+{% extends "base.html" %}
+
+{% block title %} Brutaldon - confirm favorite {% endblock %}
+
+{% block content %}
+ {% if toot.favourited %}
+
Unfav that toot?
+ {% else %}
+ Fav that toot?
+ {% endif %}
+
+
+ {% include "main/toot_partial.html" with toot=toot %}
+
+
+{% endblock %}
diff --git a/brutaldon/templates/main/toot_partial.html b/brutaldon/templates/main/toot_partial.html
index 214a27e..0e5ac09 100644
--- a/brutaldon/templates/main/toot_partial.html
+++ b/brutaldon/templates/main/toot_partial.html
@@ -73,10 +73,16 @@
Boost
-
-
- Favorite
-
+
+
+ {% if toot.favourited %}
+
+ {% else %}
+
+ {% endif %}
+ Favorite
+
+
diff --git a/brutaldon/urls.py b/brutaldon/urls.py
index 5dfad68..c3277c7 100644
--- a/brutaldon/urls.py
+++ b/brutaldon/urls.py
@@ -30,5 +30,6 @@ urlpatterns = [
path('thread/', views.thread, name='thread'),
path('toot', views.toot, name="toot"),
path('reply/', views.reply, name='reply'),
+ path('fav/', views.fav, name='fav'),
path('', views.home),
]
diff --git a/brutaldon/views.py b/brutaldon/views.py
index b916d9c..1da6cac 100644
--- a/brutaldon/views.py
+++ b/brutaldon/views.py
@@ -194,3 +194,15 @@ def reply(request, id):
'fullbrutalism': fullbrutalism_p(request)})
else:
return redirect(reply, id)
+
+def fav(request, id):
+ mastodon = get_mastodon(request)
+ toot = mastodon.status(id)
+ if request.method == 'POST':
+ if toot.favourited:
+ mastodon.status_unfavourite(id)
+ else:
+ mastodon.status_favourite(id)
+ return redirect(thread, id)
+ else:
+ return render(request, 'main/fav.html', {"toot": toot})