Django: write data to mySQL server from command line
I have a django web interface but it will mainly for users to query, view results and can edit to add开发者_如何学编程 or delete. But my data each time write to server alot, so I want to supply users command line so that they can embedded inside their script to send data. Before I use mysql direct command line but then the server not not allow to do that, user cannot access direct to database. HOw can I do this? I heard some one say using REST, is it? and how it look like? thanks
If you're so daring as to allow a mysql command line in one of your UIs (I'm not). You may be better off allowing input of fixtures.
I've done this other ways as well. In some instances, I have a CSV upload function, that will take a specifically formatted CSV file, upload it to the server, and pass it off to a background task (via Celery) and add/update records in the DB when valid data is presented.
精彩评论