#### DOWNLOADING THE PROJECT & SETTING UP THE ENVIRONMENT
## DOWNLOADING THE PROJECT & SETTING UP THE ENVIRONMENT
(A) install pip3 (`pip3 --version` to see if it is already installed):
sudo apt-get install python3-pip
(B) install virtualenv (`virtualenv --version` to see if it is already installed):
pip3 install virtualenv
(C\) install and configure Git [sources:
-- "How To Install Git with Apt" and "How To Set Up Git" sections of https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-16-04
(1) install Git (`git --version` to see if it is already installed):
(C\) install and configure Git [sources:
-- "How To Install Git with Apt" and "How To Set Up Git" sections of https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-16-04
-- "Create a MySQL Database" section of http://www.marinamele.com/taskbuster-django-tutorial/install-and-configure-mysql-for-django
(5) install appropriate versions of virtual-environment-specific packages:
(5) install appropriate versions of virtual-environment-specific packages:
pip install -r requirements.txt
ALTERNATIVELY, you could install the packages (Django and MySQL Database Connector - mysqlclient) individually by typing the following:
ALTERNATIVELY, you could install the packages (Django and MySQL Database Connector - mysqlclient) individually by typing the following:
pip install Django==2.0.4
pip install mysqlclient
(6) install MySQL server (`mysql --version` to see if it is already installed):
* WARNING: while installing MySQL server, you will be asked to set the password for the root user.
(6) install MySQL server (`mysql --version` to see if it is already installed):
* WARNING: while installing MySQL server, you will be asked to set the password for the root user.
sudo apt-get install mysql-server
mysql_secure_installation
(7) use the password that was set for the root user during MySQL server installation as the 'PASSWORD' value of the 'default' dictionary of the DATABASES dictionary in **~/Desktop/userbase/myprj/myprj/settings.py**
(7) use the password that was set for the root user during MySQL server installation as the 'PASSWORD' value of the 'default' dictionary of the DATABASES dictionary in **~/Desktop/userbase/myprj/myprj/settings.py**
(8) if you have not created the project database (usermergeDB) yet, open MySQL console with root privileges (you should provide the password that was set for the root user during MySQL server installation), create the project database and exit MySQL console:
mysql -u root -p (ALTERNATIVELY: python manage.py dbshell)
...
...
@@ -80,17 +79,8 @@
(10) deactivate the virtual environment:
deactivate
---
#### UPDATING THE PROJECT
Provided you have already downloaded the (source code of the) project (that is, you have followed the steps of the "DOWNLOADING THE PROJECT & SETTING UP THE ENVIRONMENT" section above), the recommended steps to update the (source code of the) project are:
(1) delete the local instance of the remote repository (userbase) as well as the virtual environment:
rm -rf ~/Desktop/userbase
(2) follow steps (D) and (E) of the "DOWNLOADING THE PROJECT & SETTING UP THE ENVIRONMENT" section above
---
#### RUNNING THE PROJECT (INSIDE THE VIRTUAL ENVIRONMENT):
## RUNNING THE PROJECT (INSIDE THE VIRTUAL ENVIRONMENT)
(A) activate the virtual environment:
cd ~/Desktop/userbase
...
...
@@ -103,10 +93,16 @@ Provided you have already downloaded the (source code of the) project (that is,
python manage.py runserver
(D) navigate to http://127.0.0.1:8000/ via web browser to run the project
---
#### STOPPING THE PROJECT (AND EXITING THE VIRTUAL ENVIRONMENT):
(A) stop the Django development server (running at http://127.0.0.1:8000/):
-- return to the terminal where you have run `python manage.py runserver` and press "Ctrl-C"
## STOPPING THE PROJECT (AND EXITING THE VIRTUAL ENVIRONMENT)
(A) stop the Django development server (running at http://127.0.0.1:8000/):
-- return to the terminal where you have run `python manage.py runserver` and press `Ctrl-C`
(B) deactivate the virtual environment:
deactivate
## UPDATING THE PROJECT
Provided you have already downloaded the (source code of the) project (that is, you have followed the steps of the "DOWNLOADING THE PROJECT & SETTING UP THE ENVIRONMENT" section above), the recommended steps to update the (source code of the) project are:
(1) delete the local instance of the remote repository (userbase) as well as the virtual environment:
rm -rf ~/Desktop/userbase
(2) follow steps (D) and (E) of the "DOWNLOADING THE PROJECT & SETTING UP THE ENVIRONMENT" section above