<commit_before># -*- coding: utf-8 -*-

from collections import deque

from django.db import models
from django.utils.translation import ugettext as _
from django.db.models.signals import post_save
from django.dispatch import receiver


class MenuManager(models.Manager):
    def get_queryset(self):
        return super(MenuManager, self).get_queryset().order_by('real_weight')


class RootMenuManager(MenuManager):
    def get_queryset(self):
        return super(RootMenuManager, self).get_queryset().filter(parent=None)


class Menu(models.Model):
    BITS_PER_LEVEL = 6  # 2 ** 6 = 64 (who want more? idiot!?)
    LEVELS = 4  # levels count (level 0, level 1, ..., level LEVELS - 1)
    MAX_LEVEL = LEVELS - 1

    text = models.CharField(verbose_name=_(u'Text'), max_length=255)
    parent = models.ForeignKey('self', verbose_name=_(u'Rodič'), default=None, blank=True, null=True)
    url = models.CharField(verbose_name=_(u"Odkaz"), max_length=255)
    weight = models.PositiveIntegerField(verbose_name=_(u"Pořadí"), default=1)
    real_weight = models.PositiveIntegerField(default=0, editable=False)

    objects = MenuManager()
    root = RootMenuManager()

    def __unicode__(self):
        return self.text

    def children(self):
        return Menu.objects.filter(parent=self)
<commit_msg>Changed model fields verbose names<commit_after># -*- coding: utf-8 -*-

from collections import deque

from django.db import models
from django.utils.translation import ugettext as _
from django.db.models.signals import post_save
from django.dispatch import receiver


class MenuManager(models.Manager):
    def get_queryset(self):
        return super(MenuManager, self).get_queryset().order_by('real_weight')


class RootMenuManager(MenuManager):
    def get_queryset(self):
        return super(RootMenuManager, self).get_queryset().filter(parent=None)


class Menu(models.Model):
    BITS_PER_LEVEL = 6  # 2 ** 6 = 64 (who want more? idiot!?)
    LEVELS = 4  # levels count (level 0, level 1, ..., level LEVELS - 1)
    MAX_LEVEL = LEVELS - 1

    text = models.CharField(verbose_name=_(u'Text'), max_length=255)
    parent = models.ForeignKey('self', verbose_name=_(u'Rodič'), default=None, blank=True, null=True)
    url = models.CharField(verbose_name=_(u"Link"), max_length=255)
    weight = models.PositiveIntegerField(verbose_name=_(u"Order"), default=1)
    real_weight = models.PositiveIntegerField(default=0, editable=False)

    objects = MenuManager()
    root = RootMenuManager()

    def __unicode__(self):
        return self.text

    def children(self):
        return Menu.objects.filter(parent=self)

{'fraction_non_alphanumeric': 0.11876665397792158, 'fraction_numerical': 0.01446516939474686, 'mean_word_length': 4.287726358148894, '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': '6397167', 'n_tokens_mistral': 863, 'n_tokens_neox': 803, 'n_words': 190}