<commit_before>from django.contrib.gis.db import models

class Airport(models.Model):
    facility_site_number = models.CharField(max_length=11, primary_key=True, unique=True)
    location_identifier = models.CharField(max_length=4)
    facility_name = models.CharField(max_length=42)
    ownership_type = models.CharField(max_length=2)
    use_type = models.CharField(max_length=2)
    owners_name = models.CharField(max_length=35)
    facility_manager_name = models.CharField(max_length=35)
    point = models.PointField(srid=4326)
    elevation_msl = models.IntegerField()
    traffic_pattern_agl = models.IntegerField(null=True, blank=True)
    activation_date = models.DateField(null=True, blank=True)
    status = models.CharField(max_length=2)
    control_tower = models.BooleanField()
    ctaf = models.DecimalField(max_digits=6, decimal_places=3, null=True, blank=True)
    segmented_circle = models.BooleanField()
    beacon_color = models.CharField(max_length=3)
    landing_fees = models.BooleanField()
    medical_use = models.BooleanField()
    singles_based = models.IntegerField()
    multis_based = models.IntegerField()
    jets_based = models.IntegerField()
    helicopters_based = models.IntegerField()
    gliders_based = models.IntegerField()
    military_based = models.IntegerField()
    ultralights_based = models.IntegerField()
    icao_identifier = models.CharField(max_length=7)

    def __unicode__(self):
        return self.facility_name

class Remark(models.Model):
    airport = models.ForeignKey(Airport)
    element_name = models.CharField(max_length=11)
    body = models.TextField()

    def __unicode__(self):
        return u'%s for %s' % (self.element_name, self.airport)

class Attendance(models.Model):
    airport = models.ForeignKey(Airport)
    sequence = models.IntegerField()
    schedule = models.TextField()

    def __unicode__(self):
        return u'%s for %s' % (self.sequence, self.airport)

class Runway(models.Model):
    airport = models.ForeignKey(Airport)
    runway_identification = models.CharField(max_length='7')
    runway_length = models.IntegerField(null=True, blank=True)
    runway_width = models.IntegerField(null=True, blank=True)
    surface_type_condition = models.CharField(max_length=14, null=True, blank=True)
    surface_treatment = models.CharField(max_length=8, null=True, blank=True)<commit_msg>Add get_absolute_url method to airport<commit_after>from django.contrib.gis.db import models
from django.core.urlresolvers import reverse

class Airport(models.Model):
    facility_site_number = models.CharField(max_length=11, primary_key=True, unique=True)
    location_identifier = models.CharField(max_length=4)
    facility_name = models.CharField(max_length=42)
    ownership_type = models.CharField(max_length=2)
    use_type = models.CharField(max_length=2)
    owners_name = models.CharField(max_length=35)
    facility_manager_name = models.CharField(max_length=35)
    point = models.PointField(srid=4326)
    elevation_msl = models.IntegerField()
    traffic_pattern_agl = models.IntegerField(null=True, blank=True)
    activation_date = models.DateField(null=True, blank=True)
    status = models.CharField(max_length=2)
    control_tower = models.BooleanField()
    ctaf = models.DecimalField(max_digits=6, decimal_places=3, null=True, blank=True)
    segmented_circle = models.BooleanField()
    beacon_color = models.CharField(max_length=3)
    landing_fees = models.BooleanField()
    medical_use = models.BooleanField()
    singles_based = models.IntegerField()
    multis_based = models.IntegerField()
    jets_based = models.IntegerField()
    helicopters_based = models.IntegerField()
    gliders_based = models.IntegerField()
    military_based = models.IntegerField()
    ultralights_based = models.IntegerField()
    icao_identifier = models.CharField(max_length=7)

    def get_absolute_url(self):
        return reverse('airport_detail', args=[self.location_identifier])

    def __unicode__(self):
        return self.facility_name

class Remark(models.Model):
    airport = models.ForeignKey(Airport)
    element_name = models.CharField(max_length=11)
    body = models.TextField()

    def __unicode__(self):
        return u'%s for %s' % (self.element_name, self.airport)

class Attendance(models.Model):
    airport = models.ForeignKey(Airport)
    sequence = models.IntegerField()
    schedule = models.TextField()

    def __unicode__(self):
        return u'%s for %s' % (self.sequence, self.airport)

class Runway(models.Model):
    airport = models.ForeignKey(Airport)
    runway_identification = models.CharField(max_length='7')
    runway_length = models.IntegerField(null=True, blank=True)
    runway_width = models.IntegerField(null=True, blank=True)
    surface_type_condition = models.CharField(max_length=14, null=True, blank=True)
    surface_treatment = models.CharField(max_length=8, null=True, blank=True)
{'fraction_non_alphanumeric': 0.10517766497461929, 'fraction_numerical': 0.010558375634517767, 'mean_word_length': 4.864285714285714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1329904', 'n_tokens_mistral': 1569, 'n_tokens_neox': 1548, 'n_words': 254}