Code Monkey home page Code Monkey logo

learner_ms's Introduction

Learner Management System

Software Stack

  • Python (Django)
  • Django REST API
  • MySQL

Setting up the project

  • Clone this repository
  • cd into the project root
  • Install dependencies with pip-sync
  • Create a MySQL user with database CREATE rights. Note the username and password
  • Create a MySQL database, for the project, and assign it to the user above
  • Create a file named .env at the root of the project and add the following (fill in values where you see <..>):
DATABASE_URL="mysql2://<username>:<password>@localhost/<database name>"
SECRET_KEY="<a random string of letter, numbers and punctuation>"
  • Activate the virtual environment with source .venv/bin/activate
  • Start the application with ./manage.py runserver The app should start running via port 8000

REST Endpoints

The following actions are supported via the REST endpoints:

  • Student Creation/Reading/Updating/Deletion
  • Teacher Creation/Reading/Updating/Deletion
  • Assigning students to a teacher

Note: Remember to always append a slash to the URLs

Get list of students

GET /students/

Get a particular student

GET /students/

Create a student record

POST /students/ pay load:

{
    "name": "john",
    "surname": "smith"
}

Update a student's record

PUT /students// payload:

{
    "name": "name",
    "surname": "surname"
}

Delete a student's record

DELETE /students// payload: none

Get list of teachers

GET /teachers/

Get a particular teacher

GET /teachers/

Create a teacher record

POST /teachers/ payload:

{
    "name": "teacher name"
}

Update a teacher record

PUT /teachers// payload:

{
    "name": "new name"
}

Delete a teacher record

DELETE /teachers//

Assign a student to a teacher

POST /teachers//students/ payload:

[
    {"name": "name 1", "surname": "surname 1"},
    {"name": "name 2", "surname": "surname 2"}
]

List a teacher's students

GET /teachers//students/ response: Array of students

Testing the UI

The entry point is at http://127.0.0.1:8000/academia/

learner_ms's People

Contributors

lym avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.