Commits

Matthew Schinckel committed 120821e

Add some more imports.

Comments (0)

Files changed (3)

 
     $ pip install django-shell-plus
     
-And then add `shell_plus` to your `settings.INSTALLED_APPS`.
+And then add `shell_plus` to your `settings.INSTALLED_APPS`.
+
+Changelog
+---------
+
+1.1.5
+~~~~~
+
+Import `cache` from `django.core.cache`, and `reverse`,`resolve` from `django.core.urlresolvers`, because I often fire up a shell, just to do this to check something.
 
 setup(
     name = "django-shell-plus",
-    version = "1.1.4",
+    version = "1.1.5",
     description = "django-admin.py shell+  <- shell with models auto-imported",
     url = "http://bitbucket.org/schinckel/django-shell+/",
     author = "Matthew Schinckel",

shell_plus/management/commands/shell+.py

 import os
 from django.core.management.base import NoArgsCommand
+from django.core.cache import cache
+from django.core.urlresolvers import resolve, reverse
 from optparse import make_option
 import datetime
 
         # Set up a dictionary to serve as the environment for the shell, so
         # that tab completion works on objects that are imported at runtime.
         # See ticket 5082.
-        imported_objects = {'datetime':datetime}
+        imported_objects = {
+            'datetime':datetime,
+            'cache': cache,
+            'reverse': reverse,
+            'resolve': resolve
+        }
         
         # Put all of the models into the local namespace.
         for model in loaded_models: