Run shell_plus through PyCharm?

前端 未结 7 659
独厮守ぢ
独厮守ぢ 2020-12-28 17:11

Is there a way for me to configure PyCharm to run shell_plus instead of the default shell?

I\'ve tried putting the text of the manage command in the \'Starting scr

7条回答
  •  渐次进展
    2020-12-28 17:52

    I looked at the source code of shell_plus, and noticed you could use a method on a Command class named get_imported_objects({})

    In PyCharm, go to: Build, Execution, Deployment > Console > Django Console > Starting script

    Add this to the existing code in that box:

    from django_extensions.management.commands.shell_plus import Command
    globals().update(Command().get_imported_objects({}))
    

提交回复
热议问题