Giter VIP home page Giter VIP logo

schooladmindjangoapi's Introduction

Introduction

This app contains a list of students in a school with activites that they can participate in.

DATABASE

Edit <settings.py> for db

'Students Activities' requires ArrayField, supported in psgsql, not dbsqlite3

Alternative would be to have a ManyToManyRel btn Student and Activities models

Auth

Uses django-rest token models and auth classes

EXPOSED ENDPOINTS

admin: 'admin/'

user:

## register as a user(teacher)

'api/fns/register
'api/cls/register

required: {email, password1, password2}

## login
'api/fns/login
'api/cls/login
required: {email, password}

## add a new student
'api/fns/students/new'
'api/cls/students/new'
required: {fname, lname, student_id(unique)}
optional: {activities:[], profile_photo}

## get student details
'api/fns/students/get/<str:pk>'
'api/cls/students/get/<str:pk>'
required: {pk=student_id}

## search for students
'api/fns/students/search'
'api/cls/students/search'
required: search_params in form of {q=''}

## patch/delete student records
'api/fns/students/edit/<str:pk>
'api/cls/students/edit/<str:pk>
required: student_id

GETTING STARTED

install dependencies in requirements.txt

$ pip install -r requirements.txt

then run the server once all dependencies are installed

$ cd studentSystem

$ python manage.py runserver

Notices

For development only:

  1. csrf cookie middleware has been disabled
  2. Token authentication format: headers['Authorization'] = 'Token [key]'
  3. All origins allowed
  4. Any host allowed

THANK YOU

schooladmindjangoapi's People

Contributors

kiokogit avatar

Stargazers

 avatar

Watchers

 avatar

schooladmindjangoapi's Issues

Change from function-based to class-based views

Changes urls to api/cls/... for class based views, and api/fns/... for function based views. Ideally, there's no [much] difference in the response given.

Class-based views are advantageous over function based views in many ways, including reusability of fns/methods

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.