You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Django's 'shell' command should use the Python Interactive window #13027
Thanks Eleanor Boyd (@eleanorjboyd)
There are still much work and sorting that needs to happen between plain REPL in Python for VS Code vs. Interactive Window . I know Django is a web framework but still lacking some context for Django shell other than its a shell that reads settings.py and goes and find all application in settings.py and then preload those application then gives you a shell.
Rich Chiodo (@rchiodo) Are there any specific reasons you wanted to use Python Interactive window and/or iPython? This would be helpful in thinking about what is needed in REPL rewrite that is happening #21707 and the native VS Code REPL experience towards the end of the rewrite.
changed the title [-]Django projects 'shell' command should use the Python Interactive window[/-][+]Django's 'shell' command should use the Python Interactive window[/+]on Dec 18, 2023
Now we have intellisense via Native REPL, but it might still be helpful to merge this issue with #13027 since I assume there are some scripts and environment variables that are Django specific that we can set before launching each Native REPL session. Folks who were interested in this issue, please go ahead and upvote the referenced issue #13027
Activity
rchiodo commentedon Jul 17, 2020
I believe this would work if we set the
DJANGO_SETTINGS_MODULEenvironment variable before starting.(See here for more information: https://www.b-list.org/weblog/2007/sep/22/standalone-django-scripts/)
eleanorjboyd commentedon Dec 14, 2023
Anthony Kim (@anthonykim1) curious of your thoughts on this and if this is something that could relate to your repl work.
anthonykim1 commentedon Dec 14, 2023
Thanks Eleanor Boyd (@eleanorjboyd)
There are still much work and sorting that needs to happen between plain REPL in Python for VS Code vs. Interactive Window . I know Django is a web framework but still lacking some context for Django shell other than its a shell that reads settings.py and goes and find all application in settings.py and then preload those application then gives you a shell.
Rich Chiodo (@rchiodo) Are there any specific reasons you wanted to use Python Interactive window and/or iPython? This would be helpful in thinking about what is needed in REPL rewrite that is happening #21707 and the native VS Code REPL experience towards the end of the rewrite.
rchiodo commentedon Dec 14, 2023
Oh so you could get intellisense and have the output like a notebook window. Here's a good demonstration of the django shell:
https://www.nickmccullum.com/useful-features-django-shell/
It looks a lot like an IPython shell.
rchiodo commentedon Dec 14, 2023
Meaning you'd run python code to check how things look.
[-]Django projects 'shell' command should use the Python Interactive window[/-][+]Django's 'shell' command should use the Python Interactive window[/+]anthonykim1 commentedon Dec 9, 2024
Now we have intellisense via Native REPL, but it might still be helpful to merge this issue with #13027 since I assume there are some scripts and environment variables that are Django specific that we can set before launching each Native REPL session. Folks who were interested in this issue, please go ahead and upvote the referenced issue #13027