Git Product home page Git Product logo

django-exercise's Introduction

Rest api test task

Brief

We need an api for tracking empoyees in multiple organizations. Each organization has

  • name
  • departments.

Departments have

  • names
  • employees.

Employees have basic personal information and status.

Status is basically a role of an employee inside that department (e.g. manager, developer, boss, etc). To change status title(e.g. 'manager') to a different one (e.g. 'Human resources manager') I should update Status entity and see updated value for all employees that are related to this entity.

When I get organizations list I want to receive:

  • all organization fields
  • departments count
  • total employees count

Departments:

  • all dep. fields
  • total count
  • total employees count for each department

Employee:

  • all fields
Objectives (milestones/steps)
  • optional: set up docker
  • Set up Postgresql/MySql database
  • Create Models
  • Create simple api
    • Serializers
    • Views
    • Urls
  • Add filters by name ond ordering
  • Set up user (administrator) models (user != employee)
    • user model has (id, name, email, [...any neccessary]) fields
    • passwordless (access token) login:
      • user sends post request with email address
      • email with sign in token is sent to user
      • token is valid and is connected to user
      • using this token user can make requests to the api (access token authorization)
  • add permissions
HOW TO
  • virtualenv
  • pip3 install -r requirements.txt
  • cd main
  • ./manage.py runserver

working folder is api

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.