0

I'm new to Django, and need help with a question about email templates.

I'm using a Django-helpdesk apps and it's have a model name Ticket. Along with many other fields, I would like to add an extra field to it, that is, a field name foo. All database is updated, and when a user submitter a new ticket, an email is sent to the user with some info, i.e submitter_email, dates etc. Everything seems to be correct but the new field foo I've added is blank.

For example, in email templates we can retrieve a ticket id by calling in HTML field:

{{ ticket.ticket }}

you'll get Ticket number 1234, or:

{{ ticket.submitter_email }}

If you want to retrieve a submitter email. But when I call:

{{ ticket.foo }}

the foo is blank.

To mention: Django-Helpdesk email templates using JSON, and south, and I've checked that south is migrated corectly after the field foo is added.

Do I missed something here? I'm very thankful for your help.

Thanks.

4

1 回答 1

0

我找到了我的答案。您所需foo要做的就是将您的字段添加safe_template_context(ticket)lib.py.

于 2013-01-13T17:29:00.667 回答