rossp/django-helpdesk — Issue #87: email template bug on fresh install - 
Author: kotowicz
Created: 2011-11-18 11:01:13+00:00
State: open

I have this problem on a fresh install of ubuntu and apache. I can't reproduce the error on my devel machine.

```
Environment:
Request Method: POST
Request URL: https://localhost/helpdesk/tickets/7/update/
Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admindocs',
'django.contrib.admin',
'django.contrib.humanize',
'django.contrib.markup',
'django.contrib.staticfiles',
'django_auth_ldap',
'debug_toolbar',
'django_evolution',
'helpdesk',
'registration',
'sorl.thumbnail',
'tagging',
'tagging_autocomplete',
'autocomplete']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'middleware.StripWhitespaceMiddleware.StripWhitespaceMiddleware')
Template error:
In template , error at line 23
Invalid block tag: '%'
13 : View Online: {{ ticket.staff_url }} (login required)
14 :
15 : Original description:
16 :
17 : {{ ticket.description }}
18 :
19 : The following comment was added:
20 :
21 : {{ comment }}
22 :
23 : This information has {%% if private %%} not {%% endif %%} been e-mailed to the submitter.
24 :
25 : If you wish to view this ticket online, you can visit {{ ticket.staff_url }}
26 :
27 : {% include 'helpdesk/en/email_text_footer.txt' %}
Traceback:
File "/usr/lib/python/django/core/handlers/base.py" in get_response
111. response = callback(request, *callback_args, **callback_kwargs)
File "/home/django_projects/external_applications/helpdesk/views/staff.py" in update_ticket
375. files=files,
File "/home/django_projects/external_applications/helpdesk/lib.py" in send_templated_mail
83. "%s{%% include '%s' %%}" % (t.plain_text, footer_file)
File "/usr/lib/python/django/template/loader.py" in get_template_from_string
168. return Template(source, origin, name)
File "/usr/lib/python/django/template/base.py" in __init__
108. self.nodelist = compile_string(template_string, origin)
File "/usr/lib/python/django/template/base.py" in compile_string
136. return parser.parse()
File "/usr/lib/python/django/template/base.py" in parse
237. self.invalid_block_tag(token, command, parse_until)
File "/usr/lib/python/django/template/base.py" in invalid_block_tag
291. raise self.error(token, "Invalid block tag: '%s'" % command)
Exception Type: TemplateSyntaxError at /helpdesk/tickets/7/update/
Exception Value: Invalid block tag: '%'
```