Ticket #5082: django-management-completion.patch

File django-management-completion.patch, 767 bytes (added by dusk@…, 8 years ago)
  • core/management.py

     
    13001300        shell.mainloop()
    13011301    except ImportError:
    13021302        import code
     1303        world = {}
    13031304        try: # Try activating rlcompleter, because it's handy.
    13041305            import readline
    13051306        except ImportError:
     
    13091310            # we already know 'readline' was imported successfully.
    13101311            import rlcompleter
    13111312            readline.parse_and_bind("tab:complete")
    1312         code.interact()
     1313            readline.set_completer(rlcompleter.Completer(world).complete)
     1314        code.interact(local=world)
    13131315run_shell.args = '[--plain]'
    13141316
    13151317def dbshell():
Back to Top