Opened 19 years ago
Closed 19 years ago
#2868 closed enhancement (wontfix)
[patch] Allow use of manage.py to run maintenance scripts
| Reported by: | 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)
Change History (5)
by , 19 years ago
| Attachment: | runscript.diff added |
|---|
comment:1 by , 19 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 19 years ago
| Resolution: | duplicate |
|---|---|
| Status: | closed → reopened |
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 , 19 years ago
| Needs documentation: | set |
|---|---|
| Triage Stage: | Unreviewed → Design decision needed |
| Version: | → SVN |
comment:4 by , 19 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | reopened → closed |
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.
Duplicate of #2406.