Opened 7 years ago

Closed 10 months ago

#7857 closed New feature (wontfix)

manage.py shell, dbshell funtionality

Reported by: Sanha Owned by: marclurr
Component: Core (Management commands) Version: master
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 marclurr 3 years ago.
New command which creates test database instead of real database when running interactive shell
testshell.diff (1005 bytes) - added by marclurr 3 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 Changed 7 years ago by Sanha

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

for example these is useful to test.

manage.py testshell
manage.py testdbshell
}}

comment:2 Changed 7 years ago by mir

  • milestone set to post-1.0
  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 7 years ago by adrian

  • Component changed from Tools to django-admin.py

comment:4 Changed 6 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

comment:5 Changed 6 years ago by bmihelac

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

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

comment:6 Changed 4 years ago by jezdez

  • Triage Stage changed from Design decision needed to Accepted

Seems like a reasonable idea.

comment:7 Changed 4 years ago by adamv

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

comment:8 Changed 4 years ago by lukeplant

  • Severity set to Normal
  • Type set to New feature

comment:9 Changed 3 years ago by marclurr

  • Easy pickings unset
  • Owner changed from nobody to marclurr
  • Status changed from new to assigned
  • UI/UX unset

Changed 3 years ago by marclurr

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

Changed 3 years ago by marclurr

comment:10 Changed 3 years ago by marclurr

  • Has patch set

comment:11 Changed 3 years ago by aaugustin

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

comment:12 Changed 3 years ago by sjl@…

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

comment:13 Changed 3 years ago by aaugustin

You can use pdb in tests.

comment:14 Changed 10 months ago by timo

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

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