These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
This is a project written using Python, Django, and Django Rest Framework
git clone https://github.com/BolotZhusupekov07/psychic-happiness
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Assuming you already have pgAdmin and postgres installed.
In your terminal:
$ psql postgres
$ CREATE DATABASE databasename
$ \connect databasename
Go into pgAdmin, login, and check that the new database exists on the dbserver. The database credentials to go in your project’s settings.py are the same credentials for pgAdmin.
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.postgresql_psycopg2’,
‘NAME’: env(‘DATABASE_NAME’),
‘USER’: env(‘DATABASE_USER’),
‘PASSWORD’: env(‘DATABASE_PASS’),
}
}
You can use Djecrety to quickly generate secure secret keys.
Rename the directory that contains settings.py. Do a find all and replace to rename all instances of the new project name.
In your terminal:
$ python manage.py makemigrations
$ python manage.py migrate
python manage.py createsuperuser
Start the development server and ensure everything is running without errors.
python manage.py runserver
You can run the automated tests for this project with
python manage.py test
You can find Postman tests here - Course Tests.postman_test_run.json
Django
- The framework used
Django Rest Framework
- The toolkit used to build API
API Blueprint
- for API documentation