Ruben Quinones
Ruben Quinones

Reputation: 2472

Django, error with custom admin commands when executing with absolute path

I have a custom admin command named temperature.py which is under /home/user/project/monitor/management/commands. If I change directory to /home/user/ and execute:

user@localhost:~/project$ ./manage.py temperature

It runs ok, and its listed in the available commands. But if I try running it with the absolute path:

user@localhost:/$ /home/user/project/manage.py temperature

It says the command does not exist, it does not show up in the available commands either. I have django 1.2.1 with python 2.6.5 in ubuntu 10.04. Could this be a problem with django? is it the python version? Thanks in advance

Upvotes: 0

Views: 135

Answers (1)

Ruben Quinones
Ruben Quinones

Reputation: 2472

Found the reason, it seems that django is looking for the settings under the main directory, if it fails to find one, it will use the defaults. You can change your python path or use this in your manage.py file

Upvotes: 1

Related Questions