admin.py 426 Bytes
Newer Older
1
from django.contrib import admin
2

3
from picampaign.contact.models import Contact, Phone
4

5
class ContactAdmin(admin.ModelAdmin):
6
    list_display = ['full_name', 'mail', 'twitter']
7 8
    search_fields = ('first_name', 'last_name')

9 10 11
class PhoneAdmin(admin.ModelAdmin):
    list_display = ['phone', 'valid', 'contact']
    search_fields = ('phone',)
12

13
admin.site.register(Phone, PhoneAdmin)
14
admin.site.register(Contact, ContactAdmin)