Backend routes and database for an abstract theoretical app that relates a database of courses, users, and assignments.

Related tags

CMS CMS
Overview

CMS

Backend routes and database for an abstract theoretical app for organizing and providing course information that relates courses, users, and assignments.

app.py contains all routes. db.py contains classes Course, User, and Assignment. requirements.txt contains all required downloads to run application.

The database contains five tables: "course", "user", "assignment", "tstudents", and "tinstructors". The last two tables are both join tables between "course" and "user". For each course, the "course" table stores an id, code, name, list of assignments, list of instructors, and list of students. For each user, the "user" table stores an id, name, netid, instructor courses, and student courses. Columns for both instructor courses and student courses are necessary as a user could be both an instructor and student. For each assignment, the "assignment" table stores an id, title, due date, and course id. There is a one-to-many relationship between "course" and "assignment" and two many-to-many relationships between "course" and "user", the first relating courses with instructors and the second relating courses with students. instructor and student columns in "course" table are serialized users without course field and courses column in "user" table is serialized without users to avoid redundancy and recursion.

8 routes implemented:

GET /api/courses/ Sucess response returns a list of all courses, serialized with all columns.

POST /api/courses/ Pass in course code and name. Success response creates a new course with empty fields for assignments, instructors, and students. Adds course to database. Returns course, serialized with all columns. Returns error if the code or name fields are invalid.

GET /api/courses/int:course_id/ Success response returns course specified by id, serialized with all columns. Returns error if id does not exist.

DELETE /api/courses/int:course_id/ Success response removes course from database and returns course, serialized with all columns. Returns error if id does not exist.

POST /api/users/ Pass in name and netid. Success response creates a new user with empty fields for instructor and student courses and adds user to database. Returns user, serialized with all columns.

GET /api/users/int:user_id/ Success response returns user specified by id, serialized with all columns. Returns error if id does not exist.

POST /api/courses/int:course_id/add/ Pass in user id and type, where type is either "instructor" or "student". Sucess response updates the specified course by adding the specified user to either its "instructors" or "students" column. Updates specified user by adding specified course to either its "instuctor_courses" or "student_courses" columns. Returns the specified course. Returns error if course id does not exist, or if "user_id" or "type" fields are invalid.

POST /api/courses/int:course_id/assignment/ Pass in title and due date. Success response creates a new assignment with specified course in its "course_id" column. Updates specified course by adding the new assignment to its assignments column. Returns new assignment, serialized with all columns. Returns error if course id does not exist, or if "title" or "due_date" fields are invalid.

You might also like...
Ella is a CMS based on Python web framework Django with a main focus on high-traffic news websites and Internet magazines.

Ella CMS Ella is opensource CMS based on Django framework, designed for flexibility. It is composed from several modules: Ella core is the main module

A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and ReactJS.
A modular, high performance, headless e-commerce platform built with Python, GraphQL, Django, and ReactJS.

Saleor Commerce Customer-centric e-commerce on a modern stack A headless, GraphQL-first e-commerce platform delivering ultra-fast, dynamic, personaliz

A curated list of awesome packages, articles, and other cool resources from the Wagtail community.

Awesome Wagtail A curated list of awesome packages, articles, and other cool resources from the Wagtail community. Wagtail is a Python CMS powered by

🐰 Bunnybook 🐰 A tiny social network (for bunnies), built with FastAPI and React+RxJs.
🐰 Bunnybook 🐰 A tiny social network (for bunnies), built with FastAPI and React+RxJs.

🐰 Bunnybook 🐰 A tiny social network (for bunnies), built with FastAPI and React+RxJs. Click here for live demo! Included features: 💬 chat 🔴 online

An open source CMS, in python and integrable in Django

Python CMS based on the Django Framework

Simple yet powerful and really extendable application for managing a blog within your Django Web site.

Django Blog Zinnia Simple yet powerful and really extendable application for managing a blog within your Django Web site. Zinnia has been made for pub

django blog - complete customization and ready to use with one click installer

django-blog-it Simple blog package developed with Django. Features: Dynamic blog articles Blog pages Contact us page (configurable) google analytics S

 ConnectLearn is an easy to use and deploy Open-Source Project meant to make it easier for the right students to find the right teachers online.
ConnectLearn is an easy to use and deploy Open-Source Project meant to make it easier for the right students to find the right teachers online.

ConnectLearn ConnectLearn is an easy to use and deploy Open-Source Project meant to make it easier for the right students to find the right teachers o

Django e-commerce website with Advanced Features and SEO Friendly
Django e-commerce website with Advanced Features and SEO Friendly

MyTech® - Your Technology Django e-commerce website with Advanced Features and SEO Friendly Images and Prices are only used for Demo purpose and does

Owner
Sean Wiesner
Math and CS @ Cornell
Sean Wiesner
A full stack e-learning application, this is the backend using django restframework and docker.

DevsPrime API API Service backing client interfaces Technologies Python 3.9 : Base programming language for development Bash Scripting : Create conven

Nnabue Favour Chukwuemeka 1 Oct 21, 2021
Set of Web-backend projects to implement micro-blogging site

Mini-Twitter This repository contains a set of projects covered for CPSC-449 Web-Backend development under the guidance of Prof. Kenytt Avery at CSU,

null 1 Nov 7, 2021
A full-stack clone of Instagram, allowing the user to interact with posts and other users.

This project is a full-stack clone of Instagram, allowing the user to interact with posts and other users

Alejandro Carrizosa Grant 4 Feb 14, 2022
A Django blog app implemented in Wagtail

Puput Puput is a powerful and simple Django app to manage a blog. It uses the awesome Wagtail CMS as content management system. Puput is the catalan n

APSL 535 Jan 8, 2023
wger Workout Manager is a free, open source web application that helps you manage your personal workouts, weight and diet plans and can also be used as a simple gym management utility.

wger (ˈvɛɡɐ) Workout Manager is a free, open source web application that helps you manage your personal workouts, weight and diet plans and can also be used as a simple gym management utility.

wger Project 2k Dec 29, 2022
A Django-based CMS with a focus on extensibility and concise code

FeinCMS - An extensible Django-based CMS When was the last time, that a pre-built software package you wanted to use got many things right, but in the

FeinCMS 847 Jan 7, 2023
Kotti is a high-level, Pythonic web application framework based on Pyramid and SQLAlchemy. It includes an extensible Content Management System called the Kotti CMS.

Kotti Kotti is a high-level, Pythonic web application framework based on Pyramid and SQLAlchemy. It includes an extensible Content Management System c

Kotti 394 Jan 7, 2023
A Django content management system focused on flexibility and user experience

Wagtail is an open source content management system built on Django, with a strong community and commercial support. It's focused on user experience,

Wagtail 13.8k Jan 1, 2023
The easy-to-use and developer-friendly CMS

django CMS Open source enterprise content management system based on the Django framework and backed by the non-profit django CMS Association. Get inv

django CMS Association 9.1k Jan 4, 2023
The easy-to-use and developer-friendly CMS

django CMS Open source enterprise content management system based on the Django framework and backed by the non-profit django CMS Association. Get inv

django CMS Association 9.1k Jan 8, 2023