Giter Site home page Giter Site logo

django-crud's Introduction

django-crud with mongodb as DB

API's

Signup

  • http://localhost:8000/api/signup)http://localhost:8000/api/signup
  • user will make post request with data email, password, name, bio,profile_photo
  • here email will be unique and valid I have implemented checks for it and have written code according to it
  • here if every check is passed then the password is hashed using bycrypt and with the above data it is saved in MongoDB.

Login

  • http://localhost:8000/api/login
  • user will make post request with data email, password
  • if the email and password both are valid and the email exist then I have sent an access token in response that will require for using further API's

UPDATE

  • http://localhost:8000/api/update
  • user will make patch request with the access token received after login and fields to be updated with email(email will not be updated)
  • if the access token is valid and if it is not expired then user info will be updated

Delete

  • http://localhost:8000/api/delete
  • Only the admin can use this API for deleting any user from Mongodb
  • for this case I have kept the user with email "[email protected]" as admin, admin has to log in and then make a delete request passing his access token received after login in headers and the email of the user in the to-be deleted in the body of the request, if the email exists then the user will be deleted from MongoDB

Logout

wrote unit test cases in crud app for above features

django-crud's People

Contributors

pritamp17 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.