<commit_before>from django.db import models
from model_choices import *


class Sticker(models.Model):
    created = models.DateTimeField('Creation Date', auto_now_add=True)
    summary = models.CharField('Description', max_length=1024, null=True, blank=True)
    type = models.CharField('type', max_length=1, choices=STICKER_TYPE_CHOICES, default=STICKER_TYPE_CHANGE)
    status = models.CharField('status', max_length=1, choices=STICKER_STATUS_CHOICES, default=STICKER_STATUS_CREATED)
    owner = models.ForeignKey('auth.User', related_name='stickers')
    board = models.ForeignKey('retro.Board', related_name='stickers')

    # TODO: fix team='team'
    def __unicode__(self):
        return '{summary} ({owner}, {team})'.format(summary=self.summary[:25], owner=self.owner, team='team')

    class Meta:
        ordering = ('created',)


class Board(models.Model):
    created = models.DateTimeField('Creation Date', auto_now_add=True)
    isActive = models.BooleanField('Is Active', default=False)
    voteLimit = models.IntegerField('Vote Limit', default=3)
    owner = models.ForeignKey('auth.User', related_name='boards')
    team = models.ForeignKey('core.Team', related_name='boards')
    sprint = models.ForeignKey('core.Sprint', related_name='boards')<commit_msg>Show team name and sprint number in admin<commit_after>from django.db import models
from model_choices import *


class Sticker(models.Model):
    created = models.DateTimeField('Creation Date', auto_now_add=True)
    summary = models.CharField('Description', max_length=1024, null=True, blank=True)
    type = models.CharField('type', max_length=1, choices=STICKER_TYPE_CHOICES, default=STICKER_TYPE_CHANGE)
    status = models.CharField('status', max_length=1, choices=STICKER_STATUS_CHOICES, default=STICKER_STATUS_CREATED)
    owner = models.ForeignKey('auth.User', related_name='stickers')
    board = models.ForeignKey('retro.Board', related_name='stickers')

    def __unicode__(self):
        return '{summary} ({owner}, {team}, Sprint {sprint})'.format(summary=self.summary[:25],
                                                                     owner=self.owner,
                                                                     team=self.board.team.name,
                                                                     sprint=self.board.sprint.number)

    class Meta:
        ordering = ('-created',)


class Board(models.Model):
    created = models.DateTimeField('Creation Date', auto_now_add=True)
    isActive = models.BooleanField('Is Active', default=False)
    voteLimit = models.IntegerField('Vote Limit', default=3)
    owner = models.ForeignKey('auth.User', related_name='boards')
    team = models.ForeignKey('core.Team', related_name='boards')
    sprint = models.ForeignKey('core.Sprint', related_name='boards')
{'fraction_non_alphanumeric': 0.12721474131821403, 'fraction_numerical': 0.0063784549964564135, 'mean_word_length': 3.712854757929883, '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': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1948903', 'n_tokens_mistral': 811, 'n_tokens_neox': 789, 'n_words': 150}