1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Added URL custom field type; added is_filterable toggle; fixed bulk editing

This commit is contained in:
Jeremy Stretch
2016-08-23 16:45:26 -04:00
parent fcd4c9f7de
commit d74d85a042
8 changed files with 73 additions and 42 deletions

View File

@@ -7,7 +7,7 @@ from dcim.models import Site
from extras.models import (
CustomField, CustomFieldValue, CustomFieldChoice, CF_TYPE_TEXT, CF_TYPE_INTEGER, CF_TYPE_BOOLEAN, CF_TYPE_DATE,
CF_TYPE_SELECT,
CF_TYPE_SELECT, CF_TYPE_URL,
)
@@ -30,6 +30,7 @@ class CustomFieldTestCase(TestCase):
{'field_type': CF_TYPE_BOOLEAN, 'field_value': True, 'empty_value': None},
{'field_type': CF_TYPE_BOOLEAN, 'field_value': False, 'empty_value': None},
{'field_type': CF_TYPE_DATE, 'field_value': date(2016, 6, 23), 'empty_value': None},
{'field_type': CF_TYPE_URL, 'field_value': 'http://example.com/', 'empty_value': ''},
)
obj_type = ContentType.objects.get_for_model(Site)