VDA is a dynamic quiz web application, a recreation of the OpenMind quiz which focuses on helping people learn and develop skills that will allow them to work together and coexist with others that have differing opinions in life. This web application was created using Django, PostgreSQL and Bootstrap.
The biggest obstacle we faced was figuring out the complex data model that the OpenMind team had implemented on their application. It took many iteration of changing our data model to reach a suitable final design that allowed the variety of functionality to coexist. My role in this project was coding the functionality of the quiz, primarily the Quiz and Progress views. Due to the process we had gone through in deciphering the database model my skills in deconstructing and understanding existing database designs has grown a lot.
- Pull down the repo
- Download python, this will include pip to allow you to download packages
- Open command prompt and navigate to the vda/vda folder
- Run python manage.py runserver, leave this running in the background
- Open an internet browser and navigate to http://localhost:8080/
- Download a python editor
- Download all required packages found in requirements.txt using pip
Python editor example: PyCharm
- Download a python editor
Recommended editor: PyCharm
- Pull the repo
https://gitlab.op-bit.nz/BIT/Project/Viewpoint-Diversity-App/vda.git
- Open vda/vda/manage.py in PyCharm
- Click 'Configure Python Interpreter' in the top right of the window
Will be in a yellow alert bar that will drop down
- In the top right of the new window click the cog then 'Add Local...'
- Check New environment and choose a location for the virtual environment
- Change the base interpreter to be python 3.6 or higher
If using polytechnic computers select the option 'C:\Program Files(x86)\Python36-32\python.exe'
- Check 'Inherit global site-packages' and press ok
- You will now have a virtual environment named venv
- Open command prompt and navigate to it
Any command shell will work like powershell
- Inside venv run '.\Scripts\activate'
You should now be running in your environment you will have (venv) before your command prompt
- Now navigate to the repo
- Run the command
pip install -r requirements.txt
this will download all the packages needed - Now navigate into the vda folder, there should be a file called manage.py in here
- Run the command python manage.py runserver
Keep this running in the background
- Now open an internet browser and navigate to http://localhost:8080
Congrats you have opened the project
- To edit the data you can go to the django admin by navigating to http://localhost:8080/admin
Server must be currently running
- To connect to the database you need to download the latest version of postgreSQL
- Open pgAdmin 4
This will be installed when you install postgreSQL
- In the browser on the left hand side right click Servers and choose create then Server
- Enter a reasonable name then navigate to the connection tab
- Set Hostname/address to 10.25.137.189
- Make sure Port is set to 5432
- Maintenance database needs to be set to vda
- And Username is postgres then save
By selecting this server you will now be connected to the database
- To connect to the linux server which hosts the database you will need to download PuTTY
- In putty enter 10.25.137.189 as the Host Name and Port 22
- Make sure connection type is set to SSH
- In the left navigation bar under category, click into Connection -> SSH -> Auth
- In the private key section at the bottom select Browse...
- Navigate to the repo and select postgres.ppk
- Connect and enter the username: user
You are now connected the server which holds the database
Whatever you push to the master branch will be updated on the live server Live server is located at: https://vda.op-bit.nz/
- Python - The language we used to code in
- PostgreSQL - Database
- Django - The project was built in
- beautifulsoup4==4.6.3
- certifi==2018.8.24
- chardet==3.0.4
- cloudpickle==0.6.1
- dask==0.19.4
- decorator==4.3.0
- Django==2.0.2
- django-cors-headers==2.4.0
- django-rest-framework==0.1.0
- djangorestframework==3.8.2
- idna==2.7
- networkx==2.2
- Pillow==5.3.0
- pytz==2017.3
- PyWavelets==1.0.1
- requests==2.19.1
- six==1.11.0
- toolz==0.9.0
- urllib3==1.23
- Aidyn Jones - Initial work
- Fawaz Khan Dinnunhan - Initial work
- Project based off the Open Mind Platform (https://openmindplatform.org/)
- David Rozado, project manager