Skip to content

tjeaneric/FARMVEST-API

Repository files navigation

FARMVESTNG API

The idea is for an app that will link local farmers to investors so they can get much needed resources to expand their production. The app will work as an intermediary between investors and farmers. The app will sort for farmers, verify them and view their profiles for investors to see. The investors will have a determined rate of return for their investment.

GET STARTED

If anything goes wrong, you can ask Jean Eric TUYISHIMIRE for further assistance.

Database

This project is pre-configured with postgres. Follow this documentation on how to get started with postgres.

Install Postgres on Linux/Windows/Mac

After creating user(s) and database for this project, create a DATABASE URL, and add it to the DATABASE_URL in settings.ini file.

The url must be formatted as this example bellow:

postgres://user:password@host:port/db_name

For localhost, host is localhost, and default port is 5432

Clone the project

Using SSH

git clone git@github.com:zuri-training/farmvestng-be-pjt-67.git

or using HTTPS

git clone https://github.com/zuri-training/farmvestng-be-pjt-67.git

Switch to farmvestbe branch

git checkout farmvestbe

Create virtualenv

virtualenv -p python3 venv

Activate the virtualenv

source venv/bin/activate

Install requirements

pip install -r requirements.txt

Generate settings.ini file (For windows users, create the file manually):

cat settings.ini.example > settings.ini

*Open settings.ini file, and fill in all necessary values.*

Migrate

python manage.py migrate

Runserver

python manage.py runserver

Running tests

python manage.py test

Working with Celery

Celery is mainly used to perform background tasks which are usually not meant to be part of the request - response cycle.

Celery documentation

Working with Celery Beat

Celery beat is used to perform periodic tasks automatically.

Celery beat documentation

Deployment

Django applications can be deployed in many ways, and on many different servers. Here are some useful documentations for some popular servers.

Ningx/gunicorn/postgresql on ubuntu server

Heroku

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published