# Path: staff/fields.py
# class RemovableImageField(models.ImageField, RemovableFileField):
#     """
#     A specific form of removeable file field, but specifically for images
#     """
#     attr_class = MyImageFieldFile
# 
#     def formfield(self, **kwargs):
#         defaults = {'form_class': RemovableImageFormField}
#         defaults.update(kwargs)
#         return super(RemovableImageField, self).formfield(**defaults)
# 
# Path: staff/settings.py
# DEFAULT_SETTINGS = {
#     'PHOTO_STORAGE': settings.DEFAULT_FILE_STORAGE,
#     'ORDERING': ('last_name', 'first_name'),
# }
# USER_SETTINGS = DEFAULT_SETTINGS.copy()
#     USER_SETTINGS['ORDERING'] = settings.STAFF_ORDERING
#     USER_SETTINGS['PHOTO_STORAGE'] = settings.STAFF_PHOTO_STORAGE


from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core.files.storage import get_storage_class
from django.db import models
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _
from django_localflavor_us.models import PhoneNumberField
from .fields import RemovableImageField
from .settings import PHOTO_STORAGE, ORDERING
    from django.core.exceptions import ImproperlyConfigured
        from django.db import transaction
    from django.db.models.signals import post_save
    """
    user = models.ForeignKey(User,
        limit_choices_to={'is_active': True},
        unique=True, verbose_name=_('User'))
    first_name = models.CharField(_('First Name'),
        max_length=150,
        help_text=_("""This field is linked to the User account and will
                    change its value."""),
        blank=True,
        null=True)
    last_name = models.CharField(_('Last Name'),
        max_length=150,
        help_text=_("""This field is linked to the User account and will
                    change its value."""),
        blank=True,
        null=True)
    slug = models.SlugField(unique=True)
    email = models.EmailField(_('e-mail'),
        blank=True,
        help_text=_("""This field is linked to the User account and will
                    change its value."""),
        null=True)
    title = models.CharField(
        _('Title'),
        max_length=50,
        blank=True,
        default="")
    bio = models.TextField(_('Biography'), blank=True)
    is_active = models.BooleanField(_('is a current employee'), default=True)
    phone = PhoneNumberField(_('Phone Number'), blank=True)

# Path: staff/fields.py
# class RemovableImageField(models.ImageField, RemovableFileField):
#     """
#     A specific form of removeable file field, but specifically for images
#     """
#     attr_class = MyImageFieldFile
# 
#     def formfield(self, **kwargs):
#         defaults = {'form_class': RemovableImageFormField}
#         defaults.update(kwargs)
#         return super(RemovableImageField, self).formfield(**defaults)
# 
# Path: staff/settings.py
# DEFAULT_SETTINGS = {
#     'PHOTO_STORAGE': settings.DEFAULT_FILE_STORAGE,
#     'ORDERING': ('last_name', 'first_name'),
# }
# USER_SETTINGS = DEFAULT_SETTINGS.copy()
#     USER_SETTINGS['ORDERING'] = settings.STAFF_ORDERING
#     USER_SETTINGS['PHOTO_STORAGE'] = settings.STAFF_PHOTO_STORAGE


# Path: staff/models.py
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core.files.storage import get_storage_class
from django.db import models
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext_lazy as _
from django_localflavor_us.models import PhoneNumberField
from .fields import RemovableImageField
from .settings import PHOTO_STORAGE, ORDERING
    from django.core.exceptions import ImproperlyConfigured
        from django.db import transaction
    from django.db.models.signals import post_save

    """
    user = models.ForeignKey(User,
        limit_choices_to={'is_active': True},
        unique=True, verbose_name=_('User'))
    first_name = models.CharField(_('First Name'),
        max_length=150,
        help_text=_("""This field is linked to the User account and will
                    change its value."""),
        blank=True,
        null=True)
    last_name = models.CharField(_('Last Name'),
        max_length=150,
        help_text=_("""This field is linked to the User account and will
                    change its value."""),
        blank=True,
        null=True)
    slug = models.SlugField(unique=True)
    email = models.EmailField(_('e-mail'),
        blank=True,
        help_text=_("""This field is linked to the User account and will
                    change its value."""),
        null=True)
    title = models.CharField(
        _('Title'),
        max_length=50,
        blank=True,
        default="")
    bio = models.TextField(_('Biography'), blank=True)
    is_active = models.BooleanField(_('is a current employee'), default=True)
    phone = PhoneNumberField(_('Phone Number'), blank=True)

    photo = RemovableImageField(_('Photo'),