Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7692567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:52:55+00:00 2026-05-31T20:52:55+00:00

When i start django shell by typing python manage.py shell the ipython shell is

  • 0

When i start django shell by typing python manage.py shell
the ipython shell is started. Is it possible to make Django start ipython in qtconsole mode? (i.e. make it run ipython qtconsole)

Arek

edit:
so I’m trying what Andrew Wilkinson suggested in his answer – extending my django app with a command which is based on original django shell command. As far as I understand code which starts ipython in original version is this:

from django.core.management.base import NoArgsCommand

class Command(NoArgsCommand):
    requires_model_validation = False

    def handle_noargs(self, **options):
        from IPython.frontend.terminal.embed import TerminalInteractiveShell
        shell = TerminalInteractiveShell()
        shell.mainloop()

any advice how to change this code to start ipython in qtconsole mode?

second edit:
what i found and works so far is – start ‘ipython qtconsole’ from the location where settings.py of my project is (or set the sys.path if starting from different location), and then execute this:

import settings
import django.core.management
django.core.management.setup_environ(settings)

and now can i import my models, list all instances etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:52:57+00:00Added an answer on May 31, 2026 at 8:52 pm

    I created a shell script with the following:

    /path/to/ipython
    qtconsole --pylab inline -c "run /path/to/my/site/shell.py"
    

    You only need the --pylab inline part if you want the cool inline matplotlib graphs.

    And I created a python script shell.py in /path/to/my/site with:

    import os
    working_dir = os.path.dirname(__file__)
    os.chdir(working_dir)
    import settings
    import django.core.management
    django.core.management.setup_environ(settings)
    

    Running my shell script gets me an ipython qtconsole with the benefits of the django shell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I start the interactive django shell through manage.py, by executing python -v manage.py
When I run manage.py shell on my Django project to take a peek at
When starting a django application using python manage.py shell , I get an InteractiveConsole
I'm new to Python and Django. I want to start a Django multi langual
Every now and again, I need to start the Django development server, and have
I'm trying to start writing unit tests for django and I'm having some questions
A python/django beginner's question: I have a datetime object (drive_date), a time object (start_time)
I've been trying to get django set up so I can start learning it.
I'm using PyDev with Django. The autocomplete works nicely in the shell - I
OK, so I'm having issues trying to run Django on lighttpd with FastCGI. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.