Giter VIP home page Giter VIP logo

test_django_chat's Introduction

  1. pip install -r requirements.txt
  2. python manage.py makemigrations
  3. python manage.py migrate
  4. python manage.py createsuperuser(create 3 users)
  5. python manage.py collectstatic
  6. python manage.py generate_data
  7. python manage.py runserver

After running first 7 commands which set up initial data use Postman or analog software to check up further endpoints:

  • example of body - { "username": "", "password": "" }
  • example of body - { "participants": [ { "id": 1, "username": "qwerty" }, { "id": 2, "username": "asdf" } ], "messages": [{ "sender": 1, "text": "Message 1 from user 1 to user", "is_read": false }, { "sender": 1, "text": "Message 2 from user 2 to user", "is_read": false }] }
  • example of response - { "id": "2d480477-7d1b-4555-b033-21ea8a881ac9", "participants": [ { "id": 1, "username": "qwerty" }, { "id": 3, "username": "zxcv" } ], "messages": [ { "id": "ea82f00e-16e0-4f6a-bbfd-157a514b224c", "sender": 1, "text": "Message 1 from user 1 to user", "is_read": true }, { "id": "baf721ec-5260-4447-b9e5-91875f42b889", "sender": 3, "text": "Message 2 from user 3 to user", "is_read": false } ] }
  • example of response - [ { "user_id": 1, "number_of_messages": 3 }, { "user_id": 2, "number_of_messages": 2 } ]
  • example of body - { "thread": "30fc6e76-036b-4121-ae9a-bf15fc960ff2", "sender": 1, "text": "Message 1 from user 1 to user", "is_read": false }
  • example of body - { "thread": "30fc6e76-036b-4121-ae9a-bf15fc960ff2", "sender": 1, "text": "update test", "is_read": false }

P.S. I may miss out some other features, but I believe I've covered each essential stuff which was required. P.S.S. I know I also needed to add swagger with detailed documentation but due to lack of time

test_django_chat's People

Contributors

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