mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
256 B
8 lines
256 B
4 years ago
|
from django.utils.module_loading import import_string
|
||
|
|
||
|
|
||
|
def get_ticket_handler(ticket):
|
||
|
handler_class_path = 'tickets.handler.{}.Handler'.format(ticket.type)
|
||
|
handler_class = import_string(handler_class_path)
|
||
|
return handler_class(ticket=ticket)
|