New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django: Add ZSH info for setting up dev environment #4662
Conversation
files/en-us/learn/server-side/django/development_environment/index.html
Outdated
Show resolved
Hide resolved
Python 3.9.0</span> | ||
</pre> | ||
<pre class="brush: bash">python3 -V | ||
Python 3.9.0</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.9.4 is the latest point release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I am not going to update this to latest version without re-testing the whole tutorial. I tend to do that once every 6- 12 months. So please ignore for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me. Just wanted to highlight it. I'm wondering, if I were to do that today, whether I'd get the newer version (and thus, a note might be helpful to not confuse beginners).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will think on this, and perhaps address in the next update. I don't disagree.
@@ -262,7 +258,8 @@ <h4 id="macOS_virtual_environment_setup">macOS virtual environment setup</h4> | |||
|
|||
<pre class="brush: bash">sudo pip3 install virtualenvwrapper</pre> | |||
|
|||
<p>Then add the following lines to the end of your shell startup file.</p> | |||
<p>Then add the following lines to the end of your shell startup file (these are the same lines as for Ubuntu). | |||
If you're using the <em>zsh shell</em> then the startup file will be a hidden file named <strong>.zshrc</strong> in your home directory. If you're using the <em>bash shell</em> then it will be a hidden file named <strong>.bash_profile</strong>. You may need to create the file if it does not yet exist.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a .bashrc
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even on mac? Either way, I plan only to mention .bash_profile
because that is what was tested when this was done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on Sabayon Linux :-)
We have all sorts of shells available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're a sick sick man :-). We have to draw the line somewhere - this is an 80/20 rule - most people will use the default shell on the most popular distributions. Those that don't are probably experienced enough to know how their shell works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would most likely be the bash on Linux systems (I'm not quite sure, whether Ubuntu uses the dash).
files/en-us/learn/server-side/django/development_environment/index.html
Outdated
Show resolved
Hide resolved
…ndex.html Co-authored-by: André Jaenisch <Ryuno-Ki@users.noreply.github.com>
…ndex.html Co-authored-by: André Jaenisch <Ryuno-Ki@users.noreply.github.com>
Thanks for review @Ryuno-Ki . I've merged your suggestions. Left the Python versions alone though - I will do a thorough update of the whole tutorial at some point along with all dependencies. I don't change the Python version when I do spot fixes to the docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes will be an improvement, so let's get them in!
Thank you for writing an update, @hamishwillee |
thanks for the review! |
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/development_environment
MacOS Catalina and later use the ZSH shell by default, which uses the .zshrc file as a startup. The main change here is to mention the location of this startup file and that you may need to either set .bashrc or .zshrc. I don't have a mac so I have made the ASSUMPTION that the commands you add to the file are the same, and that it is sourced in the same way.
This also fixes up some mis-use of spans in pre blocks and other minor tidy.
@CreaTorAlexander can you please sanity check?
Fixes #2688