I would like to run the following Django command (to dump the contents of my database into a text file):
python manage.py dumpdata my_app > data.json
I'm using the Django framework within PyDev as an Eclipse plugin. Therefore, in order to run the above command in PyDev I go to "Custom command" and insert dumpdata my_app > data.json
. However, doing so results in an error because of the >
character:
Error: Unknown application: >
How can I use >
(redirection) in PyDev?
manage.py
) dumpdata my_app
in Program arguments Finally click on Apply and Run. A bit tricky but works as it should.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.