Giter VIP home page Giter VIP logo

fatmug's Introduction

Fatmug

Vendor management Assignment

Setup steps

  1. Clone this repository on your local machine
  2. Go inside the Fatmug directory
  3. Install django using pip install django (Make sure python is installed on your system)
  4. We are using rest_framework, so use pip install djangorestframework to use it.
  5. Use the command python manage.py migrate which will create required tables in your database.
  6. For token based authentication, we have to create a user using python manage.py createsuperuser to generate a token.
  7. After creating a user, use the command python manage.py drf_create_token <your_username> your result will be like this Generated token 893f38d0382f9bfaaf69784cfbd5bb31110d1856 for user <username>
  8. Now, run the server using python manage.py runserver

Now you api is live on localhost 8000

I have used POSTMAN to test the endpoints of the api.

Because, of encapsulating the urls by token based authentication, we have to add the token everytime in the request in its header. We have to add it like this: Authorization: Token 893f38d0382f9bfaaf69784cfbd5bb31110d1856

Look at the following image: Screenshot 2024-05-09 172528

For the post request, you have to enter the url in address bar and select the POST from the dropdown. Enter the data inside Body as shown in image: image

In this way, you can use POSTMAN to check your all the endpoints.

fatmug's People

Contributors

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