First time here? Check out the FAQ!
0

What permissions/environment setting are needed to run the send_email_alerts?

The documentation is kind of light on this and I ran into problems with "environment variable DJANGO_SETTINGS_MODULE is undefined"

http://askbot.org/doc/management-commands.html

Evgeny's avatar
13.2k
Evgeny
updated 2011-03-01 13:08:46 -0500
tfoote's avatar
161
tfoote
asked 2011-02-23 17:49:18 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

The reason you get that error is that the settings.py file is not on on the python path when the script is executed.

There is a sample job file askbot/cron/askbot_cron_job, where PYTHONPATH is modified.

I've relabeled your post as "bug" because the deployment command must ideally configure those jobs automatically.

Evgeny's avatar
13.2k
Evgeny
answered 2011-02-23 18:17:27 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks I ended up using the following: """PROJECT_PARENT_DIR=/var/www export PYTHONPATH=$PROJECT_PARENT_DIR:$PYTHONPATH #these are actual commands that are to be run python $PROJECT_PARENT_DIR/manage.py send_email_alerts """
tfoote's avatar tfoote (2011-02-24 16:37:28 -0500) edit
good. the reason the comment formatting is off is that the two $ signs initiate mathjax rendering. I think if you back-slash escape them the problem should go away. Otherwise, there is no easy fix at this time.
Evgeny's avatar Evgeny (2011-02-24 16:42:26 -0500) edit
add a comment see more comments