diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index 0ea21497..e3870abe 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -347,7 +347,11 @@ def update_ticket(request, ticket_id, public=False): # if comment contains some django code, like "why does {% if bla %} crash", # then the following line will give us a crash, since django expects {% if %} # to be closed with an {% endif %} tag. - comment = loader.get_template_from_string(comment).render(Context(context)) + + + # get_template_from_string was removed in Django 1.8 http://django.readthedocs.org/en/1.8.x/ref/templates/upgrading.html + from django.template import Engine + comment = Engine().from_string(comment).render(Context(context)) if owner is -1 and ticket.assigned_to: owner = ticket.assigned_to.id