Skip to content

Commit 3063535

Browse files
committed
Add custom admin.
1 parent bb3b74e commit 3063535

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

contact/admin.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
from django.contrib import admin
22

3-
# Register your models here.
3+
from contact.models import Contact
4+
5+
6+
class ContactAdmin(admin.ModelAdmin):
7+
list_display = ['email', 'subject', 'active', 'created']
8+
list_display_links = ['email']
9+
list_filter = ['active', 'created']
10+
search_fields = ['subject']
11+
list_editable = ['active']
12+
list_per_page = 10
13+
ordering = ('-id',)
14+
15+
16+
admin.site.register(Contact, ContactAdmin)

0 commit comments

Comments
 (0)