From 8ba4c372f41809cdf1e50579f176ecc2905cb289 Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Wed, 25 Jul 2018 13:28:48 -0400 Subject: [PATCH] dont use var name "input" --- atst/ui_modules.py | 20 ++++++++++---------- templates/components/options_input.html.to | 2 +- templates/components/text_input.html.to | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/atst/ui_modules.py b/atst/ui_modules.py index 1ae08eeb..748ca980 100644 --- a/atst/ui_modules.py +++ b/atst/ui_modules.py @@ -12,23 +12,23 @@ class Alert(UIModule): level=level) class TextInput(UIModule): - def render(self, input, placeholder=''): + def render(self, field, placeholder=''): return self.render_string( "components/text_input.html.to", - input=input, - label=re.sub('<[^<]+?>', '', str(input.label)), - errors=input.errors, + field=field, + label=re.sub('<[^<]+?>', '', str(field.label)), + errors=field.errors, placeholder=placeholder, - description=input.description) + description=field.description) class OptionsInput(UIModule): - def render(self, input, inline=False): + def render(self, field, inline=False): return self.render_string( "components/options_input.html.to", - input=input, - label=re.sub('<[^<]+?>', '', str(input.label)), - errors=input.errors, - description=input.description, + field=field, + label=re.sub('<[^<]+?>', '', str(field.label)), + errors=field.errors, + description=field.description, inline=inline) class Icon(UIModule): diff --git a/templates/components/options_input.html.to b/templates/components/options_input.html.to index b12a1697..ab296a5f 100644 --- a/templates/components/options_input.html.to +++ b/templates/components/options_input.html.to @@ -12,7 +12,7 @@ {% end %} - {% raw input() %} + {% raw field() %} {% if errors %} {% for error in errors %} diff --git a/templates/components/text_input.html.to b/templates/components/text_input.html.to index 6d72884a..d45c4f36 100644 --- a/templates/components/text_input.html.to +++ b/templates/components/text_input.html.to @@ -11,7 +11,7 @@ {% end %} - {% raw input(placeholder=placeholder) %} + {% raw field(placeholder=placeholder) %} {% if errors %} {% for error in errors %}