<commit_before>from django.contrib.gis.db import models
from django_date_extensions.fields import ApproximateDateField

# tell South how to handle the custom fields 
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^django_date_extensions\.fields\.ApproximateDateField"])
add_introspection_rules([], ["^django.contrib\.gis\.db\.models\.fields\.PointField"])

class Person(models.Model):
    slug            = models.SlugField(max_length=200, unique=True)
    title           = models.CharField(max_length=20)
    first_name      = models.CharField(max_length=100)
    middle_names    = models.CharField(max_length=100)
    last_name       = models.CharField(max_length=100)
    gender          = models.CharField(max_length=1, choices=(('m','Male'),('f','Female')) )
    date_of_birth   = ApproximateDateField()
    date_of_death   = ApproximateDateField()
    # religion
    # tribe

class Organisation(models.Model):
    slug                = models.SlugField(max_length=200, unique=True)
    name                = models.CharField(max_length=200)
    organisation_type   = models.CharField(max_length=50)
    started             = ApproximateDateField()
    ended               = ApproximateDateField()

class Place(models.Model):
    slug            = models.SlugField(max_length=100, unique=True)
    name            = models.CharField(max_length=200)
    place_type      = models.CharField(max_length=50)
    shape_url       = models.URLField(verify_exists=True, blank=True )
    location        = models.PointField(null=True)
    organisation    = models.ForeignKey('Organisation', null=True)<commit_msg>Allow some dates to be blank<commit_after>from django.contrib.gis.db import models
from django_date_extensions.fields import ApproximateDateField

# tell South how to handle the custom fields 
from south.modelsinspector import add_introspection_rules
add_introspection_rules([], ["^django_date_extensions\.fields\.ApproximateDateField"])
add_introspection_rules([], ["^django.contrib\.gis\.db\.models\.fields\.PointField"])

class Person(models.Model):
    slug            = models.SlugField(max_length=200, unique=True)
    title           = models.CharField(max_length=20)
    first_name      = models.CharField(max_length=100)
    middle_names    = models.CharField(max_length=100)
    last_name       = models.CharField(max_length=100)
    gender          = models.CharField(max_length=1, choices=(('m','Male'),('f','Female')) )
    date_of_birth   = ApproximateDateField(blank=True)
    date_of_death   = ApproximateDateField(blank=True)
    # religion
    # tribe

class Organisation(models.Model):
    slug                = models.SlugField(max_length=200, unique=True)
    name                = models.CharField(max_length=200)
    organisation_type   = models.CharField(max_length=50)
    started             = ApproximateDateField(blank=True)
    ended               = ApproximateDateField(blank=True)

class Place(models.Model):
    slug            = models.SlugField(max_length=100, unique=True)
    name            = models.CharField(max_length=200)
    place_type      = models.CharField(max_length=50)
    shape_url       = models.URLField(verify_exists=True, blank=True )
    location        = models.PointField(null=True)
    organisation    = models.ForeignKey('Organisation', null=True)
{'fraction_non_alphanumeric': 0.10551415797317437, 'fraction_numerical': 0.018479880774962744, 'mean_word_length': 3.439153439153439, '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': '2109043', 'n_tokens_mistral': 1068, 'n_tokens_neox': 988, 'n_words': 156}