Opened 8 years ago

Closed 8 years ago

#4704 closed (wontfix)

calling code from in django project context

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


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@…> 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Vladimir "Farcaller" Pouzanov <farcaller@…>

comment:1 Changed 8 years ago by cephelo@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 8 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to closed
  • Summary changed from [PATCH] calling code from in django project context to calling code from in django project context

Since we have 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