"""Django Admin Panels for App"""
from django.contrib import admin

from mailer import models

@admin.register(models.SendingAddress)
class SendingAddressAdmin(admin.ModelAdmin):
    """Admin View for SendingAddress"""
    list_display = ('address', 'organization')
    list_filter = ('organization__name',)
    actions = None

    def has_delete_permission(self, request, obj=None):
        """The primary address can not be deleted via the django admin"""
        if obj and obj.pk == 1:
            return False
        else:
            return True

[((6, 1, 6, 38), 'django.contrib.admin.register', 'admin.register', ({(6, 16, 6, 37): 'models.SendingAddress'}, {}), '(models.SendingAddress)', False, 'from django.contrib import admin\n')]