Re: how to use Django ORM in standalone script

2012-03-13 Thread H.T. Wei
Thanks for Bill's suggestion. I found a simpler way to serve this purpose by using SQLalchemy mapping in my script on the server without Django installed/environment. On Mon, Mar 12, 2012 at 11:40 AM, Bill Freeman wrote: > I would: > > 1. Write the script as a manage.py command. > 2. Duplica

Re: how to use Django ORM in standalone script

2012-03-12 Thread Bill Freeman
I would: 1. Write the script as a manage.py command. 2. Duplicate the Django install on the other machine (or at least enough of it to cover the models that you need), making any settings changes needed to access the correct DB (i.e.; if you're using "localhost" to access the DB in your original

how to use Django ORM in standalone script

2012-03-12 Thread H.T. Wei
Hi, If anyone can suggest what is the best way to use Django ORM in standalone script for accessing database? The "standalone script" is located on the server different from Django server but access the same database server. Thanks in advance! Steve -- " stay hungry, stay foolish" -- You rece

Re: how to use django ORM in standalone script ?

2009-02-23 Thread Malcolm Tredinnick
On Mon, 2009-02-23 at 14:35 +, David Reynolds wrote: > 2009/2/23 Konstantin S : > > > > Hello! > > > > I need to postprocess some data in my models and the most natural way > > of doing this would be to run periodically standalone script. But on > > the other hand I want to use framework ORM j

Re: how to use django ORM in standalone script ?

2009-02-23 Thread David Reynolds
2009/2/23 Konstantin S : > > Hello! > > I need to postprocess some data in my models and the most natural way > of doing this would be to run periodically standalone script. But on > the other hand I want to use framework ORM just because it would much > more handy than raw sql. What should I impo

Re: how to use django ORM in standalone script ?

2009-02-23 Thread Alex Gaynor
On Mon, Feb 23, 2009 at 8:04 AM, Konstantin S wrote: > > Hello! > > I need to postprocess some data in my models and the most natural way > of doing this would be to run periodically standalone script. But on > the other hand I want to use framework ORM just because it would much > more handy tha

how to use django ORM in standalone script ?

2009-02-23 Thread Konstantin S
Hello! I need to postprocess some data in my models and the most natural way of doing this would be to run periodically standalone script. But on the other hand I want to use framework ORM just because it would much more handy than raw sql. What should I import to plug in django in standalone scr