-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
116 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from models.widget import Widget | ||
|
||
|
||
class Iframe(Widget): | ||
src: str | ||
|
||
def __init__(self, widget) -> None: | ||
super().__init__(widget) | ||
self.src = widget['src'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
from models.utils import from_list | ||
|
||
|
||
class Row: | ||
columns: list['Column'] = [] | ||
|
||
@staticmethod | ||
def from_dict(dictionary: dict) -> 'Row': | ||
from models.column import Column | ||
from models.widget import Widget | ||
row = Row() | ||
if 'columns' in dictionary: | ||
row.columns = from_list(Column.from_dict, dictionary['columns']) | ||
else: | ||
column = Column() | ||
column.widgets = from_list(Widget.from_dict, dictionary['widgets']) | ||
row.columns = [column] | ||
return row |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters