runscript path issue

Skip to first unread message

Fred Janon

Jun 7, 2011, 6:03:04 AM6/7/11
I can't figure out why my runscript command doesn't work, I can't figure out what path I should put in. Here is the directory structure and the commands with the verbose option, I am trying to get dbmigration to be executed. I created the file as indicated in the wiki page. It's empty.

I created the scripts directory and put the file in it as well as my script

ll scripts
total 16
drwxr-xr-x  2 fjanon fjanon 4096 2011-06-07 17:38 ./
drwxr-xr-x 12 fjanon fjanon 4096 2011-06-06 14:52 ../
-rw-r--r--  1 fjanon fjanon  178 2011-06-06 15:04
-rw-r--r--  1 fjanon fjanon    0 2011-06-07 17:22
-rw-r--r--  1 fjanon fjanon  127 2011-06-07 17:38 __init__.pyc

fjanon@fred-VirtualBox:~/wardadb$ python runscript --verbosity 2 scripts
check for django.contrib.auth.scripts.scripts
check for django.contrib.contenttypes.scripts.scripts
check for django.contrib.sessions.scripts.scripts
check for django.contrib.sites.scripts.scripts
check for django.contrib.admin.scripts.scripts
check for wardadb.warda_original.scripts.scripts
check for wardadb.warda.scripts.scripts
check for scripts.scripts
check for

fjanon@fred-VirtualBox:~/wardadb$ python runscript --verbosity 2 /
check for django.contrib.auth.scripts./
check for django.contrib.contenttypes.scripts./
check for django.contrib.sessions.scripts./
check for django.contrib.sites.scripts./
check for django.contrib.admin.scripts./
check for wardadb.warda_original.scripts./
check for wardadb.warda.scripts./
check for /

$ cat scripts/
assert False

Any ideas?



Fred Janon

Jun 7, 2011, 10:18:09 PM6/7/11
A colleague  helped me on that one, we got the runscript to work with that command:

python runscript --verbosity 2  dbmigration

Note that there is no .py extension in the command.

The file has a "def run()" function that gets called by runscript and is in the scripts folder.
I tried dbmigration without a def run() function and dbmigration still gets executed.
The scripts folder has a file.
The command is executed from the directory containing the scripts directory that contains itself the and files.

I am stil no sure of what the --noscripts option does.

Maybe it would be nice to add that to the runscript doc?

Reply all
Reply to author
0 new messages