From ec68c34701838e1f4bf86547a1b5e2b44a8b45eb Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 1 Jan 2017 17:31:57 -0600 Subject: [PATCH] Add Visit to admin. --- bikeshop_project/core/admin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bikeshop_project/core/admin.py b/bikeshop_project/core/admin.py index db26c22..f9acfdf 100644 --- a/bikeshop_project/core/admin.py +++ b/bikeshop_project/core/admin.py @@ -2,4 +2,10 @@ from django.contrib import admin from .models import Membership, Payment, Visit # Register your models here. -admin.site.register([Membership, Payment, Visit]) +admin.site.register([Membership, Payment]) + + +@admin.register(Visit) +class VistAdmin(admin.ModelAdmin): + ordering = ('created_at',) + list_display = ('member', 'purpose', 'created_at')