Django

Code

Ticket #6243 (closed: wontfix)

Opened 1 year ago

Last modified 10 months ago

Add runscript command with support for scrip fixtures and app scripts

Reported by: poelzi Assigned to: nobody
Milestone: Component: django-admin.py
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

While stresstesting we cam to the idea that auto generated fixtures are much easier to handle compared to json dumps. Also we find simple scripts (much easier then real manage.py commands) very usefull. For example every app gets a daily_cleanup.py script in the scripts subdirectory.

manage.py runscript daily_cleanup

runs the daily_cleanup script of all apps. this way the cleanup script is fine seperated for every app.

Attachments

runscripts_1.diff (6.3 kB) - added by poelzi on 12/19/07 05:18:54.
patch and docs for runscripts

Change History

12/19/07 05:18:54 changed by poelzi

  • attachment runscripts_1.diff added.

patch and docs for runscripts

02/13/08 19:28:52 changed by poelzi

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

We used this script over two months now in internal development and worked very well. one reason for example was, that the complex design of our application didn't work well with static fixtures, in fact it couldn't work by design, many data worked, but some could not. for this we implemented the fixture part. a lot of other maintance work etc and daily cleanups scripts in different modules started to pop up. in a real modular design, every module has to be independend and therefor should implement cleanup scripts init.

02/13/08 20:05:00 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to wontfix.

Thanks, but no. We've already decided against doing this a few times in the past. Also, with recent Django versions, you can achieve the same thing by writing your own management commands. There's another ticket open to move daily_cleanup and a couple of other utilities into management commands as well.

[In future, please don't promote your own patches to "ready for checkin". That bypasses one layer of triage and review, since the triagers will tend not to look at tickets that are already marked "ready for checkin".]


Add/Change #6243 (Add runscript command with support for scrip fixtures and app scripts)




Change Properties
Action