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
# get current network, eg. 192.168.1.0/24 | |
ip addr show dev $(ip route | grep default | cut -d" " -f5) | grep inet | xargs echo | cut -d" " -f2 | xargs ipcalc -n -b | grep Network | xargs echo | cut -d" " -f2 |
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
ModelView | |
--------- | |
# field1 (->Model1), field2 (->Model2) filtered by field1 values | |
column_filter_by = ('field2') | |
form_widget_args = { | |
'field2': { | |
'data-filter-by': 'field1', | |
} | |
} |