You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question about group(). Do you really need it? In one example you use:
group(DIV(Class="row"), [
group(DIV(Class="col-sm form-group"), [
LABEL("Enter Title", to="inputt", Class="form-label"),
#This beautiful syntax is part of python. the :=(beaver) operator returns an object and stores it to a variable, which we can modify
title := INPUT(id="inputt", type="text", Class="form-control"),
]),
description := group(DIV(Class="col-sm form-group"), [
LABEL("Enter Description", to="inputts", Class="form-label"),
TEXTAREA(id="inputts", type="text", Class="form-control")
]),
])
but brython does allow you to build this same structure using lists of nested elements:
DIV([
DIV([
LABEL("Enter Title", to="inputt", Class="form-label"),
#This beautiful syntax is part of python. the :=(walrus) operator returns an object and stores it to a variable, which we can modify
title := INPUT(id="inputt", type="text", Class="form-control"),
]),
description := DIV([
LABEL("Enter Description", to="inputts", Class="form-label"),
TEXTAREA(id="inputts", type="text", Class="form-control")
], Class="col-sm form-group"),
], Class="row")
The text was updated successfully, but these errors were encountered:
Hi, interesting work.
I have a question about group(). Do you really need it? In one example you use:
but brython does allow you to build this same structure using lists of nested elements:
The text was updated successfully, but these errors were encountered: