mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-17 09:12:18 -06:00
Clean up obsolete code
This commit is contained in:
@@ -15,12 +15,8 @@ class Layout:
|
|||||||
raise TypeError(f"Row {i} must be a Row instance, not {type(row)}.")
|
raise TypeError(f"Row {i} must be a Row instance, not {type(row)}.")
|
||||||
self.rows = rows
|
self.rows = rows
|
||||||
|
|
||||||
def render(self, context):
|
|
||||||
return ''.join([row.render(context) for row in self.rows])
|
|
||||||
|
|
||||||
|
|
||||||
class Row:
|
class Row:
|
||||||
template_name = 'ui/layout/row.html'
|
|
||||||
|
|
||||||
def __init__(self, *columns):
|
def __init__(self, *columns):
|
||||||
for i, column in enumerate(columns):
|
for i, column in enumerate(columns):
|
||||||
@@ -28,9 +24,6 @@ class Row:
|
|||||||
raise TypeError(f"Column {i} must be a Column instance, not {type(column)}.")
|
raise TypeError(f"Column {i} must be a Column instance, not {type(column)}.")
|
||||||
self.columns = columns
|
self.columns = columns
|
||||||
|
|
||||||
def render(self, context):
|
|
||||||
return ''.join([column.render(context) for column in self.columns])
|
|
||||||
|
|
||||||
|
|
||||||
class Column:
|
class Column:
|
||||||
|
|
||||||
@@ -39,6 +32,3 @@ class Column:
|
|||||||
if not isinstance(panel, Panel):
|
if not isinstance(panel, Panel):
|
||||||
raise TypeError(f"Panel {i} must be an instance of a Panel, not {type(panel)}.")
|
raise TypeError(f"Panel {i} must be an instance of a Panel, not {type(panel)}.")
|
||||||
self.panels = panels
|
self.panels = panels
|
||||||
|
|
||||||
def render(self, context):
|
|
||||||
return ''.join([panel.render(context) for panel in self.panels])
|
|
||||||
|
|||||||
Reference in New Issue
Block a user