-
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Add field list_handling to AbstractTemplate model
- Loading branch information
Showing
5 changed files
with
82 additions
and
0 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
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
31 changes: 31 additions & 0 deletions
31
openwisp_controller/config/migrations/0054_template_list_handling.py
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,31 @@ | ||
# Generated by Django 4.2.7 on 2023-11-09 18:01 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("config", "0053_vpnclient_secret"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="template", | ||
name="list_handling", | ||
field=models.CharField( | ||
choices=[ | ||
("insert_at_beginning", "Insert items at the beginning"), | ||
("append_at_end", "Append items at the end"), | ||
("override", "Override all items"), | ||
], | ||
db_index=True, | ||
default="append_at_end", | ||
help_text="list handling, determines how list items in this " | ||
"template are handled if the same list exists in a previously" | ||
" applied template", | ||
max_length=20, | ||
verbose_name="list handling", | ||
), | ||
), | ||
] |
30 changes: 30 additions & 0 deletions
30
tests/openwisp2/sample_config/migrations/0006_template_list_handling.py
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,30 @@ | ||
# Generated by Django 4.2.7 on 2023-11-13 18:51 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("sample_config", "0005_add_organizationalloweddevice"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="template", | ||
name="list_handling", | ||
field=models.CharField( | ||
choices=[ | ||
("insert_at_beginning", "Insert items at the beginning"), | ||
("append_at_end", "Append items at the end"), | ||
("override", "Override all items"), | ||
], | ||
db_index=True, | ||
default="append_at_end", | ||
help_text="list handling, determines how list items in this template " | ||
"are handled if the same list exists in a previously applied template", | ||
max_length=20, | ||
verbose_name="list handling", | ||
), | ||
), | ||
] |