Ask Your Question
0

How can I change the email alert frequency settings for every user?

asked 2012-10-31 14:39:27 -0600

siovene gravatar image

Since I haven't launched my Askbot site yet, but I have thousands of users in my database, I want to change all their email alert frequency settings to the default values.

How can I do that with Django ORM or MySql?

Thanks!

edit retag flag offensive close merge delete

Comments

I can see that it's in askbot_emailfeedsetting, but it looks complicated.

siovene gravatar imagesiovene ( 2012-10-31 14:41:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-10-31 14:47:38 -0600

siovene gravatar image

I've got it!

**mysql> update askbot_emailfeedsetting set frequency='i' where feed_type='m_and_c';
Query OK, 2711 rows affected (0.09 sec)
Rows matched: 2713  Changed: 2711  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='i' where feed_type='q_ask';
Query OK, 2709 rows affected (0.09 sec)
Rows matched: 2712  Changed: 2709  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='n' where feed_type='q_all';
Query OK, 2711 rows affected (0.08 sec)
Rows matched: 2712  Changed: 2711  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='i' where feed_type='q_sel';
Query OK, 2711 rows affected (0.04 sec)
Rows matched: 2712  Changed: 2711  Warnings: 0

mysql> update askbot_emailfeedsetting set frequency='d' where feed_type='q_ans';
Query OK, 2 rows affected (0.08 sec)
Rows matched: 2712  Changed: 2  Warnings: 0
edit flag offensive delete link more

Comments

1

They should be added automatically actually. There is a function user.add_missing_askbot_subscriptions() which will set the default values.

Evgeny gravatar imageEvgeny ( 2012-10-31 15:07:07 -0600 )edit
1

Yeah, but mine weren't missing. I just didn't set them to my liking, and wanted to change them.

siovene gravatar imagesiovene ( 2012-10-31 15:30:28 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-31 14:39:27 -0600

Seen: 80 times

Last updated: Oct 31 '12