Skip to content

Commit

Permalink
[chores] Use settings to show choices in model fields
Browse files Browse the repository at this point in the history
Signed-off-by: Gagan Deep <[email protected]>
  • Loading branch information
pandafy authored and nemesifier committed Sep 28, 2024
1 parent 35f99f5 commit 88a3fc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ class Migration(migrations.Migration):
(
'backend',
models.CharField(
choices=[
('netjsonconfig.OpenWrt', 'OpenWRT'),
('netjsonconfig.OpenWisp', 'OpenWISP Firmware 1.x'),
],
choices=app_settings.BACKENDS,
help_text=(
'Select <a href="http://netjsonconfig.openwisp.org'
'/en/stable/" target="_blank">netjsonconfig</a> '
Expand Down Expand Up @@ -242,10 +239,7 @@ class Migration(migrations.Migration):
(
'backend',
models.CharField(
choices=[
('netjsonconfig.OpenWrt', 'OpenWRT'),
('netjsonconfig.OpenWisp', 'OpenWISP Firmware 1.x'),
],
choices=app_settings.BACKENDS,
help_text=(
'Select <a href="http://netjsonconfig.openwisp.org'
'/en/stable/" target="_blank">netjsonconfig</a> backend'
Expand Down
10 changes: 2 additions & 8 deletions tests/openwisp2/sample_config/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ class Migration(migrations.Migration):
(
'backend',
models.CharField(
choices=[
('netjsonconfig.OpenWrt', 'OpenWRT'),
('netjsonconfig.OpenWisp', 'OpenWISP Firmware 1.x'),
],
choices=app_settings.BACKENDS,
help_text=(
'Select <a href="http://netjsonconfig.openwisp.org/en/'
'stable/" target="_blank">netjsonconfig</a> backend'
Expand Down Expand Up @@ -491,10 +488,7 @@ class Migration(migrations.Migration):
(
'backend',
models.CharField(
choices=[
('netjsonconfig.OpenWrt', 'OpenWRT'),
('netjsonconfig.OpenWisp', 'OpenWISP Firmware 1.x'),
],
choices=app_settings.BACKENDS,
help_text=(
'Select <a href="http://netjsonconfig.openwisp.org/en/'
'stable/" target="_blank">netjsonconfig</a> backend'
Expand Down

0 comments on commit 88a3fc7

Please sign in to comment.