Opened 18 years ago

Closed 18 years ago

#2868 closed enhancement (wontfix)

[patch] Allow use of manage.py to run maintenance scripts

Reported by: adurdin@… Owned by: Adrian Holovaty
Component: Core (Management commands) Version: dev
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The attached patch adds a 'runscript' action to management.py that takes a script path as its sole argument.

This is intended to make running maintenance scripts more convenient, and require less repetition (as DJANGO_SETTINGS_MODULE need not be set if used from manage.py)

Attachments (1)

runscript.diff (1.5 KB ) - added by adurdin@… 18 years ago.

Download all attachments as: .zip

Change History (5)

by adurdin@…, 18 years ago

Attachment: runscript.diff added

comment:1 by James Bennett, 18 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #2406.

comment:2 by adurdin@…, 18 years ago

Resolution: duplicate
Status: closedreopened

Although this patch has the same motivation, I don't think it's a duplicate of #2406, as the implementations are very different. This one is just a convenience for running a python script within a Django project in the same way that 'manage.py shell' is a convenience for starting an interactive shell in a Django project.

comment:3 by Simon G. <dev@…>, 18 years ago

Needs documentation: set
Triage Stage: UnreviewedDesign decision needed
Version: SVN

comment:4 by Russell Keith-Magee, 18 years ago

Resolution: wontfix
Status: reopenedclosed

manage.py isn't magic - it does an import settings, then calls the management module (open up manage.py if you want proof). Do the same on your script, and it will behave the same as manage.py.

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