[Answer]-Django admin.py missing field error

1👍

You can’t edit fields from related models directly in fieldsets.

I suspect you have your foreign key the wrong way round. If you had a FK from Image pointing to Entry, you could use inline admins:

class ImageInlineAdmin(admin.TabularInline):
    model = Image

class EntryAdmin(admin.ModelAdmin):
    fieldsets = [('File info', {'fields': ['name','password']})]
    inlines = ImageInlineAdmin
    list_display = ('name', 'mimeType', 'password') 

admin.site.register(Entry)

Leave a comment