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

Implemented tags for all primary models

This commit is contained in:
Jeremy Stretch
2018-05-10 12:53:11 -04:00
parent b0dafcf50f
commit 9b3869790d
43 changed files with 262 additions and 34 deletions

View File

@@ -4,6 +4,7 @@ from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from django.urls import reverse
from django.utils.encoding import python_2_unicode_compatible
from taggit.managers import TaggableManager
from dcim.constants import STATUS_CLASSES
from dcim.fields import ASNField
@@ -56,6 +57,8 @@ class Provider(CreatedUpdatedModel, CustomFieldModel):
object_id_field='obj_id'
)
tags = TaggableManager()
csv_headers = ['name', 'slug', 'asn', 'account', 'portal_url', 'noc_contact', 'admin_contact', 'comments']
class Meta:
@@ -166,6 +169,8 @@ class Circuit(CreatedUpdatedModel, CustomFieldModel):
object_id_field='obj_id'
)
tags = TaggableManager()
csv_headers = [
'cid', 'provider', 'type', 'status', 'tenant', 'install_date', 'commit_rate', 'description', 'comments',
]