# Path: staff/admin.py
# class StaffMemberAdmin(admin.StackedInline):
#     """
#     Admin form for a StaffMember that won't appear if the associated User
#     isn't actually a staff member.
#     """
#     # form = StaffMemberForm
#     # template = ADMIN_TEMPLATE
#     fieldsets = (
#         ('Personal Info', {'fields': ('title', 'bio', 'photo', 'website', 'phone',)}),
#         ('Social Media', {'fields': ('twitter', 'facebook', 'google_plus')}),
#     )
#     model = StaffMember
#     max_num = 1
# 
#     def get_formset(self, request, obj=None, **kwargs):
#         """
#         Return a form, if the obj has a staffmember object, otherwise
#         return an empty form
#         """
#         if obj is not None and self.model.objects.filter(user=obj).count():
#             return super(StaffMemberAdmin, self).get_formset(
#                 request,
#                 obj,
#                 **kwargs
#             )
# 
#         defaults = {
#             "exclude": None,
#             "extra": 0,
#             "max_num": 0,
#         }
#         return inlineformset_factory(self.parent_model, self.model, **defaults)
# 
# Path: example/mystaff/models.py
# class MyStaffMember(BaseStaffMember):
#     """docstring for MyStaffMember"""
# 
#     github = models.CharField(max_length=50, blank=True)


from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin
from django.contrib import admin
from staff.admin import StaffMemberAdmin
from .models import MyStaffMember



class MyStaffMemberAdmin(StaffMemberAdmin):
    fieldsets = (
        ('Personal Info', {'fields': ('bio', 'photo', 'website', 'phone',)}),
        ('Social Media', {'fields': ('github','twitter', 'facebook', 'google_plus')}),
        ('Responsibilities', {'fields': ('sites',)}),
    )
    model = MyStaffMember


# Path: staff/admin.py
# class StaffMemberAdmin(admin.StackedInline):
#     """
#     Admin form for a StaffMember that won't appear if the associated User
#     isn't actually a staff member.
#     """
#     # form = StaffMemberForm
#     # template = ADMIN_TEMPLATE
#     fieldsets = (
#         ('Personal Info', {'fields': ('title', 'bio', 'photo', 'website', 'phone',)}),
#         ('Social Media', {'fields': ('twitter', 'facebook', 'google_plus')}),
#     )
#     model = StaffMember
#     max_num = 1
# 
#     def get_formset(self, request, obj=None, **kwargs):
#         """
#         Return a form, if the obj has a staffmember object, otherwise
#         return an empty form
#         """
#         if obj is not None and self.model.objects.filter(user=obj).count():
#             return super(StaffMemberAdmin, self).get_formset(
#                 request,
#                 obj,
#                 **kwargs
#             )
# 
#         defaults = {
#             "exclude": None,
#             "extra": 0,
#             "max_num": 0,
#         }
#         return inlineformset_factory(self.parent_model, self.model, **defaults)
# 
# Path: example/mystaff/models.py
# class MyStaffMember(BaseStaffMember):
#     """docstring for MyStaffMember"""
# 
#     github = models.CharField(max_length=50, blank=True)


# Path: example/mystaff/admin.py
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin
from django.contrib import admin
from staff.admin import StaffMemberAdmin
from .models import MyStaffMember




class MyStaffMemberAdmin(StaffMemberAdmin):
    fieldsets = (
        ('Personal Info', {'fields': ('bio', 'photo', 'website', 'phone',)}),
        ('Social Media', {'fields': ('github','twitter', 'facebook', 'google_plus')}),
        ('Responsibilities', {'fields': ('sites',)}),
    )
    model = MyStaffMember


class MyStaffUserAdmin(UserAdmin):