License: | MIT |
---|
Village Portal is an open-sourced 'facility-based mentoring management platform'. Village Book Builders accelerates learners globally through virtual mentoring, learning libraries, and community-directed educational solutions. Village Portal helps schedule hundreds of virtual mentors with mentees worldwide; this connection catalyzes further impact. Other features are in development. Village Portal's mission is to enable mentors to teach courageous learners and communities how to fish. By increasing literacy, research, and educational skills, we hope to enable innovation economies in villages globally. Village Portal is an essential step towards a better future. Are you interested in the cause? Reach out to us at [email protected]. Learn more @ www.villagebookbuilders.org.
Front-End of Village Portal @ https://github.com/VilllageBookBuilders/frontend-vbb-portal.git
- To Help, questions, comments, concerns, Email US at @ [email protected].
- Our DEV Taskboard: https://app.zenhub.com/workspaces/villagebookbuilders-5f662d2ba0525c27f3a90388/board.
- Join our weekly meetings: https://meet.google.com/btm-gwyo-uwr on Saturday at 9AM
The Backend code for Village Book Builders Portal
The following steps should be completed in order to properly run the vbb-backend-portal on your local machine. Some steps may vary based on your operating system and some installation steps may be skipped if the required packages are already installed. If you encounter issues in this process which can't be resolved with a 20 minute Google search and debug, please reach out via the back-end channel of the VBB Slack group or [email protected]
- (first time global installations)
- Install python3+ [https://realpython.com/installing-python/]
- Install pip [https://pip.pypa.io/en/stable/installing/]
- Install postgresql [https://www.postgresql.org/download/]
- Install redis [https://redis.io/download]
- Create a database in postgresql titled vbb in postgresql [https://www.freecodecamp.org/news/how-to-get-started-with-postgresql-9d3bc1dd1b11/]
(to run)
- Clone and cd into the backend-vbb-portal repository
- Run virtualenv env
- Run source env/bin/activate (path may differ depending on where /activate is installed)
- Run pip install -r requirements/local.txt
- Run python manage.py runserver
- Run python manage.py migrate
- (to run windows)
py -m pip install --user virtualenv
py -m venv env
env\Scripts\activate.bat
or in powershellenv\Scripts\activate.ps1
pip install -r requirements.txt
python manage.py runserver
python manage.py migrate
(To use your local database) You will need to point the application to your local database.
- Navigate to config/settings/base.py
- Set
DATABASES = {"default": env.db("DATABASE_URL", default="postgres://{USERNAME}:{PASSWORD}@localhost:{PORT}//vbb")}
git update-index --skip-worktree base.py
(Front-end run commands): 1. npm i
2. npm run build
Settings
Moved to settings.
To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.
To create an superuser account, use this command:
$ python manage.py createsuperuser
For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
Running type checks with mypy:
$ mypy vbb_backend
To run the tests, check your test coverage, and generate an HTML coverage report:
$ coverage run -m pytest $ coverage html $ open htmlcov/index.html
$ pytest
Moved to Live reloading and SASS compilation.
This app comes with Celery.
To run a celery worker:
cd vbb_backend
celery -A config.celery_app worker -l info
Please note: For Celery's import magic to work, it is important where the celery commands are run. If you are in the same folder with manage.py, you should be right.
Sentry is an error logging aggregator service. You can sign up for a free account at https://sentry.io/signup/?code=cookiecutter or download and host it yourself. The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application.
You must set the DSN url in production.
The following details how to deploy this application.
See detailed cookiecutter-django Heroku documentation.
See detailed cookiecutter-django Docker documentation.