from django.contrib import admin

from .models import Attachment, Letter


class AttachmentInline(admin.StackedInline):
    '''
        Stacked Inline View for Attachment
    '''
    model = Attachment


class LetterAdmin(admin.ModelAdmin):
    '''
        Admin View for Letter
    '''
    inlines = [
        AttachmentInline,
    ]

admin.site.register(Letter, LetterAdmin)

from django.contrib import admin

from .models import Attachment, Letter


class AttachmentInline(admin.StackedInline):
    '''
        Stacked Inline View for Attachment
    '''
    model = Attachment


@admin.register(Letter)
class LetterAdmin(admin.ModelAdmin):
    '''
        Admin View for Letter
    '''
    inlines = [
        AttachmentInline,
    ]

Rewrite DjangoAdmin in letters for decorators
Rewrite DjangoAdmin in letters for decorators
