10000 added autoimport for django settings · tdsprogramming/django-extensions@94b36aa · GitHub
[go: up one dir, main page]

Skip to content

Commit 94b36aa

Browse files
author
v.oostveen
committed
added autoimport for django settings
(do we want a message for this; like for model imports ?) git-svn-id: https://django-command-extensions.googlecode.com/svn/trunk@187 70537768-783f-0410-b1a0-8399f7a62752
1 parent 1818fcc commit 94b36aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_extensions/management/commands/shell_plus.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def handle_noargs(self, **options):
2626
# Set up a dictionary to serve as the environment for the shell, so
2727
# that tab completion works on objects that are imported at runtime.
2828
# See ticket 5082.
29-
imported_objects = {}
29+
from django.conf import settings
30+
imported_objects = {'settings': settings}
3031
for app_mod in get_apps():
3132
app_models = get_models(app_mod)
3233
if not app_models:

0 commit comments

Comments
 (0)
0