<commit_before>import watson

from django.db import models
from django.conf import settings
from django.core.urlresolvers import reverse

from django_extensions.db.fields import (
    AutoSlugField, CreationDateTimeField, ModificationDateTimeField)
from geoposition.fields import GeopositionField
from taggit.managers import TaggableManager

from us_ignite.constants import IMAGE_HELP_TEXT
from us_ignite.common.fields import AutoUUIDField, URL_HELP_TEXT
from us_ignite.events import managers, exporter, search


class Audience(models.Model):
    name = models.CharField(max_length=255)
    slug = AutoSlugField(populate_from='name', unique=True)

    def __unicode__(self):
        return self.name

    class Meta:
        ordering = ('name', )


class EventType(models.Model):
    name = models.CharField(max_length=255)
    slug = AutoSlugField(populate_from='name', unique=True)

    def __unicode__(self):
        return self.name

    class Meta:
        ordering = ('name', )


class Event(models.Model):
    PUBLISHED = 1
    DRAFT = 2
    REMOVED = 3
    STATUS_CHOICES = (
        (PUBLISHED, 'Published'),
        (DRAFT, 'Draft'),
        (REMOVED, 'Removed'),
    )
    NATIONAL = 1
    REGIONAL = 2
    GLOBAL = 3
    SCOPE_CHOICES = (
        (NATIONAL, 'National'),
        (REGIONAL, 'Regional'),
        (GLOBAL, 'Global'),
    )
    DEFAULT = 1
    GLOBALCITIES = 2
    SECTION_CHOICES = (
        (DEFAULT, u'Default'),
        (GLOBALCITIES, u'Global Cities'),
    )
    name = models.CharField(max_length=500, verbose_name=u'event name')
    slug = AutoUUIDField(unique=True, editable=True)
    status = models.IntegerField(choices=STATUS_CHOICES, default=PUBLISHED)
    image = models.ImageField(
        upload_to="events", blank=True, help_text=IMAGE_HELP_TEXT)
    description = models.TextField(verbose_name=u'short description')
    start_datetime = models.DateTimeField(verbose_name=u'Start Date/Time')
    end_datetime = models.DateTimeField(
        blank=True, null=True, verbose_name=u'End Date/Time')
    timezone = models.CharField(
        max_length=30, choices=settings.US_TIMEZONES, default='US/Eastern')
    address = models.TextField()
    contact = models.ForeignKey(
        'organizations.Organization', blank=True, null=True,
        on_delete=models.SET_NULL, verbose_name=u'Organization')
    scope = models.IntegerField(choices=SCOPE_CHOICES, default=NATIONAL)
    audiences = models.ManyToManyField('events.Audience', blank=True)
    audience_other = models.CharField(blank=True, max_length=200)
    website = models.URLField(
        max_length=500, blank=True, help_text=URL_HELP_TEXT)
    event_type = models.ForeignKey(
        'events.EventType', blank=True, null=True, on_delete=models.SET_NULL)
    section = models.IntegerField(choices=SECTION_CHOICES, default=DEFAULT)
    tickets_url = models.URLField(
        max_length=500, blank=True, verbose_name=u'Tickets URL',
        help_text=URL_HELP_TEXT)
    tags = TaggableManager(blank=True)
    hubs = models.ManyToManyField(
        'hubs.Hub', verbose_name=u'communities', blank=True)
    actionclusters = models.ManyToManyField(
        'actionclusters.ActionCluster', verbose_name=u'communities', blank=True)
    position = GeopositionField(blank=True)
    user = models.ForeignKey(
        'auth.User', blank=True, null=True, on_delete=models.SET_NULL)
    is_ignite = models.BooleanField(default=False)
    is_featured = models.BooleanField(default=False)
    notes = models.TextField(blank=True)
    created = CreationDateTimeField()
    modified = ModificationDateTimeField()

    # managers:
    objects = models.Manager()<commit_msg>Update description of ``section`` field in Events.<commit_after>import watson

from django.db import models
from django.conf import settings
from django.core.urlresolvers import reverse

