<commit_before>from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
                           Referencing, Route, Client_avoid_component,
                           Client_avoid_ingredient, Option,
                           Client_option, Restriction)

admin.site.register(Member)
admin.site.register(Client)
admin.site.register(Route)
admin.site.register(Contact)
admin.site.register(Address)
admin.site.register(Referencing)
admin.site.register(Client_avoid_component)
admin.site.register(Client_avoid_ingredient)
admin.site.register(Option)
admin.site.register(Client_option)
admin.site.register(Restriction)<commit_msg>Add ingredients to avoid as a TabularInline to Client<commit_after>from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
                           Referencing, Route, Client_avoid_component,
                           Client_avoid_ingredient, Option,
                           Client_option, Restriction)

from meal.models import Ingredient


class IngredientsToAvoidInline(admin.TabularInline):
    model = Client.ingredients_to_avoid.through


class ClientAdmin(admin.ModelAdmin):

    inlines = [
        IngredientsToAvoidInline
    ]


admin.site.register(Member)
admin.site.register(Client, ClientAdmin)
admin.site.register(Route)
admin.site.register(Contact)
admin.site.register(Address)
admin.site.register(Referencing)
admin.site.register(Client_avoid_component)
admin.site.register(Option)
admin.site.register(Client_option)
admin.site.register(Restriction)
{'fraction_non_alphanumeric': 0.08507936507936507, 'fraction_numerical': 0.0, 'mean_word_length': 3.8792569659442724, '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': '6136978', 'n_tokens_mistral': 448, 'n_tokens_neox': 430, 'n_words': 77}