<commit_before>from django.contrib import admin
from xbrowse_server.base.models import *

admin.site.register(Project)
admin.site.register(Family)
admin.site.register(FamilyImageSlide)
admin.site.register(Cohort)
admin.site.register(Individual)
admin.site.register(DiseaseGeneList)
admin.site.register(ReferencePopulation)
admin.site.register(ProjectPhenotype)
admin.site.register(UserProfile)

admin.site.register(FamilySearchFlag)

admin.site.register(VCFFile)
admin.site.register(FamilyGroup)<commit_msg>updating admin so I can select family image slides<commit_after>from django.contrib import admin
from xbrowse_server.base.models import *
from django import forms

admin.site.register(Project)
admin.site.register(Family)
admin.site.register(Cohort)
admin.site.register(Individual)
admin.site.register(DiseaseGeneList)
admin.site.register(ReferencePopulation)
admin.site.register(ProjectPhenotype)
admin.site.register(UserProfile)

admin.site.register(FamilySearchFlag)

admin.site.register(VCFFile)
admin.site.register(FamilyGroup)


class FamilyModelChoiceField(forms.ModelChoiceField):
    def label_from_instance(self, obj):
        return "%s - %s" % (obj.project.project_id, obj.family_id)

class FamilyImageSlideAdminForm(forms.ModelForm):
    family = FamilyModelChoiceField(queryset=Family.objects.all())
    class Meta:
        model = FamilyImageSlide


class FamilyImageSlideAdmin(admin.ModelAdmin):
    form = FamilyImageSlideAdminForm






admin.site.register(FamilyImageSlide, FamilyImageSlideAdmin)
{'fraction_non_alphanumeric': 0.09861932938856016, 'fraction_numerical': 0.0, 'mean_word_length': 6.968586387434555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6932967', 'n_tokens_mistral': 475, 'n_tokens_neox': 455, 'n_words': 72}