Skip to main content

Improved shell for Django

Project description

A management command to start a shell and auto-import all models. Unlike django command extensions shell_plus it doesn’t print out a load of gunk to the shell. Provides a mechanism so that you can add in extra imports that are specific to your project.


$ pip install django-shellng

Add into installed apps:

INSTALLED_APPS += ('shellng',)


$ ./ shellng

To import more things add a file containing a method shellng and assign that in settings. For example, make a file in the root of your Django project (or somewhere importable) called:

In it, place the following:

def shellng(imported_objects):
    modules = ('urllib',)  # This will add in urllib.
    for mod in modules:
        imported_objects[mod] = __import__(mod)

imported_objects is a dictionary of all modules to be imported. You can add or remove to it as you want in the methods. Finally add in to

SHELLNG_METHODS = ('shellng_local',)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-shellng, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size django-shellng-0.1.2.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page