diff --git a/default.nix b/default.nix index 3f49833..eb251ff 100644 --- a/default.nix +++ b/default.nix @@ -3,6 +3,9 @@ python ? pkgs.python39, ...}: let + + nixpkgs_unstable = import {}; + urlobject = with python.pkgs; buildPythonPackage rec { pname = "URLObject"; version = "2.4.3"; @@ -65,7 +68,7 @@ let }; u2flib-server = {}; - ory-hydra-client = with python.pkgs; buildPythonPackage rec { + ory-hydra-client-old = with python.pkgs; buildPythonPackage rec { pname = "ory-hydra-client"; version = "1.10.6"; src = fetchPypi { @@ -77,7 +80,18 @@ let urllib3 python-dateutil ]; - + }; + ory-hydra-client = with python.pkgs; buildPythonPackage rec { + pname = "ory-hydra-client"; + version = "1.9.2"; + src = ./libs/ory-hydra-client; +# doCheck = false; + propagatedBuildInputs = [ + urllib3 + python-dateutil + nixpkgs_unstable.python39Packages.attrs + httpx + ]; }; in { diff --git a/lenticular_cloud/template/base.html.j2 b/lenticular_cloud/template/base.html.j2 index f148a16..82be352 100644 --- a/lenticular_cloud/template/base.html.j2 +++ b/lenticular_cloud/template/base.html.j2 @@ -63,6 +63,54 @@ {% endfor %} {%- endmacro %} +{# Renders range field + Params: + field - WTForm field (there are no check, but you should put here only BooleanField. + kwargs - pass any arguments you want in order to put them into the html attributes. + There are few exceptions: for - for_, class - class_, class__ - class_ + + Example usage: + {{ macros.render_range_field(form.answere) }} + #} +{% macro render_range_field(field) -%} +
+ +
+
+
+ {{ field(class_='form-control', oninput='this.parentElement.nextElementSibling.children[0].value = this.value', **kwargs) }} +
+
+ +
+
+
+ {% if field.errors %} + {% for e in field.errors %} +

{{ e }}

+ {% endfor %} + {% endif %} +
+{%- endmacro %} + + +{% macro render_password_field(field, label_visible=true, horizontal=false) -%} + +
+ +
+ {{ field(class_='form-control', **kwargs) }} + +
+ {% if field.errors %} + {% for e in field.errors %} +

{{ e }}

+ {% endfor %} + {% endif %} +
+{%- endmacro %} + + {# Renders submit field Params: field - WTForm field (there are no check, but you should put here only BooleanField. @@ -91,24 +139,30 @@ {%- endmacro %} -{% macro render_list_field(field) -%} +{% macro render_list_field(field, horizontal) -%}
{{ field.label.text }} -