Re: Using a Django project in a python script.

2006-07-07 Thread [EMAIL PROTECTED]
As someone mentioned, you'll have to set the DJANGO_SETTINGS_MODULE variable before invoking your python script but remember to add your django project to the Python path as well. Assuming your project is on a Projects directory this should work (Linux bash): $ export DJANGO_SETTINGS_MODULE=your

Re: Using a Django project in a python script.

2006-07-06 Thread Frankie Robertson
I think it's possible to use the db api on its own, you still have to declare models, but then it can be fairly independent of the rest of djnago. AFAIK you still need to make an application for the models file, but you can just ignore the views if you want to use this independently. On 06/07/06,

Re: Using a Django project in a python script.

2006-07-06 Thread Iain Duncan
>>As a part of the application I'm writing I need to do certain things to > > the database every night. The easiest way to implement this would be a > python script run every night by cron. > > Set env DJANGO_SETTINGS_MODULE setting for the script. Then just use > your models and template as yo

Re: Using a Django project in a python script.

2006-07-05 Thread wiz
> As a part of the application I'm writing I need to do certain things to the database every night. The easiest way to implement this would be a python script run every night by cron. Set env DJANGO_SETTINGS_MODULE setting for the script. Then just use your models and template as you do this in a

Using a Django project in a python script.

2006-07-05 Thread xin
As a part of the application I'm writing I need to do certain things to the database every night. The easiest way to implement this would be a python script run every night by cron. As django offers an interactive shell (through manage.py) I figured there must be a way to use this functionality i