Opened 17 years ago

Closed 17 years ago

#4704 closed (wontfix)

calling code from manage.py in django project context

Reported by: Vladimir "Farcaller" Pouzanov <farcaller@…> Owned by: Adrian Holovaty
Component: Core (Management commands) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Here goes a simple patch that allows to call a function from some module in django project context. It can be useful for running cron tasks.

Attachments (1)

runapp.patch (1.4 KB ) - added by Vladimir "Farcaller" Pouzanov <farcaller@…> 17 years ago.

Download all attachments as: .zip

Change History (3)

by Vladimir "Farcaller" Pouzanov <farcaller@…>, 17 years ago

Attachment: runapp.patch added

comment:1 by cephelo@…, 17 years ago

Unfortunately, #2868 is in the same spirit of this, had a patch ("runscript" instead of "runapp"), but was rejected. Personally I still use the patch, as it makes it easier, IMO, not have to toy with getting the imports correct when running scripts from nested directories.

comment:2 by Malcolm Tredinnick, 17 years ago

Resolution: wontfix
Status: newclosed
Summary: [PATCH] calling code from manage.py in django project contextcalling code from manage.py in django project context

Since we have django.core.management.setup_environ() to set put the environment appropriately, patches like this shouldn't be necessary. Everybody has slightly different ways they want to do this, so we've chosen to provide setup_environ() and then people can build whatever they prefer on top of that.

Note: See TracTickets for help on using tickets.
Back to Top