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
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,
>>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
> 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
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
5 matches
Mail list logo