Opened 18 years ago
Closed 18 years ago
#4704 closed (wontfix)
calling code from manage.py in django project context
Reported by: | 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)
Change History (3)
by , 18 years ago
Attachment: | runapp.patch added |
---|
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Summary: | [PATCH] calling code from manage.py in django project context → calling 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.
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.