Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.

OkunaOrg/okuna-api

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d830d90 Β· May 3, 2019
Apr 12, 2019
Nov 2, 2018
Mar 16, 2019
Nov 3, 2018
May 3, 2019
Dec 20, 2018
May 1, 2019
May 1, 2019
Apr 2, 2019
Apr 14, 2019
May 1, 2019
May 1, 2019
Apr 14, 2019
Mar 6, 2019
Mar 26, 2019
Apr 5, 2019
Apr 22, 2019
Apr 1, 2019
Apr 14, 2019
May 2, 2019
Feb 8, 2019
Nov 4, 2018
Feb 8, 2019
Oct 11, 2018
Apr 12, 2019
Mar 21, 2019
Oct 3, 2018
Oct 3, 2018
Mar 9, 2019
Apr 14, 2019
Apr 22, 2019
Apr 12, 2019
Oct 3, 2018
Apr 22, 2019

Repository files navigation

Open book logo

CircleCI Maintainability Test Coverage gitmoji badge

The API server for Openbook.

Table of contents

Requirements

Project overview

The project is a Django application.

Contributing

There are many different ways to contribute to the website development, just find the one that best fits with your skills and open an issue/pull request in the repository.

Examples of contributions we love include:

  • Code patches
  • Bug reports
  • Patch reviews
  • Translations
  • UI enhancements

Code of Conduct

Please read and follow our Code of Conduct.

License

Every contribution accepted is licensed under AGPL v3.0 or any later version. You must be careful to not include any code that can not be licensed under this license.

Please read carefully our license and ask us if you have any questions.

Responsible disclosure

Cyber-hero? Check out our Vulnerability Disclosure page.

Other issues

We're available almost 24/7 in the Openbook slack channel. Join us!

Git commit message conventions

Help us keep the repository history consistent πŸ™!

We use gitmoji as our git message convention.

If you're using git in your command line, you can download the handy tool gitmoji-cli.

Getting started

Clone the repository

git clone [email protected]:OpenbookOrg/openbook-api.git

Create and configure your .env file

cp .env.sample .env
nano .env

Install the dependencies

pipenv install

Activate the pipenv environment

pipenv shell

Run the database migrations

python manage.py migrate

Collect the media fixtures

python manage.py collectmedia

Load the fixtures

python manage.py loaddata circles.json emoji-groups.json emojis.json badges.json categories.json

Serve with hot reload

For local API development it suffices to bind the server to localhost:

python manage.py runserver

For app development you have to bind the server to your local network:

python manage.py runserver 0.0.0.0:8000

Django Custom Commands

manage.py create_invite

Creates a user invite and outputs its token. Required for creating a new account.

usage: manage.py create_invite [-h] [--email EMAIL] [--username USERNAME] [--name NAME] [--badge BADGE]

Troubleshooting

macOS

The pipenv install command fails

You probably installed openssl via Homebew, make sure to follow the instructions that are given when you type brew info openssl.

FAQ

Double logging in console

The local development server runs a separate process for the auto-reloader. You can turn off the auto-reload process by passing the --noreload flag.

python manage.py runserver --noreload

Happy coding πŸŽ‰!