<commit_before>import os

from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.db.models import Q
from django.contrib.contenttypes.fields import GenericForeignKey
from django.template.defaultfilters import slugify, truncatechars
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone as datetime
from django.core.urlresolvers import reverse
from django.utils.encoding import python_2_unicode_compatible
from django.db.models.query import QuerySet

from ..compat import AUTH_USER_MODEL
from ..settings import ALLOWED_LANGUAGES

from separatedvaluesfield.models import SeparatedValuesField


def get_file_path(instance, filename):
    fname, ext = os.path.splitext(filename)
    filename = unicode("%s%s" % (slugify(truncatechars(fname, 50)), ext))

    return os.path.join("courriers", "uploads", filename)


@python_2_unicode_compatible
class NewsletterList(models.Model):
    name = models.CharField(max_length=255)
    slug = models.SlugField(max_length=255, unique=True)
    description = models.TextField(blank=True, null=True)
    created_at = models.DateTimeField(auto_now_add=True)
    list_id = models.IntegerField(null=True)

    class Meta:<commit_msg>chore: remove useless imports<commit_after>import os

from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
from django.template.defaultfilters import slugify, truncatechars
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone as datetime
from django.core.urlresolvers import reverse
from django.utils.encoding import python_2_unicode_compatible
from django.db.models.query import QuerySet

from ..settings import ALLOWED_LANGUAGES


def get_file_path(instance, filename):
    fname, ext = os.path.splitext(filename)
    filename = unicode("%s%s" % (slugify(truncatechars(fname, 50)), ext))

    return os.path.join("courriers", "uploads", filename)


@python_2_unicode_compatible
class NewsletterList(models.Model):
    name = models.CharField(max_length=255)
    slug = models.SlugField(max_length=255, unique=True)
    description = models.TextField(blank=True, null=True)
    created_at = models.DateTimeField(auto_now_add=True)
    list_id = models.IntegerField(null=True)

    class Meta:
{'fraction_non_alphanumeric': 0.08340353833192923, 'fraction_numerical': 0.008424599831508003, 'mean_word_length': 5.90406976744186, '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': '5075700', 'n_tokens_mistral': 720, 'n_tokens_neox': 687, 'n_words': 170}