Core is the backend of MentorPaired, an app which connects software engineering mentors to mentees who seek to learn any programming language.
Core is written in Python3 and Django 3.0.3.
Please install and set up the following packages first, upgrade if you find the package is already installed:
-
Python3. Run the 'python3 -V' command to see the version you have installed.
-
PostgreSQL (Ensure the server is running).
-
It is advisable to install Django in a virtual environment and the README uses virtualenvwrapper to create this environment. You could use any virtualenv package of your choice or install this wrapper with:
pip install virtualenvwrapper
- Add these lines at the end of your shell startup script (
.bashrc
,.zshrc
, etc)
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
-
After editing, reload the startup file(e.g., run
source ~/.bashrc
). -
Create a new virtual environment:
mkvirtualenv <envname>
- Install requirements in the virtual environment created:
pip install -r requirements.txt
-
Create a database with PostgresQL, if you installed it earlier. If not, installation instructions can be found here
-
Create a .env file and copy the content of
.env.example
file to it. -
Replace
DB_NAME
with your database name,DB_USER
with your database username,DB_PASSWORD
with your database password,SECRET_KEY
with the value gotten when you run this script in the terminalpython3 scripts/secret_key.py
.
-
Run database migrations with this command
python3 manage.py migrate
- Run server to ensure everything is working properly.
python3 manage.py runserver
To run tests:
python manage.py test
flake8 .
- The following may serve as a guide:
You need to have PostgresQL installed and set up on your machine.
Fork the repository and please read the contributing guide.
This project is licensed under the MIT License - see the LICENSE file for more details.
Special thanks to Kosy and Delores for guiding me through this entire app creation process and being my mentors.