Opened 16 years ago

Closed 10 years ago

#7857 closed New feature (wontfix)

manage.py shell, dbshell funtionality

Reported by: Sanha Owned by: Mark Barrett
Component: Core (Management commands) Version: dev
Severity: Normal Keywords: manage.py, testserver, shell, dbshell
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

manage.py testserver is good funtion to test and develop application.

it recreate database 'test_' + database name.

when using testserver manage.py shell or manage.py dbshell connect original database.

I think that some option is useful to connect 'test_' + database at this time.

But, I can't find option like that.

Attachments (2)

testshell.patch (1005 bytes ) - added by Mark Barrett 12 years ago.
New command which creates test database instead of real database when running interactive shell
testshell.diff (1005 bytes ) - added by Mark Barrett 12 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by Sanha, 16 years ago

for example these is useful to test.

manage.py testshell
manage.py testdbshell
}}

comment:2 by Michael Radziej, 16 years ago

milestone: post-1.0
Triage Stage: UnreviewedDesign decision needed

comment:3 by Adrian Holovaty, 16 years ago

Component: Toolsdjango-admin.py

comment:4 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

comment:5 by bmihelac, 15 years ago

For now you can use testshell command that I just assembled:

http://www.djangosnippets.org/snippets/1500/

comment:6 by Jannis Leidel, 13 years ago

Triage Stage: Design decision neededAccepted

Seems like a reasonable idea.

comment:7 by Adam Vandenberg, 13 years ago

Separate commands, or "--test" parameter to existing commands? Perhaps the separate "test*" commands are less error-prone.

comment:8 by Luke Plant, 13 years ago

Severity: Normal
Type: New feature

comment:9 by Mark Barrett, 12 years ago

Easy pickings: unset
Owner: changed from nobody to Mark Barrett
Status: newassigned
UI/UX: unset

by Mark Barrett, 12 years ago

Attachment: testshell.patch added

New command which creates test database instead of real database when running interactive shell

by Mark Barrett, 12 years ago

Attachment: testshell.diff added

comment:10 by Mark Barrett, 12 years ago

Has patch: set

comment:11 by Aymeric Augustin, 12 years ago

I can't see under which circumstances this command would be useful.

comment:12 by sjl@…, 11 years ago

It is useful to explore fixtures in the interactive shell, otherwise you are reduced to printf-style debugging in the test case.

comment:13 by Aymeric Augustin, 11 years ago

You can use pdb in tests.

comment:14 by Tim Graham, 10 years ago

Resolution: wontfix
Status: assignedclosed

I agree with Aymeric (aaugustin), that this doesn't seem very necessary. Please use the snippet if you need it.

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