diff --git a/slapp/explorer/forms.py b/slapp/explorer/forms.py index 495d600..adc2ab9 100644 --- a/slapp/explorer/forms.py +++ b/slapp/explorer/forms.py @@ -1,22 +1,8 @@ """Module containing django forms.""" -from django.forms import FloatField, Form, TextInput, renderers -from django.utils.safestring import mark_safe +from django.forms import FloatField, Form, TextInput -class TemplateForm(Form): # noqa: D101 - template_name = None - extra_content = {} - - def __str__(self) -> str: # noqa: D105 - if self.template_name: - renderer = renderers.get_default_renderer() - return mark_safe(renderer.render(self.template_name, {"form": self, **self.extra_content})) # noqa: S308 - return super().__str__() - - -class ParametersSliderForm(TemplateForm): # noqa: D101 - template_name = "forms/layer.html" - +class ParametersSliderForm(Form): # noqa: D101 def __init__(self, parameters, **kwargs) -> None: # noqa: D107, ANN001 super().__init__(**kwargs) self.fields = {item["name"]: item["field"] for item in self.generate_fields(parameters)} diff --git a/slapp/explorer/widgets.py b/slapp/explorer/widgets.py deleted file mode 100644 index 4833338..0000000 --- a/slapp/explorer/widgets.py +++ /dev/null @@ -1,9 +0,0 @@ -"""Module holds widgets for digiplan.""" - -from django.forms.widgets import Widget - - -class SliderWidget(Widget): - """Widget to render sliders.""" - - template_name = "widgets/slider.html" diff --git a/slapp/templates/pages/parameters.html b/slapp/templates/pages/parameters.html index 873e510..8cac29f 100644 --- a/slapp/templates/pages/parameters.html +++ b/slapp/templates/pages/parameters.html @@ -83,42 +83,15 @@

Parameter für die Energiesystemoptimieung festlegen

- - keine Obergrenze angeben -
-
- - - + {{ sliders_form.1_pv }} -
- - - + + {{ sliders_form.1_pv }}