<commit_before>from django.db import models
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from django.core.cache import cache
from django.db.models.signals import post_save
from countries.models import Country
from dialer_cdr.models import Callrequest
from dialer_gateway.models import Gateway
from voip_app.models import VoipApp
from user_profile.models import UserProfile
from datetime import datetime, timedelta
from common.intermediate_model_base_class import Model
from random import *


CONTACT_STATUS = (
    (1, u'ACTIVE'),
    (0, u'INACTIVE'),
)

CAMPAIGN_SUBSCRIBER_STATUS = (
    (1, u'PENDING'),
    (2, u'PAUSE'),
    (3, u'ABORT'),
    (4, u'FAIL'),
    (5, u'COMPLETE'),
    (6, u'IN PROCESS'),
    (7, u'NOT AUTHORIZED'),
)

CAMPAIGN_STATUS = (
    (1, u'START'),
    (2, u'PAUSE'),
    (3, u'ABORT'),
    (4, u'END'),
)

DAY_STATUS = (
    (1, u'YES'),
    (0, u'NO'),
)

def get_unique_code(length):
    """Get unique code"""
    chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    return ''.join([choice(chars) for i in range(length)])


class Phonebook(Model):
    """This defines the Phonebook

    **Attributes**:

        * ``name`` - phonebook name.
        * ``description`` - description about phonebook.<commit_msg>quick fix on missing DAYS<commit_after>from django.db import models
from django.utils.translation import ugettext as _
from django.core.urlresolvers import reverse
from django.core.cache import cache
from django.db.models.signals import post_save
from countries.models import Country
from dialer_cdr.models import Callrequest
from dialer_gateway.models import Gateway
from voip_app.models import VoipApp
from user_profile.models import UserProfile
from datetime import datetime, timedelta
from common.intermediate_model_base_class import Model
from random import *


CONTACT_STATUS = (
    (1, u'ACTIVE'),
    (0, u'INACTIVE'),
)

CAMPAIGN_SUBSCRIBER_STATUS = (
    (1, u'PENDING'),
    (2, u'PAUSE'),
    (3, u'ABORT'),
    (4, u'FAIL'),
    (5, u'COMPLETE'),
    (6, u'IN PROCESS'),
    (7, u'NOT AUTHORIZED'),
)

CAMPAIGN_STATUS = (
    (1, u'START'),
    (2, u'PAUSE'),
    (3, u'ABORT'),
    (4, u'END'),
)

DAY_STATUS = (
    (1, u'YES'),
    (0, u'NO'),
)

DAYS = (
    ('monday', u'monday'),
    ('tuesday', u'tuesday'),
    ('wednesday', u'wednesday'),
    ('thursday', u'thursday'),
    ('friday', u'friday'),
    ('saturday', u'saturday'),
    ('sunday', u'sunday'),
)

def get_unique_code(length):
    """Get unique code"""
    chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    return ''.join([choice(chars) for i in range(length)])


class Phonebook(Model):
    """This defines the Phonebook

    **Attributes**:

        * ``name`` - phonebook name.
        * ``description`` - description about phonebook.
{'fraction_non_alphanumeric': 0.14094903339191564, 'fraction_numerical': 0.01054481546572935, 'mean_word_length': 3.9581881533101044, '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': '2626986', 'n_tokens_mistral': 1019, 'n_tokens_neox': 992, 'n_words': 250}