Code

Opened 7 years ago

Closed 6 years ago

#6243 closed (wontfix)

Add runscript command with support for scrip fixtures and app scripts

Reported by: poelzi Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (1)

runscripts_1.diff (6.3 KB) - added by poelzi 7 years ago.
patch and docs for runscripts

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by poelzi

patch and docs for runscripts

comment:1 Changed 6 years ago by poelzi

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

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.

comment:2 Changed 6 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to closed

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 Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.