from django.contrib import admin
from .models import Categoria, Contact


class ContactAdmin(admin.ModelAdmin):
    list_display = ('id', 'name', 'last_name', 'phone', 'email', 'creation_date', 'categoria', 'show')
    list_display_links = ('id', 'name', 'last_name')
    list_filter = ('categoria',)
    list_per_page = 10
    search_fields = ('name', 'last_name', 'phone')
    list_editable = ('phone', 'show')


admin.site.register(Categoria)
admin.site.register(Contact, ContactAdmin)

[((14, 0, 14, 30), 'django.contrib.admin.site.register', 'admin.site.register', ({(14, 20, 14, 29): 'Categoria'}, {}), '(Categoria)', False, 'from django.contrib import admin\n'), ((15, 0, 15, 42), 'django.contrib.admin.site.register', 'admin.site.register', ({(15, 20, 15, 27): 'Contact', (15, 29, 15, 41): 'ContactAdmin'}, {}), '(Contact, ContactAdmin)', False, 'from django.contrib import admin\n')]