from django_extensions.db.fields import (
    AutoSlugField, CreationDateTimeField, ModificationDateTimeField)
from geoposition.fields import GeopositionField
from taggit.managers import TaggableManager

from us_ignite.constants import IMAGE_HELP_TEXT
from us_ignite.common.fields import AutoUUIDField, URL_HELP_TEXT
from us_ignite.events import managers, exporter, search


class Audience(models.Model):
    name = models.CharField(max_length=255)
    slug = AutoSlugField(populate_from='name', unique=True)

    def __unicode__(self):
        return self.name

    class Meta:
        ordering = ('name', )


class EventType(models.Model):
    name = models.CharField(max_length=255)
    slug = AutoSlugField(populate_from='name', unique=True)

    def __unicode__(self):
        return self.name

    class Meta:
        ordering = ('name', )


class Event(models.Model):
    PUBLISHED = 1
    DRAFT = 2
    REMOVED = 3
    STATUS_CHOICES = (
        (PUBLISHED, 'Published'),
        (DRAFT, 'Draft'),
        (REMOVED, 'Removed'),
    )
    NATIONAL = 1
    REGIONAL = 2
    GLOBAL = 3
    SCOPE_CHOICES = (
        (NATIONAL, 'National'),
        (REGIONAL, 'Regional'),
        (GLOBAL, 'Global'),
    )
    DEFAULT = 1
    GLOBALCITIES = 2
    SECTION_CHOICES = (
        (DEFAULT, u'Default'),
        (GLOBALCITIES, u'Global City Teams'),
    )
    name = models.CharField(max_length=500, verbose_name=u'event name')
    slug = AutoUUIDField(unique=True, editable=True)
    status = models.IntegerField(choices=STATUS_CHOICES, default=PUBLISHED)
    image = models.ImageField(
        upload_to="events", blank=True, help_text=IMAGE_HELP_TEXT)
    description = models.TextField(verbose_name=u'short description')
    start_datetime = models.DateTimeField(verbose_name=u'Start Date/Time')
    end_datetime = models.DateTimeField(
        blank=True, null=True, verbose_name=u'End Date/Time')
    timezone = models.CharField(
        max_length=30, choices=settings.US_TIMEZONES, default='US/Eastern')
    address = models.TextField()
    contact = models.ForeignKey(
        'organizations.Organization', blank=True, null=True,
        on_delete=models.SET_NULL, verbose_name=u'Organization')
    scope = models.IntegerField(choices=SCOPE_CHOICES, default=NATIONAL)
    audiences = models.ManyToManyField('events.Audience', blank=True)
    audience_other = models.CharField(blank=True, max_length=200)
    website = models.URLField(
        max_length=500, blank=True, help_text=URL_HELP_TEXT)
    event_type = models.ForeignKey(
        'events.EventType', blank=True, null=True, on_delete=models.SET_NULL)
    section = models.IntegerField(
        choices=SECTION_CHOICES, default=DEFAULT, help_text=u'Section where '
        'this event will be listed. Default is the main section.')
    tickets_url = models.URLField(
        max_length=500, blank=True, verbose_name=u'Tickets URL',
        help_text=URL_HELP_TEXT)
    tags = TaggableManager(blank=True)
    hubs = models.ManyToManyField(
        'hubs.Hub', verbose_name=u'communities', blank=True)
    actionclusters = models.ManyToManyField(
        'actionclusters.ActionCluster', verbose_name=u'communities', blank=True)
    position = GeopositionField(blank=True)
    user = models.ForeignKey(
        'auth.User', blank=True, null=True, on_delete=models.SET_NULL)
    is_ignite = models.BooleanField(default=False)
    is_featured = models.BooleanField(default=False)
    notes = models.TextField(blank=True)
    created = CreationDateTimeField()
    modified = ModificationDateTimeField()

    # managers:
    objects = models.Manager()
{'fraction_non_alphanumeric': 0.10457779567727211, 'fraction_numerical': 0.007517787622499664, 'mean_word_length': 3.911008569545155, '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': '634645', 'n_tokens_mistral': 2422, 'n_tokens_neox': 2308, 'n_words': 449}