<commit_before>from xform_manager.models import Instance
from django.contrib.auth.models import User
from django.db import models


class InstanceModification(models.Model):
    user = models.ForeignKey(User, null=True)

    action = models.CharField(max_length=50)

    instance = models.ForeignKey(Instance, null=False)
    xpath = models.CharField(max_length=50)

    date_created = models.DateTimeField(auto_now_add=True)
    date_modified = models.DateTimeField(auto_now=True)

    class Meta:
        app_label = "parsed_xforms"<commit_msg>adding related_name. Now we can call instance.modifications.all()<commit_after>from xform_manager.models import Instance
from django.contrib.auth.models import User
from django.db import models


class InstanceModification(models.Model):
    user = models.ForeignKey(User, null=True)

    action = models.CharField(max_length=50)

    instance = models.ForeignKey(Instance, null=False, related_name="modifications")
    xpath = models.CharField(max_length=50)

    date_created = models.DateTimeField(auto_now_add=True)
    date_modified = models.DateTimeField(auto_now=True)

    class Meta:
        app_label = "parsed_xforms"
{'fraction_non_alphanumeric': 0.08943781942078365, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 5.0256410256410255, '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': '6098130', 'n_tokens_mistral': 357, 'n_tokens_neox': 348, 'n_words': 70}