-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.py
executable file
·39 lines (26 loc) · 970 Bytes
/
admin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from django.contrib import admin
from apps.websites.models import *
class ClientNoteAdmin(admin.ModelAdmin):
prepopulated_fields = { 'slug': ['title'] }
class WebsiteNoteAdmin(admin.ModelAdmin):
prepopulated_fields = { 'slug': ['title'] }
class WebsiteNoteInline(admin.TabularInline):
model = WebsiteNote
prepopulated_fields = { 'slug': ['title'] }
class ClientNoteInline(admin.TabularInline):
model = ClientNote
prepopulated_fields = { 'slug': ['title'] }
class IncidentAdmin(admin.ModelAdmin):
pass
class WebsiteAdmin(admin.ModelAdmin):
prepopulated_fields = { 'slug': ['name'] }
inlines = [
WebsiteNoteInline,
]
class SupportTypeAdmin(admin.ModelAdmin):
prepopulated_fields = { 'slug': ['name'] }
admin.site.register(Website, WebsiteAdmin)
admin.site.register(ClientNote, ClientNoteAdmin)
admin.site.register(WebsiteNote, WebsiteNoteAdmin)
admin.site.register(Incident, IncidentAdmin)
admin.site.register(SupportType, SupportTypeAdmin)