1 from django.contrib import admin
2 from recipes.maayanwich.models import Ingredient, Sandwich
4 class IngredientAdmin(admin.ModelAdmin):
5 prepopulated_fields = {"slug": ("name",)}
7 class SandwichAdmin(admin.ModelAdmin):
8 prepopulated_fields = {"slug": ("adjective",)}
10 admin.site.register(Ingredient, IngredientAdmin)
11 admin.site.register(Sandwich, SandwichAdmin)