# Path: likert_field/models.py
# class LikertField(models.IntegerField):
#     """A Likert field is simply stored as an IntegerField"""
# 
#     description = _('Likert item field')
# 
#     def __init__(self, *args, **kwargs):
#         """
#         LikertField stores items with no answer as NULL
# 
#         By default responses are optional, so 'blank' is True
#         """
#         if kwargs.get('null', True):
#             kwargs['null'] = True
# 
#         if kwargs.get('blank', True):
#             kwargs['blank'] = True
# 
#         super(LikertField, self).__init__(*args, **kwargs)
# 
#     def __str__(self):
#         return "%s" % force_text(self.description)
# 
#     def get_prep_value(self, value):
#         """
#         Perform preliminary non-db specific value checks and conversions.
# 
#         The field expects a number as a string (ie. '2'). Unscored fields are
#         empty strings and are stored as NULL
#         """
#         if value is None:
#             return None
# 
#         if isinstance(value, string_types) and len(value) == 0:
#             return None
# 
#         value = int(value)
#         if value < 0:
#             value = 0
# 
#         return value
# 
#     def formfield(self, **kwargs):
#         defaults = {
#             'min_value': 0,
#             'form_class': forms.LikertFormField
#         }
#         defaults.update(kwargs)
#         return super(LikertField, self).formfield(**defaults)


from django.db import models
from likert_field.models import LikertField
# -*- coding: utf-8 -*-
from __future__ import unicode_literals




class MuffinModel(models.Model):
    fudge_is_yummy = LikertField()
    # item = LikertField('fudge beats everything')

    # Parameters tests
    # too_many_questions = LikertField(null=True, blank=True)

# Path: likert_field/models.py
# class LikertField(models.IntegerField):
#     """A Likert field is simply stored as an IntegerField"""
# 
#     description = _('Likert item field')
# 
#     def __init__(self, *args, **kwargs):
#         """
#         LikertField stores items with no answer as NULL
# 
#         By default responses are optional, so 'blank' is True
#         """
#         if kwargs.get('null', True):
#             kwargs['null'] = True
# 
#         if kwargs.get('blank', True):
#             kwargs['blank'] = True
# 
#         super(LikertField, self).__init__(*args, **kwargs)
# 
#     def __str__(self):
#         return "%s" % force_text(self.description)
# 
#     def get_prep_value(self, value):
#         """
#         Perform preliminary non-db specific value checks and conversions.
# 
#         The field expects a number as a string (ie. '2'). Unscored fields are
#         empty strings and are stored as NULL
#         """
#         if value is None:
#             return None
# 
#         if isinstance(value, string_types) and len(value) == 0:
#             return None
# 
#         value = int(value)
#         if value < 0:
#             value = 0
# 
#         return value
# 
#     def formfield(self, **kwargs):
#         defaults = {
#             'min_value': 0,
#             'form_class': forms.LikertFormField
#         }
#         defaults.update(kwargs)
#         return super(LikertField, self).formfield(**defaults)


# Path: test_projects/django14/suthern/models.py
from django.db import models
from likert_field.models import LikertField

# -*- coding: utf-8 -*-
from __future__ import unicode_literals




class MuffinModel(models.Model):
    fudge_is_yummy = LikertField()
    # item = LikertField('fudge beats everything')

    # Parameters tests
    # too_many_questions = LikertField(null=True, blank=True)

    too_many_questions = LikertField(null=False, blank=False, default=3)