<commit_before>from django.conf import settings
from django.db import models
from django.db.models import signals

from .signals import update_forum_votes
from .helpers import clean_text, format_post

from voting.models import Vote

UserModel = getattr(settings, "AUTH_USER_MODEL", "auth.User")
PAGINATE_BY = getattr(settings, "PAGINATE_BY", 25)


class Category(models.Model):
    """
    Top level organization, allowing for grouping for forums.
    """
    name = models.CharField(max_length=255)
    order = models.PositiveSmallIntegerField(default=0)

    class Meta:
        verbose_name_plural = "Categories"
        db_table      = 'forum_category'

    def __unicode__(self):
        return self.name

    def get_forum_names(self):
        return self.forum_set.values('forum_slug', 'forum_name')


class Forum(models.Model):
    """
    Groups and organizes topics. Admin-created.
    """
    category            = models.ForeignKey(Category, verbose_name="Forum Category")
    name                = models.CharField(max_length=255, verbose_name="Forum Name")
    slug                = models.SlugField(max_length=255)<commit_msg>Corrected forum_names helper.<commit_after>from django.conf import settings
from django.db import models
from django.db.models import signals

from .signals import update_forum_votes
from .helpers import clean_text, format_post

from voting.models import Vote

UserModel = getattr(settings, "AUTH_USER_MODEL", "auth.User")
PAGINATE_BY = getattr(settings, "PAGINATE_BY", 25)


class Category(models.Model):
    """
    Top level organization, allowing for grouping for forums.
    """
    name = models.CharField(max_length=255)
    order = models.PositiveSmallIntegerField(default=0)

    class Meta:
        verbose_name_plural = "Categories"
        db_table      = 'forum_category'

    def __unicode__(self):
        return self.name

    def get_forum_names(self):
        """
        Return forum names and slugs for the current category.
        """
        return self.forum_set.values('slug', 'name')


class Forum(models.Model):
    """
    Groups and organizes topics. Admin-created.
    """
    category            = models.ForeignKey(Category, verbose_name="Forum Category")
    name                = models.CharField(max_length=255, verbose_name="Forum Name")
    slug                = models.SlugField(max_length=255)
{'fraction_non_alphanumeric': 0.0943952802359882, 'fraction_numerical': 0.010113780025284451, 'mean_word_length': 3.2851985559566788, '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': '875204', 'n_tokens_mistral': 740, 'n_tokens_neox': 681, 'n_words': 168}