Skip to content

Commit 348695b

Browse files
authored
Update PythonAnywhere deployment page (#6003)
1 parent f069dea commit 348695b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

docs/3-deployment/deployment-on-pythonanywhere.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,17 @@ Make sure your project is fully committed and pushed up to Bitbucket or Github o
3434
3535
git clone <my-repo-url> # you can also use hg
3636
cd my-project-name
37-
mkvirtualenv --python=/usr/bin/python3.10 my-project-name
37+
mkvirtualenv --python=/usr/bin/python3.12 my-project-name
3838
pip install -r requirements/production.txt # may take a few minutes
3939
40-
.. note:: We're creating the virtualenv using Python 3.10 (``--python=/usr/bin/python3.10```), although Cookiecutter Django generates a project for Python 3.12. This is because, at time of writing, PythonAnywhere only supports Python 3.10. It shouldn't be a problem, but if is, you may try changing the Python version to 3.12 and see if it works. If it does, please let us know, or even better, submit a pull request to update this section.
41-
4240
Setting environment variables in the console
4341
--------------------------------------------
4442

4543
Generate a secret key for yourself, eg like this:
4644

4745
.. code-block:: bash
4846
49-
python -c 'import random;import string; print("".join(random.SystemRandom().choice(string.digits + string.ascii_letters + string.punctuation) for _ in range(50)))'
47+
python -c 'import secrets;import string; print("".join(secrets.choice(string.digits + string.ascii_letters + string.punctuation) for _ in range(50)))'
5048
5149
Make a note of it, since we'll need it here in the console and later on in the web app config tab.
5250

@@ -75,7 +73,7 @@ Add these exports
7573
export DATABASE_URL='<see Database setup section below>'
7674
export REDIS_URL='<see Redis section below>'
7775
78-
.. note:: The AWS details are not required if you're using whitenoise or the built-in pythonanywhere static files service, but you do need to set them to blank, as above.
76+
.. note:: The AWS details are not required if you're using whitenoise or the built-in PythonAnywhere static files service, but you do need to set them to blank, as above.
7977

8078

8179
Database setup

0 commit comments

Comments
 (0)