# Path: findingaids/fa_admin/views.py
# def main(request):
# def list_files(request, archive):
# def archive_order(request):
# def current_archive(request):
# def logout(request):
# def _prepublication_check(request, filename, archive, mode='publish', xml=None):
# def publish(request):
# def preview(request, archive):
# def prepared_eadxml(request, archive, filename):
#         def get_log_message(arg):
# def prepared_ead(request, archive, filename, mode):
# def list_published(request, archive=None):
# def delete_ead(request, id, archive=None):
# def init_ldap_user(request):
# 
# Path: findingaids/fa_admin/models.py
# class Archivist(models.Model):
#     user = models.OneToOneField(settings.AUTH_USER_MODEL,
#         on_delete=models.CASCADE)  # if user is deleted, delete archivist too
#     archives = models.ManyToManyField(Archive, blank=True)
#     order = models.CommaSeparatedIntegerField(max_length=255, blank=True,
#         null=True)
# 
#     def __repr__(self):
#         return '<Archivist %s: %s>' % (self.user.username,
#             ', '.join(arch.label for arch in self.archives.all()))
# 
#     def __unicode__(self):
#         return u'Archivist %s (%s)' % (unicode(self.user),
#             ', '.join(arch.label for arch in self.archives.all()))
# 
#     def sorted_archives(self):
#         '''List of archives this user is associated with, in order if
#         they have specified any order preference.'''
#         archives = self.archives.all()
#         # if no archives are explicitly defined and this is a superuser,
#         # give them access to all
#         if not archives and self.user.is_superuser:
#             archives = Archive.objects.all()
#         if self.order:
#             id_order = [int(id) for id in self.order.split(',')]
#             # if id is not present (e.g., new archive), sort to the end
#             return sorted(archives,
#                 key=lambda a: id_order.index(a.id) if a.id in id_order else 50)
# 
#         return archives


from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from findingaids.fa_admin import views
from findingaids.fa_admin.models import Archivist



# Define an inline admin descriptor for Employee model
# which acts a bit like a singleton
class ArchivistInline(admin.StackedInline):
    model = Archivist
    can_delete = False
    verbose_name_plural = 'archivist'
    fields = ('archives', )


# patch some custom properties onto User for display in admin site
User = get_user_model()



# Path: findingaids/fa_admin/views.py
# def main(request):
# def list_files(request, archive):
# def archive_order(request):
# def current_archive(request):
# def logout(request):
# def _prepublication_check(request, filename, archive, mode='publish', xml=None):
# def publish(request):
# def preview(request, archive):
# def prepared_eadxml(request, archive, filename):
#         def get_log_message(arg):
# def prepared_ead(request, archive, filename, mode):
# def list_published(request, archive=None):
# def delete_ead(request, id, archive=None):
# def init_ldap_user(request):
# 
# Path: findingaids/fa_admin/models.py
# class Archivist(models.Model):
#     user = models.OneToOneField(settings.AUTH_USER_MODEL,
#         on_delete=models.CASCADE)  # if user is deleted, delete archivist too
#     archives = models.ManyToManyField(Archive, blank=True)
#     order = models.CommaSeparatedIntegerField(max_length=255, blank=True,
#         null=True)
# 
#     def __repr__(self):
#         return '<Archivist %s: %s>' % (self.user.username,
#             ', '.join(arch.label for arch in self.archives.all()))
# 
#     def __unicode__(self):
#         return u'Archivist %s (%s)' % (unicode(self.user),
#             ', '.join(arch.label for arch in self.archives.all()))
# 
#     def sorted_archives(self):
#         '''List of archives this user is associated with, in order if
#         they have specified any order preference.'''
#         archives = self.archives.all()
#         # if no archives are explicitly defined and this is a superuser,
#         # give them access to all
#         if not archives and self.user.is_superuser:
#             archives = Archive.objects.all()
#         if self.order:
#             id_order = [int(id) for id in self.order.split(',')]
#             # if id is not present (e.g., new archive), sort to the end
#             return sorted(archives,
#                 key=lambda a: id_order.index(a.id) if a.id in id_order else 50)
# 
#         return archives


# Path: findingaids/fa_admin/admin.py
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.contrib.auth.admin import UserAdmin
from findingaids.fa_admin import views
from findingaids.fa_admin.models import Archivist




# Define an inline admin descriptor for Employee model
# which acts a bit like a singleton
class ArchivistInline(admin.StackedInline):
    model = Archivist
    can_delete = False
    verbose_name_plural = 'archivist'
    fields = ('archives', )


# patch some custom properties onto User for display in admin site
User = get_user_model()



def group_list(self):