manage.py: error: no such option: -u

470 views
Skip to first unread message

petrov

unread,
Sep 4, 2006, 2:24:59 AM9/4/06
to Django users
Hi,

i am not sure how everyone else does this but here goes.

I have some sample data in xml. so, i converted added the "insert into
...values(..) " format and placed into the myapp/sql/myapp.sql

at this pont i wanted to clear the table and add the sample data.
however, doing:

python manage.py sqlreset myapp > mysql dbname -u username -p

doesn't work. i get this error: "manage.py: error: no such option: -u"

my workaround is to do:
python manage.py sqlreset myapp > filename.sql
mysql dbname -u username -p < filename.sql

Is there a fix for this. i would rather skip the temp file creation
step.

Thanks

PV

Sean Perry

unread,
Sep 4, 2006, 2:42:02 AM9/4/06
to django...@googlegroups.com
petrov wrote:
> Hi,
>
> i am not sure how everyone else does this but here goes.
>
> I have some sample data in xml. so, i converted added the "insert into
> ...values(..) " format and placed into the myapp/sql/myapp.sql
>
> at this pont i wanted to clear the table and add the sample data.
> however, doing:
>
> python manage.py sqlreset myapp > mysql dbname -u username -p
>
> doesn't work. i get this error: "manage.py: error: no such option: -u"
>

you mean 'python manage.py sqlreset myapp | mysql dbname -u username
-p'. Note the | symbol instead of the > symbol. '>' and '<' mean output
to this file (stdin and stdout count as files). '|' means use the output
of the first program as the input of the second program.

Reply all
Reply to author
Forward
0 new messages