Replies: 1 comment 4 replies
-
If you open the editor at the top of the directory structure for netbox where the venv is defined, can you select the virtualenv python as your python interpreter? Having VSCode using the same python virtualenv as the application will mean it can resolve the same libraries, just activating a virtualenv in a terminal window inside of VSCode will only activate the virtualenv in that shell instance, not for the whole VSCode process and not for the python language support tools which need to resolve the right library paths to work.
—
Mark Tinberg ***@***.***>
Division of Information Technology-Network Services
University of Wisconsin-Madison
…________________________________
From: dsc999 ***@***.***>
Sent: Friday, May 20, 2022 5:05 AM
To: netbox-community/netbox ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [netbox-community/netbox] Imports needed to edit custom scripts in vscode (Discussion #9399)
Hi all,
I am trying to edit custom scripts with VSCode.
Thanks to @drmsoffall<https://github.com/drmsoffall> (post here<#9380>), I know now how to get objects properties with ./manage.py nbshell.
In order to manage the code in an easy way, I prefer to connect remotely with SSH (using VSCode plugin) and edit the scripts. The thing is: I don't know which libraries need to be import to have the objects available (and therefor get the autocompletion and help when coding with VSCode).
Is there a way to do this?
Thanks for your help!
—
Reply to this email directly, view it on GitHub<#9399>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAS7UM6DSER3G5MOTED2DNTVK5PU3ANCNFSM5WO6MTOA>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
tux-mania
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I am trying to edit custom scripts with VSCode.
Thanks to @drmsoffall (post here), I know now how to get objects properties with
./manage.py nbshell
.In order to manage the code in an easy way, I prefer to connect remotely with SSH (using VSCode plugin) and edit the scripts. The thing is: I don't know which libraries need to be import to have the objects available (and therefor get the autocompletion and help when coding with VSCode).
Is there a way to do this?
Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions