mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
fix for django 1.8.2, get_template_from_string was removed
This commit is contained in:
parent
f5401b6887
commit
0f69771164
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user