We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
#6460 Previous/Next Button Poll Request Results no backround color
**URL:** https://meinberlin-dev.liqd.net/projekte/test-poll-merge-running-poll-with-user-content/
**user:** any
**expected behaviour:** Previous/Next button on the poll request results has a pink background.
**behaviour:** Button has no background. Only the outlines turn pink when the button is clicked
**important screensize:**
**device & browser:** 
**Comment/Question:** 

Screenshot?

dev:
<img width="286" alt="Bildschirmfoto 2022-11-09 um 05 38 05" src="https://user-images.githubusercontent.com/113356258/200740386-60d26bc2-f169-40e4-9730-79d6d8724dad.png">
<img width="220" alt="Bildschirmfoto 2022-11-09 um 05 40 30" src="https://user-images.githubusercontent.com/113356258/200740411-e40f6bf6-83ba-468f-a941-93bbfe045993.png">

stage:

<img width="189" alt="Bildschirmfoto 2022-11-09 um 05 44 21" src="https://user-images.githubusercontent.com/113356258/200740726-f116d498-cb19-4074-bd57-541f7d5d8d2a.png">


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `meinberlin/apps/ideas/views.py`
Content:
```
1 from django.contrib import messages
2 from django.db import transaction
3 from django.urls import reverse
4 from django.utils.translation import gettext_lazy as _
5 from django.views import generic
6 
7 from adhocracy4.categories import filters as category_filters
8 from adhocracy4.exports.views import DashboardExportView
9 from adhocracy4.filters import filters as a4_filters
10 from adhocracy4.filters import views as filter_views
11 from adhocracy4.filters import widgets as filters_widgets
12 from adhocracy4.filters.filters import FreeTextFilter
13 from adhocracy4.labels import filters as label_filters
14 from adhocracy4.projects.mixins import DisplayProjectOrModuleMixin
15 from adhocracy4.projects.mixins import ProjectMixin
16 from adhocracy4.rules import mixins as rules_mixins
17 from meinberlin.apps.contrib import forms as contrib_forms
18 from meinberlin.apps.contrib.views import CanonicalURLDetailView
19 from meinberlin.apps.moderatorfeedback.forms import ModeratorStatementForm
20 from meinberlin.apps.moderatorfeedback.models import ModeratorStatement
21 from meinberlin.apps.notifications.emails import \
22     NotifyContactOnModeratorFeedback
23 from meinberlin.apps.notifications.emails import \
24     NotifyCreatorOnModeratorFeedback
25 
26 from . import forms
27 from . import models
28 
29 
30 class FreeTextFilterWidget(filters_widgets.FreeTextFilterWidget):
31     label = _('Search')
32 
33 
34 def get_ordering_choices(view):
35     choices = (('-created', _('Most recent')),)
36     if view.module.has_feature('rate', models.Idea):
37         choices += ('-positive_rating_count', _('Most popular')),
38     choices += ('-comment_count', _('Most commented')),
39     return choices
40 
41 
42 class IdeaFilterSet(a4_filters.DefaultsFilterSet):
43     defaults = {
44         'ordering': '-created'
45     }
46     category = category_filters.CategoryFilter()
47     labels = label_filters.LabelFilter()
48     ordering = a4_filters.DynamicChoicesOrderingFilter(
49         choices=get_ordering_choices
50     )
51     search = FreeTextFilter(
52         widget=FreeTextFilterWidget,
53         fields=['name']
54     )
55 
56     class Meta:
57         model = models.Idea
58         fields = ['search', 'labels', 'category']
59 
60 
61 class AbstractIdeaListView(ProjectMixin,
62                            filter_views.FilteredListView):
63     paginate_by = 15
64 
65 
66 class IdeaListView(AbstractIdeaListView,
67                    DisplayProjectOrModuleMixin
68                    ):
69     model = models.Idea
70     filter_set = IdeaFilterSet
71 
72     def get_queryset(self):
73         return super().get_queryset()\
74             .filter(module=self.module)
75 
76 
77 class AbstractIdeaDetailView(ProjectMixin,
78                              rules_mixins.PermissionRequiredMixin,
79                              CanonicalURLDetailView):
80     get_context_from_object = True
81 
82 
83 class IdeaDetailView(AbstractIdeaDetailView):
84     model = models.Idea
85     queryset = models.Idea.objects.annotate_positive_rating_count()\
86         .annotate_negative_rating_count()
87     permission_required = 'meinberlin_ideas.view_idea'
88 
89 
90 class AbstractIdeaCreateView(ProjectMixin,
91                              rules_mixins.PermissionRequiredMixin,
92                              generic.CreateView):
93     """Create an idea in the context of a module."""
94 
95     def get_permission_object(self, *args, **kwargs):
96         return self.module
97 
98     def form_valid(self, form):
99         form.instance.creator = self.request.user
100         form.instance.module = self.module
101         return super().form_valid(form)
102 
103     def get_form_kwargs(self):
104         kwargs = super().get_form_kwargs()
105         kwargs['module'] = self.module
106         if self.module.settings_instance:
107             kwargs['settings_instance'] = self.module.settings_instance
108         return kwargs
109 
110 
111 class IdeaCreateView(AbstractIdeaCreateView):
112     model = models.Idea
113     form_class = forms.IdeaForm
114     permission_required = 'meinberlin_ideas.add_idea'
115     template_name = 'meinberlin_ideas/idea_create_form.html'
116 
117 
118 class AbstractIdeaUpdateView(ProjectMixin,
119                              rules_mixins.PermissionRequiredMixin,
120                              generic.UpdateView):
121     get_context_from_object = True
122 
123     def get_form_kwargs(self):
124         kwargs = super().get_form_kwargs()
125         instance = kwargs.get('instance')
126         kwargs['module'] = instance.module
127         if instance.module.settings_instance:
128             kwargs['settings_instance'] = \
129                 instance.module.settings_instance
130         return kwargs
131 
132 
133 class IdeaUpdateView(AbstractIdeaUpdateView):
134     model = models.Idea
135     form_class = forms.IdeaForm
136     permission_required = 'meinberlin_ideas.change_idea'
137     template_name = 'meinberlin_ideas/idea_update_form.html'
138 
139 
140 class AbstractIdeaDeleteView(ProjectMixin,
141                              rules_mixins.PermissionRequiredMixin,
142                              generic.DeleteView):
143     get_context_from_object = True
144 
145     def get_success_url(self):
146         return reverse(
147             'project-detail', kwargs={'slug': self.project.slug})
148 
149     def delete(self, request, *args, **kwargs):
150         messages.success(self.request, self.success_message)
151         return super(AbstractIdeaDeleteView, self)\
152             .delete(request, *args, **kwargs)
153 
154 
155 class IdeaDeleteView(AbstractIdeaDeleteView):
156     model = models.Idea
157     success_message = _('Your Idea has been deleted')
158     permission_required = 'meinberlin_ideas.change_idea'
159     template_name = 'meinberlin_ideas/idea_confirm_delete.html'
160 
161 
162 class AbstractIdeaModerateView(
163         ProjectMixin,
164         rules_mixins.PermissionRequiredMixin,
165         generic.detail.SingleObjectMixin,
166         generic.detail.SingleObjectTemplateResponseMixin,
167         contrib_forms.BaseMultiModelFormView):
168 
169     get_context_from_object = True
170 
171     def __init__(self):
172         self.forms = {
173             'moderateable': {
174                 'model': self.model,
175                 'form_class': self.moderateable_form_class
176             },
177             'statement': {
178                 'model': ModeratorStatement,
179                 'form_class': ModeratorStatementForm
180             }
181         }
182 
183     def dispatch(self, *args, **kwargs):
184         self.object = self.get_object()
185         return super().dispatch(*args, **kwargs)
186 
187     def get_success_url(self):
188         return self.object.get_absolute_url()
189 
190     def forms_save(self, forms, commit=True):
191         objects = super().forms_save(forms, commit=False)
192         moderateable = objects['moderateable']
193         statement = objects['statement']
194 
195         if not statement.pk:
196             statement.creator = self.request.user
197 
198         with transaction.atomic():
199             statement.save()
200             moderateable.moderator_statement = statement
201             moderateable.save()
202             if hasattr(self.object, 'contact_email'):
203                 NotifyContactOnModeratorFeedback.send(self.object)
204             else:
205                 NotifyCreatorOnModeratorFeedback.send(self.object)
206         return objects
207 
208     def get_instance(self, name):
209         if name == 'moderateable':
210             return self.object
211         elif name == 'statement':
212             return self.object.moderator_statement
213 
214 
215 class IdeaModerateView(AbstractIdeaModerateView):
216     model = models.Idea
217     permission_required = 'meinberlin_ideas.moderate_idea'
218     template_name = 'meinberlin_ideas/idea_moderate_form.html'
219     moderateable_form_class = forms.IdeaModerateForm
220 
221 
222 class IdeaDashboardExportView(DashboardExportView):
223     template_name = 'a4exports/export_dashboard.html'
224 
225     def get_context_data(self, **kwargs):
226         context = super().get_context_data(**kwargs)
227         context['export'] = reverse(
228             'a4dashboard:idea-export',
229             kwargs={'module_slug': self.module.slug})
230         context['comment_export'] = reverse(
231             'a4dashboard:idea-comment-export',
232             kwargs={'module_slug': self.module.slug})
233         return context
234
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/meinberlin/apps/ideas/views.py b/meinberlin/apps/ideas/views.py
--- a/meinberlin/apps/ideas/views.py
+++ b/meinberlin/apps/ideas/views.py
@@ -55,7 +55,7 @@
 
     class Meta:
         model = models.Idea
-        fields = ['search', 'labels', 'category']
+        fields = ['search', 'category', 'labels']
 
 
 class AbstractIdeaListView(ProjectMixin,

{"golden_diff": "diff --git a/meinberlin/apps/ideas/views.py b/meinberlin/apps/ideas/views.py\n--- a/meinberlin/apps/ideas/views.py\n+++ b/meinberlin/apps/ideas/views.py\n@@ -55,7 +55,7 @@\n \n     class Meta:\n         model = models.Idea\n-        fields = ['search', 'labels', 'category']\n+        fields = ['search', 'category', 'labels']\n \n \n class AbstractIdeaListView(ProjectMixin,\n", "issue": "#6460 Previous/Next Button Poll Request Results no backround color\n**URL:** https://meinberlin-dev.liqd.net/projekte/test-poll-merge-running-poll-with-user-content/\r\n**user:** any\r\n**expected behaviour:** Previous/Next button on the poll request results has a pink background.\r\n**behaviour:** Button has no background. Only the outlines turn pink when the button is clicked\r\n**important screensize:**\r\n**device & browser:** \r\n**Comment/Question:** \r\n\r\nScreenshot?\r\n\r\ndev:\r\n<img width=\"286\" alt=\"Bildschirmfoto 2022-11-09 um 05 38 05\" src=\"https://user-images.githubusercontent.com/113356258/200740386-60d26bc2-f169-40e4-9730-79d6d8724dad.png\">\r\n<img width=\"220\" alt=\"Bildschirmfoto 2022-11-09 um 05 40 30\" src=\"https://user-images.githubusercontent.com/113356258/200740411-e40f6bf6-83ba-468f-a941-93bbfe045993.png\">\r\n\r\nstage:\r\n\r\n<img width=\"189\" alt=\"Bildschirmfoto 2022-11-09 um 05 44 21\" src=\"https://user-images.githubusercontent.com/113356258/200740726-f116d498-cb19-4074-bd57-541f7d5d8d2a.png\">\r\n\n", "before_files": [{"content": "from django.contrib import messages\nfrom django.db import transaction\nfrom django.urls import reverse\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import generic\n\nfrom adhocracy4.categories import filters as category_filters\nfrom adhocracy4.exports.views import DashboardExportView\nfrom adhocracy4.filters import filters as a4_filters\nfrom adhocracy4.filters import views as filter_views\nfrom adhocracy4.filters import widgets as filters_widgets\nfrom adhocracy4.filters.filters import FreeTextFilter\nfrom adhocracy4.labels import filters as label_filters\nfrom adhocracy4.projects.mixins import DisplayProjectOrModuleMixin\nfrom adhocracy4.projects.mixins import ProjectMixin\nfrom adhocracy4.rules import mixins as rules_mixins\nfrom meinberlin.apps.contrib import forms as contrib_forms\nfrom meinberlin.apps.contrib.views import CanonicalURLDetailView\nfrom meinberlin.apps.moderatorfeedback.forms import ModeratorStatementForm\nfrom meinberlin.apps.moderatorfeedback.models import ModeratorStatement\nfrom meinberlin.apps.notifications.emails import \\\n    NotifyContactOnModeratorFeedback\nfrom meinberlin.apps.notifications.emails import \\\n    NotifyCreatorOnModeratorFeedback\n\nfrom . import forms\nfrom . import models\n\n\nclass FreeTextFilterWidget(filters_widgets.FreeTextFilterWidget):\n    label = _('Search')\n\n\ndef get_ordering_choices(view):\n    choices = (('-created', _('Most recent')),)\n    if view.module.has_feature('rate', models.Idea):\n        choices += ('-positive_rating_count', _('Most popular')),\n    choices += ('-comment_count', _('Most commented')),\n    return choices\n\n\nclass IdeaFilterSet(a4_filters.DefaultsFilterSet):\n    defaults = {\n        'ordering': '-created'\n    }\n    category = category_filters.CategoryFilter()\n    labels = label_filters.LabelFilter()\n    ordering = a4_filters.DynamicChoicesOrderingFilter(\n        choices=get_ordering_choices\n    )\n    search = FreeTextFilter(\n        widget=FreeTextFilterWidget,\n        fields=['name']\n    )\n\n    class Meta:\n        model = models.Idea\n        fields = ['search', 'labels', 'category']\n\n\nclass AbstractIdeaListView(ProjectMixin,\n                           filter_views.FilteredListView):\n    paginate_by = 15\n\n\nclass IdeaListView(AbstractIdeaListView,\n                   DisplayProjectOrModuleMixin\n                   ):\n    model = models.Idea\n    filter_set = IdeaFilterSet\n\n    def get_queryset(self):\n        return super().get_queryset()\\\n            .filter(module=self.module)\n\n\nclass AbstractIdeaDetailView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             CanonicalURLDetailView):\n    get_context_from_object = True\n\n\nclass IdeaDetailView(AbstractIdeaDetailView):\n    model = models.Idea\n    queryset = models.Idea.objects.annotate_positive_rating_count()\\\n        .annotate_negative_rating_count()\n    permission_required = 'meinberlin_ideas.view_idea'\n\n\nclass AbstractIdeaCreateView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             generic.CreateView):\n    \"\"\"Create an idea in the context of a module.\"\"\"\n\n    def get_permission_object(self, *args, **kwargs):\n        return self.module\n\n    def form_valid(self, form):\n        form.instance.creator = self.request.user\n        form.instance.module = self.module\n        return super().form_valid(form)\n\n    def get_form_kwargs(self):\n        kwargs = super().get_form_kwargs()\n        kwargs['module'] = self.module\n        if self.module.settings_instance:\n            kwargs['settings_instance'] = self.module.settings_instance\n        return kwargs\n\n\nclass IdeaCreateView(AbstractIdeaCreateView):\n    model = models.Idea\n    form_class = forms.IdeaForm\n    permission_required = 'meinberlin_ideas.add_idea'\n    template_name = 'meinberlin_ideas/idea_create_form.html'\n\n\nclass AbstractIdeaUpdateView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             generic.UpdateView):\n    get_context_from_object = True\n\n    def get_form_kwargs(self):\n        kwargs = super().get_form_kwargs()\n        instance = kwargs.get('instance')\n        kwargs['module'] = instance.module\n        if instance.module.settings_instance:\n            kwargs['settings_instance'] = \\\n                instance.module.settings_instance\n        return kwargs\n\n\nclass IdeaUpdateView(AbstractIdeaUpdateView):\n    model = models.Idea\n    form_class = forms.IdeaForm\n    permission_required = 'meinberlin_ideas.change_idea'\n    template_name = 'meinberlin_ideas/idea_update_form.html'\n\n\nclass AbstractIdeaDeleteView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             generic.DeleteView):\n    get_context_from_object = True\n\n    def get_success_url(self):\n        return reverse(\n            'project-detail', kwargs={'slug': self.project.slug})\n\n    def delete(self, request, *args, **kwargs):\n        messages.success(self.request, self.success_message)\n        return super(AbstractIdeaDeleteView, self)\\\n            .delete(request, *args, **kwargs)\n\n\nclass IdeaDeleteView(AbstractIdeaDeleteView):\n    model = models.Idea\n    success_message = _('Your Idea has been deleted')\n    permission_required = 'meinberlin_ideas.change_idea'\n    template_name = 'meinberlin_ideas/idea_confirm_delete.html'\n\n\nclass AbstractIdeaModerateView(\n        ProjectMixin,\n        rules_mixins.PermissionRequiredMixin,\n        generic.detail.SingleObjectMixin,\n        generic.detail.SingleObjectTemplateResponseMixin,\n        contrib_forms.BaseMultiModelFormView):\n\n    get_context_from_object = True\n\n    def __init__(self):\n        self.forms = {\n            'moderateable': {\n                'model': self.model,\n                'form_class': self.moderateable_form_class\n            },\n            'statement': {\n                'model': ModeratorStatement,\n                'form_class': ModeratorStatementForm\n            }\n        }\n\n    def dispatch(self, *args, **kwargs):\n        self.object = self.get_object()\n        return super().dispatch(*args, **kwargs)\n\n    def get_success_url(self):\n        return self.object.get_absolute_url()\n\n    def forms_save(self, forms, commit=True):\n        objects = super().forms_save(forms, commit=False)\n        moderateable = objects['moderateable']\n        statement = objects['statement']\n\n        if not statement.pk:\n            statement.creator = self.request.user\n\n        with transaction.atomic():\n            statement.save()\n            moderateable.moderator_statement = statement\n            moderateable.save()\n            if hasattr(self.object, 'contact_email'):\n                NotifyContactOnModeratorFeedback.send(self.object)\n            else:\n                NotifyCreatorOnModeratorFeedback.send(self.object)\n        return objects\n\n    def get_instance(self, name):\n        if name == 'moderateable':\n            return self.object\n        elif name == 'statement':\n            return self.object.moderator_statement\n\n\nclass IdeaModerateView(AbstractIdeaModerateView):\n    model = models.Idea\n    permission_required = 'meinberlin_ideas.moderate_idea'\n    template_name = 'meinberlin_ideas/idea_moderate_form.html'\n    moderateable_form_class = forms.IdeaModerateForm\n\n\nclass IdeaDashboardExportView(DashboardExportView):\n    template_name = 'a4exports/export_dashboard.html'\n\n    def get_context_data(self, **kwargs):\n        context = super().get_context_data(**kwargs)\n        context['export'] = reverse(\n            'a4dashboard:idea-export',\n            kwargs={'module_slug': self.module.slug})\n        context['comment_export'] = reverse(\n            'a4dashboard:idea-comment-export',\n            kwargs={'module_slug': self.module.slug})\n        return context\n", "path": "meinberlin/apps/ideas/views.py"}], "after_files": [{"content": "from django.contrib import messages\nfrom django.db import transaction\nfrom django.urls import reverse\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import generic\n\nfrom adhocracy4.categories import filters as category_filters\nfrom adhocracy4.exports.views import DashboardExportView\nfrom adhocracy4.filters import filters as a4_filters\nfrom adhocracy4.filters import views as filter_views\nfrom adhocracy4.filters import widgets as filters_widgets\nfrom adhocracy4.filters.filters import FreeTextFilter\nfrom adhocracy4.labels import filters as label_filters\nfrom adhocracy4.projects.mixins import DisplayProjectOrModuleMixin\nfrom adhocracy4.projects.mixins import ProjectMixin\nfrom adhocracy4.rules import mixins as rules_mixins\nfrom meinberlin.apps.contrib import forms as contrib_forms\nfrom meinberlin.apps.contrib.views import CanonicalURLDetailView\nfrom meinberlin.apps.moderatorfeedback.forms import ModeratorStatementForm\nfrom meinberlin.apps.moderatorfeedback.models import ModeratorStatement\nfrom meinberlin.apps.notifications.emails import \\\n    NotifyContactOnModeratorFeedback\nfrom meinberlin.apps.notifications.emails import \\\n    NotifyCreatorOnModeratorFeedback\n\nfrom . import forms\nfrom . import models\n\n\nclass FreeTextFilterWidget(filters_widgets.FreeTextFilterWidget):\n    label = _('Search')\n\n\ndef get_ordering_choices(view):\n    choices = (('-created', _('Most recent')),)\n    if view.module.has_feature('rate', models.Idea):\n        choices += ('-positive_rating_count', _('Most popular')),\n    choices += ('-comment_count', _('Most commented')),\n    return choices\n\n\nclass IdeaFilterSet(a4_filters.DefaultsFilterSet):\n    defaults = {\n        'ordering': '-created'\n    }\n    category = category_filters.CategoryFilter()\n    labels = label_filters.LabelFilter()\n    ordering = a4_filters.DynamicChoicesOrderingFilter(\n        choices=get_ordering_choices\n    )\n    search = FreeTextFilter(\n        widget=FreeTextFilterWidget,\n        fields=['name']\n    )\n\n    class Meta:\n        model = models.Idea\n        fields = ['search', 'category', 'labels']\n\n\nclass AbstractIdeaListView(ProjectMixin,\n                           filter_views.FilteredListView):\n    paginate_by = 15\n\n\nclass IdeaListView(AbstractIdeaListView,\n                   DisplayProjectOrModuleMixin\n                   ):\n    model = models.Idea\n    filter_set = IdeaFilterSet\n\n    def get_queryset(self):\n        return super().get_queryset()\\\n            .filter(module=self.module)\n\n\nclass AbstractIdeaDetailView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             CanonicalURLDetailView):\n    get_context_from_object = True\n\n\nclass IdeaDetailView(AbstractIdeaDetailView):\n    model = models.Idea\n    queryset = models.Idea.objects.annotate_positive_rating_count()\\\n        .annotate_negative_rating_count()\n    permission_required = 'meinberlin_ideas.view_idea'\n\n\nclass AbstractIdeaCreateView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             generic.CreateView):\n    \"\"\"Create an idea in the context of a module.\"\"\"\n\n    def get_permission_object(self, *args, **kwargs):\n        return self.module\n\n    def form_valid(self, form):\n        form.instance.creator = self.request.user\n        form.instance.module = self.module\n        return super().form_valid(form)\n\n    def get_form_kwargs(self):\n        kwargs = super().get_form_kwargs()\n        kwargs['module'] = self.module\n        if self.module.settings_instance:\n            kwargs['settings_instance'] = self.module.settings_instance\n        return kwargs\n\n\nclass IdeaCreateView(AbstractIdeaCreateView):\n    model = models.Idea\n    form_class = forms.IdeaForm\n    permission_required = 'meinberlin_ideas.add_idea'\n    template_name = 'meinberlin_ideas/idea_create_form.html'\n\n\nclass AbstractIdeaUpdateView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             generic.UpdateView):\n    get_context_from_object = True\n\n    def get_form_kwargs(self):\n        kwargs = super().get_form_kwargs()\n        instance = kwargs.get('instance')\n        kwargs['module'] = instance.module\n        if instance.module.settings_instance:\n            kwargs['settings_instance'] = \\\n                instance.module.settings_instance\n        return kwargs\n\n\nclass IdeaUpdateView(AbstractIdeaUpdateView):\n    model = models.Idea\n    form_class = forms.IdeaForm\n    permission_required = 'meinberlin_ideas.change_idea'\n    template_name = 'meinberlin_ideas/idea_update_form.html'\n\n\nclass AbstractIdeaDeleteView(ProjectMixin,\n                             rules_mixins.PermissionRequiredMixin,\n                             generic.DeleteView):\n    get_context_from_object = True\n\n    def get_success_url(self):\n        return reverse(\n            'project-detail', kwargs={'slug': self.project.slug})\n\n    def delete(self, request, *args, **kwargs):\n        messages.success(self.request, self.success_message)\n        return super(AbstractIdeaDeleteView, self)\\\n            .delete(request, *args, **kwargs)\n\n\nclass IdeaDeleteView(AbstractIdeaDeleteView):\n    model = models.Idea\n    success_message = _('Your Idea has been deleted')\n    permission_required = 'meinberlin_ideas.change_idea'\n    template_name = 'meinberlin_ideas/idea_confirm_delete.html'\n\n\nclass AbstractIdeaModerateView(\n        ProjectMixin,\n        rules_mixins.PermissionRequiredMixin,\n        generic.detail.SingleObjectMixin,\n        generic.detail.SingleObjectTemplateResponseMixin,\n        contrib_forms.BaseMultiModelFormView):\n\n    get_context_from_object = True\n\n    def __init__(self):\n        self.forms = {\n            'moderateable': {\n                'model': self.model,\n                'form_class': self.moderateable_form_class\n            },\n            'statement': {\n                'model': ModeratorStatement,\n                'form_class': ModeratorStatementForm\n            }\n        }\n\n    def dispatch(self, *args, **kwargs):\n        self.object = self.get_object()\n        return super().dispatch(*args, **kwargs)\n\n    def get_success_url(self):\n        return self.object.get_absolute_url()\n\n    def forms_save(self, forms, commit=True):\n        objects = super().forms_save(forms, commit=False)\n        moderateable = objects['moderateable']\n        statement = objects['statement']\n\n        if not statement.pk:\n            statement.creator = self.request.user\n\n        with transaction.atomic():\n            statement.save()\n            moderateable.moderator_statement = statement\n            moderateable.save()\n            if hasattr(self.object, 'contact_email'):\n                NotifyContactOnModeratorFeedback.send(self.object)\n            else:\n                NotifyCreatorOnModeratorFeedback.send(self.object)\n        return objects\n\n    def get_instance(self, name):\n        if name == 'moderateable':\n            return self.object\n        elif name == 'statement':\n            return self.object.moderator_statement\n\n\nclass IdeaModerateView(AbstractIdeaModerateView):\n    model = models.Idea\n    permission_required = 'meinberlin_ideas.moderate_idea'\n    template_name = 'meinberlin_ideas/idea_moderate_form.html'\n    moderateable_form_class = forms.IdeaModerateForm\n\n\nclass IdeaDashboardExportView(DashboardExportView):\n    template_name = 'a4exports/export_dashboard.html'\n\n    def get_context_data(self, **kwargs):\n        context = super().get_context_data(**kwargs)\n        context['export'] = reverse(\n            'a4dashboard:idea-export',\n            kwargs={'module_slug': self.module.slug})\n        context['comment_export'] = reverse(\n            'a4dashboard:idea-comment-export',\n            kwargs={'module_slug': self.module.slug})\n        return context\n", "path": "meinberlin/apps/ideas/views.py"}]}