aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/admin.py
blob: f8ad2aa7fe03ad07121e6b6a11ed697d03b94ff5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from django.contrib import admin

from .models import Organisation, Address, AddressType


class AddressTypeAdmin(admin.ModelAdmin):
    pass


class AddressInLine(admin.StackedInline):
    model = Address
    max_num = 3
    extra = 1


class OrganisationAdmin(admin.ModelAdmin):
    inlines = [AddressInLine,]
    list_display = ('slug', 'name')


# Register your models here.
admin.site.register(Organisation, OrganisationAdmin)
admin.site.register(AddressType, AddressTypeAdmin)