# Path: staff/models.py
# class StaffMember(BaseStaffMember):
#     pass
# 
# Path: staff/forms.py
# class ContactForm(forms.Form):
#     """
#     A simple contact form to allow contacting the staff
#     """
#     name = forms.CharField(label=_('Your Name'))
#     email = forms.EmailField(label=_('Your Email'))
#     message = forms.CharField(label=_('Message'), widget=forms.Textarea)


from datetime import datetime
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.template.loader import render_to_string
from django.core.mail import EmailMessage
from staff.models import StaffMember
from staff.forms import ContactForm
        from story.settings import PUBLISHED_STATUS
import json
            'last_name': '',
            'email': '',
            'slug': '',
            'bio': '',
            'phone': '',
            'is_active': False}

    try:
        member = StaffMember.objects.get(pk=user_id)
        for key in data.keys():
            if hasattr(member, key):
                data[key] = getattr(member, key, '')

    except StaffMember.DoesNotExist:
        pass

    return HttpResponse(json.dumps(data),
                        mimetype='application/json')


def contact(request, slug, template_name='staffmembers/contact.html',
            success_url='/staff/contact/done/',
            email_subject_template='staffmembers/emails/subject.txt',
            email_body_template='staffmembers/emails/body.txt'):
    """
    Handle a contact request
    """
    member = get_object_or_404(StaffMember, slug__iexact=slug, is_active=True)

    if request.method == 'POST':

# Path: staff/models.py
# class StaffMember(BaseStaffMember):
#     pass
# 
# Path: staff/forms.py
# class ContactForm(forms.Form):
#     """
#     A simple contact form to allow contacting the staff
#     """
#     name = forms.CharField(label=_('Your Name'))
#     email = forms.EmailField(label=_('Your Email'))
#     message = forms.CharField(label=_('Message'), widget=forms.Textarea)


# Path: staff/views.py
from datetime import datetime
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from django.template.loader import render_to_string
from django.core.mail import EmailMessage
from staff.models import StaffMember
from staff.forms import ContactForm
        from story.settings import PUBLISHED_STATUS
import json

            'last_name': '',
            'email': '',
            'slug': '',
            'bio': '',
            'phone': '',
            'is_active': False}

    try:
        member = StaffMember.objects.get(pk=user_id)
        for key in data.keys():
            if hasattr(member, key):
                data[key] = getattr(member, key, '')

    except StaffMember.DoesNotExist:
        pass

    return HttpResponse(json.dumps(data),
                        mimetype='application/json')


def contact(request, slug, template_name='staffmembers/contact.html',
            success_url='/staff/contact/done/',
            email_subject_template='staffmembers/emails/subject.txt',
            email_body_template='staffmembers/emails/body.txt'):
    """
    Handle a contact request
    """
    member = get_object_or_404(StaffMember, slug__iexact=slug, is_active=True)

    if request.method == 'POST':

        form = ContactForm(request.POST)