noc.kb.models.kbentry

Module Contents

class noc.kb.models.kbentry.KBEntry

Bases: noc.core.model.base.NOCModel

KB Entry

class Meta

Bases: object

verbose_name = KB Entry
verbose_name_plural = KB Entries
app_label = kb
db_table = kb_kbentry
ordering = ['id']
subject
body
language
markup_language
tags
parser

Wiki parser class

html

Returns parsed HTML

last_history

Returns latest KBEntryHistory record

preview_count

Returns preview count

visible_attachments

Returns a list of visible attachments

has_visible_attachments
__str__(self)
get_absolute_url(self)
save(self, *args, **kwargs)

save model, compute body’s diff and save event history

classmethod last_modified(cls, num=20)

Returns a list of last modified KB Entries

log_preview(self, user)

Write article preview log

Returns most popular articles

classmethod upload_to(cls, instance, filename)

Callable for KBEntryAttachment.file.upload_to