diff --git a/brutaldon/templates/filters/create.html b/brutaldon/templates/filters/create.html new file mode 100644 index 0000000..c77a68c --- /dev/null +++ b/brutaldon/templates/filters/create.html @@ -0,0 +1,78 @@ +{% extends "base.html" %} +{% load widget_tweaks %} + +{% block content %} + +
+

Create Filter

+ +
+ {% csrf_token %} + +
+ {{ form.non_field_errors }} +
+ +
+ +
+ {% render_field form.phrase class+="input" %} +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ {% render_field form.expires_in class+="select" %} + + + +
+
+
+ +
+ +
+ +
+
+ + +{% endblock %} diff --git a/brutaldon/views.py b/brutaldon/views.py index 05cef2c..5d7a67a 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -979,16 +979,17 @@ def create_filter(request): if form.is_valid(): contexts = [] if form.cleaned_data['context_home']: - contexts += 'home' + contexts.append('home') if form.cleaned_data['context_public']: - contexts += 'public' + contexts.append('public') if form.cleaned_data['context_notes']: - contexts += 'notifications' + contexts.append('notifications') if form.cleaned_data['context_thread']: - contexts += 'thread' + contexts.append('thread') expires = form.cleaned_data['expires_in'] if expires == "": expires = None + set_trace() mastodon.filter_create(form.cleaned_data['phrase'], contexts, whole_word=form.cleaned_data['whole_word'],