<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals

from django.db import models
from django.conf import settings
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _

import autoslug

from core.models import ActiveStateMixin, TimestampMixin, fields
from core.models import Investigation, Process, DataFile



class Milestone(ActiveStateMixin, TimestampMixin, models.Model):
    """
    Stores information related to short-term project goals.
    """
    due_date = models.DateField()
    name = models.CharField(_('name'), max_length=45)
    slug = autoslug.AutoSlugField(_('slug'), populate_from='name')
    description = fields.RichTextField(_('description'), blank=True)
    investigation = models.ForeignKey(Investigation,
                                related_name='milestone',
                                related_query_name='milestone',
                                null=True)


class ProgressUpdate(ActiveStateMixin, TimestampMixin, models.Model):
    """
    Records updates to a milestone based on project activity.
    """
    process = models.ForeignKey(Process,
                                related_name='progress',
                                related_query_name='progress',
                                null=True)
    datafile = models.ForeignKey(DataFile,
                                related_name='progress',
                                related_query_name='progress',
                                null=True)
    description = fields.RichTextField(_('description'), blank=True)
    milestone = models.ManyToManyField(Milestone,
                                related_name='progress',
                                related_query_name='progress',)

<commit_msg>Removed progressupdate model for actstream replacement Added user tracking to Milestone model<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals

from django.db import models
from django.conf import settings
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _

import autoslug

from core.models import ActiveStateMixin, TimestampMixin, fields
from core.models import Investigation, Process, DataFile



class Milestone(ActiveStateMixin, TimestampMixin, models.Model):
    """
    Stores information related to short-term project goals.
    """
    due_date = models.DateField()
    name = models.CharField(_('name'), max_length=45)
    slug = autoslug.AutoSlugField(_('slug'), populate_from='name')
    description = fields.RichTextField(_('description'), blank=True)
    investigation = models.ForeignKey(Investigation,
                                related_name='milestone',
                                related_query_name='milestone',
                                null=True)
    user = models.ForeignKey(settings.AUTH_USER_MODEL,
                                limit_choices_to={'is_active': True})


{'fraction_non_alphanumeric': 0.08363516628251565, 'fraction_numerical': 0.0026341784655910436, 'mean_word_length': 2.5867768595041323, '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': '3193793', 'n_tokens_mistral': 780, 'n_tokens_neox': 749, 'n_words': 177}