# Path: personnel/models.py
# class Address(models.Model):
#     '''This class describes an address.'''
#     line_1 = models.CharField(max_length=100, blank=True, null=True)
#     line_2 = models.CharField(max_length=100, blank=True, null=True)
#     line_3 = models.CharField(max_length=100, blank=True, null=True)
#     line_4 = models.CharField(max_length=100, blank=True, null=True)
#     city = models.CharField(max_length=100)
#     state = models.CharField(max_length=3, help_text="Use 2 letter abbreviations", blank=True, null=True)
#     country = models.CharField(max_length=100, help_text="Use standard country codes, see <a href="">here<a>.")
#     code = models.CharField(max_length=15, blank=True, null=True, help_text="zip or postal code")
#     
#     def __unicode__(self):
#         '''The unicode representation of an Address is the address lines followed by linebreaks.'''
#         return u'%s\n%s\n%s\n%s\n%s, %s, %s, %s' %(self.line_1, self.line_2, self.line_3, self.line_4, self.city, self.state, self.country, self.code)


from django.db import models
from django.template.defaultfilters import slugify
from personnel.models import Address
        ('Shipping', 'Shipping Address'))
        
    type = models.CharField(max_length=15,
        help_text="What type of address is this?",
        choices = ADDRESS_TYPES)
    address = models.ForeignKey(Address, help_text = 'What is the address?"')
    
    def __unicode__(self):
        '''The unicode representation of an address is the root address.'''
        return '%s' %self.address
        
class LabLocation(models.Model):
    '''This object stores general information about where the group is situated.
    
    This is a general model which can store information at a variety of levels, including the department, the institution or the city/region.
    There can be several instances of this for each group to describe various levels of location.
    There is are three required fields; name, type and priority.
    '''
    
    LOCATION_TYPE = (
        ('Department', 'Department'),
        ('Institution', 'Institution'),
        ('City', 'City'),
        ('Region', 'Region'))
        
    name = models.CharField(max_length=50,
        help_text = "What is the name of this location?")    
    type = models.CharField(max_length=15,
        help_text = "What type of location is this?",
        choices = LOCATION_TYPE)

# Path: personnel/models.py
# class Address(models.Model):
#     '''This class describes an address.'''
#     line_1 = models.CharField(max_length=100, blank=True, null=True)
#     line_2 = models.CharField(max_length=100, blank=True, null=True)
#     line_3 = models.CharField(max_length=100, blank=True, null=True)
#     line_4 = models.CharField(max_length=100, blank=True, null=True)
#     city = models.CharField(max_length=100)
#     state = models.CharField(max_length=3, help_text="Use 2 letter abbreviations", blank=True, null=True)
#     country = models.CharField(max_length=100, help_text="Use standard country codes, see <a href="">here<a>.")
#     code = models.CharField(max_length=15, blank=True, null=True, help_text="zip or postal code")
#     
#     def __unicode__(self):
#         '''The unicode representation of an Address is the address lines followed by linebreaks.'''
#         return u'%s\n%s\n%s\n%s\n%s, %s, %s, %s' %(self.line_1, self.line_2, self.line_3, self.line_4, self.city, self.state, self.country, self.code)


# Path: communication/models.py
from django.db import models
from django.template.defaultfilters import slugify
from personnel.models import Address

        ('Shipping', 'Shipping Address'))
        
    type = models.CharField(max_length=15,
        help_text="What type of address is this?",
        choices = ADDRESS_TYPES)
    address = models.ForeignKey(Address, help_text = 'What is the address?"')
    
    def __unicode__(self):
        '''The unicode representation of an address is the root address.'''
        return '%s' %self.address
        
class LabLocation(models.Model):
    '''This object stores general information about where the group is situated.
    
    This is a general model which can store information at a variety of levels, including the department, the institution or the city/region.
    There can be several instances of this for each group to describe various levels of location.
    There is are three required fields; name, type and priority.
    '''
    
    LOCATION_TYPE = (
        ('Department', 'Department'),
        ('Institution', 'Institution'),
        ('City', 'City'),
        ('Region', 'Region'))
        
    name = models.CharField(max_length=50,
        help_text = "What is the name of this location?")    
    type = models.CharField(max_length=15,
        help_text = "What type of location is this?",
        choices = LOCATION_TYPE)

    address = models.ForeignKey(Address,