First time here? Check out the FAQ!
1

Is there a tags variable available for instant_notification.html template?

I would like to be able to put the list of tags for a question when an instant_notification is sent.

I'm customizing the text and I would like to get something like this:

Dear john,

bob sent a new question: How do I get my tags?
Tags: [askbot feature-request template]

This is just an example...

The variable would simply be a list of tags

Evgeny's avatar
13.2k
Evgeny
updated 2011-02-03 16:48:19 -0500
Benoit's avatar
875
Benoit
asked 2011-02-01 13:23:54 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Actually, a large part of instant email formatting happens in the python code. I remember that when I created the template it wanted to be too complicated, so I moved most of the logic in the function askbot/models/__init__.py: format_instant_notification_email(), will add the tags. Thanks.
Evgeny's avatar Evgeny (2011-02-01 23:50:53 -0500) edit
Thanks for the pointer. I thought I saw some emails with tags, and others without.
Benoit's avatar Benoit (2011-02-02 09:40:46 -0500) edit
add a comment see more comments

1 Answer

0

The tag list is available through the .get_tag_names() method of post if the .post_type == 'question'.

edit - Added in 0.6.67. The email formatting is far from perfect though.

The tags are not present in the answer and comment updates, but will show in the new and updated question instant alerts.

Evgeny's avatar
13.2k
Evgeny
updated 2011-02-03 16:52:07 -0500, answered 2011-02-01 13:36:01 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments