Using django ORM from web browser and from command line apps

News123 news1234 at free.fr
Tue Jun 21 19:39:48 EDT 2011


Hi,

I'm having a django browser application.

There's certain administrative tasks, that I'd like to perform from the
command line (cronjob or manually).
As these scripts might be huge and might consume quite some memory I'd
prefer, that they were not part of the normal application and would just
consume memory during the administrative phase.

I am not sure, whether this is a use case really being intended.

I wanted to know whether there are any precautions to take if I do this.

The one issue, that I could imagine is that Django (if I understood
correctly) performs normally database transaction based an a http request.

What would happen if I don't do anythong special in a script.
Would the entire runtime of the script be considered a transaction?

Are there any special commands that I have to use in order to indicate
when a transaction starts / stops?


Thanks in advance for suggestions.

Please look also at  a related question.



More information about the Python-list mailing list