forked from extern/django-helpdesk
Check for model enabled before registering
This commit is contained in:
parent
280462c2fe
commit
fb21d9bcdc
@ -1,7 +1,7 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from helpdesk.models import Queue, Ticket, FollowUp, PreSetReply, KBCategory
|
from helpdesk.models import Queue, Ticket, FollowUp, PreSetReply
|
||||||
from helpdesk.models import EscalationExclusion, EmailTemplate, KBItem
|
from helpdesk.models import EscalationExclusion, EmailTemplate
|
||||||
from helpdesk.models import TicketChange, KBIAttachment, FollowUpAttachment, IgnoreEmail
|
from helpdesk.models import TicketChange, KBIAttachment, FollowUpAttachment, IgnoreEmail
|
||||||
from helpdesk.models import CustomField
|
from helpdesk.models import CustomField
|
||||||
from helpdesk import settings as helpdesk_settings
|
from helpdesk import settings as helpdesk_settings
|
||||||
@ -82,6 +82,7 @@ if helpdesk_settings.HELPDESK_KB_ENABLED:
|
|||||||
|
|
||||||
list_display_links = ('title',)
|
list_display_links = ('title',)
|
||||||
|
|
||||||
|
if helpdesk_settings.HELPDESK_KB_ENABLED:
|
||||||
@admin.register(KBCategory)
|
@admin.register(KBCategory)
|
||||||
class KBCategoryAdmin(admin.ModelAdmin):
|
class KBCategoryAdmin(admin.ModelAdmin):
|
||||||
list_display = ('name', 'title', 'slug', 'public')
|
list_display = ('name', 'title', 'slug', 'public')
|
||||||
|
Loading…
Reference in New Issue
Block a user