Changeset 12997


Ignore:
Timestamp:
05/20/11 17:02:31 (13 years ago)
Author:
sil
Message:

some fields with reserved names has been renamed

Location:
trunk/sara_cmt/sara_cmt/cluster
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt/sara_cmt/cluster/models.py

    r12972 r12997  
    3737    def __unicode__(self):
    3838        return self.name or None
     39
     40    def validate_unique(exclude=None):
     41        logger.error('Called VALIDATE_UNIQUE')
    3942
    4043
     
    145148    aliases   = models.CharField(max_length=255, help_text='Cnames comma-seperated', blank=True, null=True)
    146149
    147     hwaddress = models.CharField(max_length=17, blank=True,
     150    hwaddress = models.CharField(max_length=17, blank=True, #null=True,
    148151                                 verbose_name='hardware address',
    149152                                 help_text="6 Octets, optionally delimited by \
     
    506509    areacode          = models.CharField(max_length=4) # because it can start with a zero
    507510    subscriber_number = models.IntegerField(verbose_name='number', max_length=15)
    508     # !!! TODO: type is a reserved name, so rename to numtype in a migration.... and make this a ChoiceField? !!!
    509     type = models.CharField(max_length=1, choices=NUMBER_CHOICES)
     511    number_type = models.CharField(max_length=1, choices=NUMBER_CHOICES)
    510512
    511513    # !!! TODO: link to company / contact / etc... !!!
     
    617619class WarrantyContract(ModelExtension):
    618620    """
    619         A class which contains warranty information of (a collection of) hardware.
    620     """
    621     # !!! TODO: type is a reserved name, so rename to vartype in a migration !!!
    622     type = models.ForeignKey(WarrantyType, blank=True, null=True, related_name='contracts')
     621        A class which contains warranty information of (a collection of) hardware. (SLA)
     622    """
     623    warranty_type = models.ForeignKey(WarrantyType, blank=True, null=True, related_name='contracts')
    623624
    624625    label     = models.CharField(max_length=255, unique=True)
Note: See TracChangeset for help on using the changeset viewer.