Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation


Backend API Build status

What is schoolsyst?

If you don't know, you should head over to the main repository, where all feature requests & bug reports are posted. This one is strictly about the API schoolsyst's frontend webapp uses.

For now, this API is closed and can only be used from *.schoolsyst.com domains, as the only thing running all of schoolsyst is a tiny VPS.

Great, I came from the main repo because I want to run the backend locally. How?

  1. Clone the repository
$ git clone https://github.com/schoolsyst/backend/
Cloning into 'backend'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 1237 (delta 14), reused 8 (delta 4), pack-reused 1208
Receiving objects: 100% (1237/1237), 1.12 MiB | 1.08 MiB/s, done.
Resolving deltas: 100% (878/878), done.
$ cd backend
  1. Install the dependencies
$ poetry install
The currently activated Python version 3.6.9 is not supported by the project (^3.7).
Trying to find and use a compatible version. 
Using python3.7 (3.7.7)
Creating virtualenv schoolsyst-api-sixfdjYz-py3.7 in /home/ewen/.cache/pypoetry/virtualenvs
Installing dependencies from lock file


Package operations: 43 installs, 0 updates, 0 removals
...
  1. Activate the virtual environment

Alternatively, you can prefix commands with poetry run (see poetry help run)

$ poetry shell
The currently activated Python version 3.6.9 is not supported by the project (^3.7).
Trying to find and use a compatible version. 
Using python3.7 (3.7.7)
Spawning shell within /home/ewen/.cache/pypoetry/virtualenvs/backend-1LkjBKQ6-py3.7
  1. Add required sensitive variables in .env
$ cp .env.example .env
$ nano .env  # Use any text editor to fill in the variables
  1. Run the migrations
$ python manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, common, contenttypes, django_rest_passwordreset, homework, learn, reports, schedule, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
...
  1. Serve the server on port 9999
$ python manage.py runserver 9999
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
April 26, 2020 - 10:54:42
Django version 2.2.8, using settings 'backend.settings'
Starting development server at http://127.0.0.1:9999/
Quit the server with CONTROL-C.

API Documentation

What the API describes is what I aim to release as v1.0.0. A lot of things differ from the API's current state. Still, you can read it right now here

Commit types distribution

(really out of date)

(generated by commit-types-distribution)

Releases

Packages

Used by

Contributors

Languages