stash
This commit is contained in:
parent
9a22c411b1
commit
556525557b
1 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import jinja2
|
||||
from channels.db import database_sync_to_async
|
||||
from core.settings import PRIMARY_HOST
|
||||
|
||||
from notifications.models import MessageTemplate
|
||||
|
@ -36,18 +37,21 @@ def render_template(template, **kwargs):
|
|||
return None
|
||||
|
||||
|
||||
@database_sync_to_async
|
||||
def render_auto_reply(ticket):
|
||||
eventslug = ticket.event.slug if ticket.event else "37C3" # TODO 37C3 should not be hardcoded
|
||||
return render_template('auto_reply', ticket_name=ticket.name, ticket_uuid=ticket.short_uuid(),
|
||||
ticket_id=ticket.id, event_slug=eventslug, ticket_url=ticket_url(ticket))
|
||||
|
||||
|
||||
@database_sync_to_async
|
||||
def render_notification_new_ticket(ticket):
|
||||
eventslug = ticket.event.slug if ticket.event else "37C3" # TODO 37C3 should not be hardcoded
|
||||
return render_template('new_issue_notification', ticket_name=ticket.name, ticket_uuid=ticket.short_uuid(),
|
||||
ticket_id=ticket.id, event_slug=eventslug, ticket_url=ticket_url(ticket))
|
||||
|
||||
|
||||
@database_sync_to_async
|
||||
def render_notification_reply_ticket(ticket):
|
||||
eventslug = ticket.event.slug if ticket.event else "37C3" # TODO 37C3 should not be hardcoded
|
||||
return render_template('reply_issue_notification', ticket_name=ticket.name, ticket_uuid=ticket.short_uuid(),
|
||||
|
|
Loading…
Reference in a new issue