Ticket #26115: admin.py

File admin.py, 442 bytes (added by Kevin Mann, 9 years ago)

Admin site configuration that yields bug.

Line 
1from django.contrib import admin
2from .models import Employee, EmployeeTitle, Title
3
4# Register your models here.
5class EmployeeTitleInline(admin.TabularInline):
6 model = EmployeeTitle
7 extra = 0
8
9@admin.register(Employee)
10class EmployeeAdmin(admin.ModelAdmin):
11 inlines = (EmployeeTitleInline,)
12 list_display = (
13 'name',
14 'current_title',
15 )
16
17@admin.register(Title)
18class TitleAdmin(admin.ModelAdmin):
19 pass
Back to Top