You just have to edit and add user bash_profile
function setdsm() {And then from our project directory run:
# add the current directory and the parent directory to PYTHONPATH
# sets DJANGO_SETTINGS_MODULE
export PYTHONPATH=$PYTHONPATH:$PWD/..
export PYTHONPATH=$PYTHONPATH:$PWD
if [ -z "$1" ]; then
x=${PWD/\/[^\/]*\/}
export DJANGO_SETTINGS_MODULE=$x.settings
else
export DJANGO_SETTINGS_MODULE=$1
fi
echo "DJANGO_SETTINGS_MODULE set to $DJANGO_SETTINGS_MODULE"
}
user$ setdsm
I hope this functios will be as as useful for you as is for me.
Link to source
No hay comentarios:
Publicar un comentario