Custom run command for django - I'm not sure what pycharm needs in the configuration

Good evening,

I have a custom manage.py command that works from the command line in the format:

- python manage.py doSomething "dir/data.csv"

That works correctly, so django is properly configured and everyting works. But when I want to debug doSomething from pyCharm, I edit the configuration and see the field "custom run command"
But if i put into this field "doSomething dir/data.csv" the interpretor errors out:
Unknown command: 'doSomething "dir/data.csv"'
Type 'manage.py help' for usage.
But if I don't enter the arg, e.g the dir/filename, then I hit breakpoints in doSomething that I've set.
I'm 95% sure the problem is with me and I'm misuing the "custom run command" field. Can someone give me an example of specifically how to use it correctly?
Thanks
2 comments
Comment actions Permalink

Hi,

I've also written a couple of custom commands for django, and they seem to work.  All I do is follow this: https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ then, when I'm ready to run them, I press Alt-R (on the mac), then a menu of manage.py commands appear.  If I did everything correctly, my custom command appears in the list.  I then press shift-enter to enter any command line arguments which my custom command needs.  I didn't have to put anything in the configuration like what you are suggesting...

=)

0
Comment actions Permalink

Hello, this is late but this post might help

0

Please sign in to leave a comment.