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

Extended primary models to include 'created' and 'last_updated' fields

This commit is contained in:
Jeremy Stretch
2016-06-22 10:19:00 -04:00
parent f42c0643e0
commit cb5991d5a6
8 changed files with 191 additions and 10 deletions

View File

@ -2,9 +2,10 @@ from django.core.urlresolvers import reverse
from django.db import models
from dcim.models import Site, Interface
from utilities.models import CreatedUpdatedModel
class Provider(models.Model):
class Provider(CreatedUpdatedModel):
"""
Each Circuit belongs to a Provider. This is usually a telecommunications company or similar organization. This model
stores information pertinent to the user's relationship with the Provider.
@ -55,7 +56,7 @@ class CircuitType(models.Model):
return "{}?type={}".format(reverse('circuits:circuit_list'), self.slug)
class Circuit(models.Model):
class Circuit(CreatedUpdatedModel):
"""
A communications circuit connects two points. Each Circuit belongs to a Provider; Providers may have multiple
circuits. Each circuit is also assigned a CircuitType and a Site. A Circuit may be terminated to a specific device