-
-
Save sunweiye/a68685dfa78dbdc774904d97f9a9e0a5 to your computer and use it in GitHub Desktop.
Revisions
-
jbs1 revised this gist
Sep 7, 2018 . 1 changed file with 10 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,12 +12,18 @@ python get-pip.py --user ~/.local/bin/pip install django --user ``` Next you migh have to add the location of the 'sites-packages' folder to the python path. It should be `~/.local/lib/python2.7/site-packages` but it might be a different python version on your folder. You need to put this dir into the python path variable. You have to options for that: * set pythonpath variable through `set PYTHONPATH=${PYTHONPATH}:"~/.local/lib/python2.7/site-packages"` * add this to the start of your script: ``` import sys,site if site.getusersitepackages() not in sys.path: print sys.path.append(site.getusersitepackages()) ``` To execute 'django-admin' use this command: `~/.local/bin/django-admin`. To start a new project use `~/.local/bin/django-admin startproject <project name>`. -
jbs1 revised this gist
Sep 7, 2018 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Next check the location of the 'sites-packages' folder. It should be `~/.local/l You need to put this dir into the python path variable. You have to options for that: * set pythonpath variable through `set PYTHONPATH=${PYTHONPATH}:"~/.local/lib/python2.7/site-packages"` * add this to the start of your script: ``` if site.getusersitepackages() not in sys.path: print sys.path.append(site.getusersitepackages()) ``` -
jbs1 revised this gist
Sep 7, 2018 . 1 changed file with 10 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,15 @@ First download and install PIP in the user dir and then install Django: ``` wget https://bootstrap.pypa.io/get-pip.py python get-pip.py --user ~/.local/bin/pip install django --user ``` Next check the location of the 'sites-packages' folder. It should be `~/.local/lib/python2.7/site-packages` but it might be a different python version on your folder. You need to put this dir into the python path variable. You have to options for that: * set pythonpath variable through `set PYTHONPATH=${PYTHONPATH}:"~/.local/lib/python2.7/site-packages"` * add this to the start of your script: * ``` if site.getusersitepackages() not in sys.path: print sys.path.append(site.getusersitepackages()) ``` -
jbs1 revised this gist
Sep 7, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ From STRATO Hosting Basic and up python is enabled on the server. [Hosting plans](https://www.strato.de/hosting/#features) You can connect to the sever via SSH through `ssh <your domain>@ssh.strato.de`. The Password is you 'Masterpasswort'. -
jbs1 created this gist
Sep 7, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ From STRATO Hosting Basic and up python is enabled on the server. [https://www.strato.de/hosting/#features](Hosting plans) You can connect to the sever via SSH through `ssh <your domain>@ssh.strato.de`. The Password is you 'Masterpasswort'. Since you have neither sudo access nor apt-get or something similar, you have to improvise. First download and install PIP in the user dir and then install Django: ``` wget https://bootstrap.pypa.io/get-pip.py python get-pip.py --user ./.local/bin/pip install django --user ```