Skip to content

A school REST API made with Django Rest Framework.

Notifications You must be signed in to change notification settings

willy-r/school-api-drf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

School API - Django Rest Framework

A school REST API made with Django Rest Framework.

Endpoints

CRUD for Student entity: /students CRUD for Course entity: /courses CRUD for Enrollment entity: /enrollments

Special endpoints

Method Route Description
GET /student/{id}/enrollments Gets all enrollments of a student by {id}
GET /course/{id}/enrollments Gets all enrollments of a course by {id}

Running locally

You need to have Python 3.7.4+

Define the following envs:

SECRET_KEY - The SECRET KEY for your Django project

Clone this repo and go to project root directory:

$ git clone https://github.com/willy-r/school-api-drf.git
$ cd school-api-drf

Create virtual enviroment and activate it:

$ python -m venv venv
$ source venv/bin/activate

Install dependencies:

$ (venv) pip install -r requirements.txt

Migrate database, create superuser and start server:

$ (venv) python manage.py migrate
$ (venv) python manage.py createsuperuser
$ ...
$ (venv) python manage.py runserver

Access API:

http://localhost:8000

About

A school REST API made with Django Rest Framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published