Ask Your Question
1

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

asked 2011-02-01 13:23:54 -0500

Benoit gravatar image Benoit flag of United States
865 24 8 31

updated 2011-02-03 16:48:19 -0500

Evgeny gravatar image Evgeny flag of Chile
11329 50 84 183
http://askbot.org/

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

delete close flag offensive retag edit

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 ( 2011-02-01 23:50:53 -0500 )edit
Thanks for the pointer. I thought I saw some emails with tags, and others without. Benoit ( 2011-02-02 09:40:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-02-01 13:36:01 -0500

Evgeny gravatar image Evgeny flag of Chile
11329 50 84 183
http://askbot.org/

updated 2011-02-03 16:52:07 -0500

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.

link publish delete flag offensive edit

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Reliable Askbot Hosting

Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.

create your Q&A site
30 days free trial

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2011-02-01 13:23:54 -0500

Seen: 45 times

Last updated: Feb 03 '11