GithubHelp home page GithubHelp logo

drf's Introduction

Setup

  • Create a virtual environment
python3 -m venv venv
  • then activate it
source venv/bin/activate
  • install all required packages by entering the command
pip install -r requirements.txt
  • Create a ".env" file in order to make your settings.py more secure from anyone else, otherwise the code won't work properly. In case if you're not using ".env" file you need to change your settings.py database credintials and secret key. Afterwards, you need to apply migrations to your database.
python3 manage.py makemigrations
python3 manage.py migrate
  • Finally, if you followed to every step correctly, your application must work. Launch it by typing the command
python3 manage.py runserver
  • You can also check the application for functionality by launching the unit tests
python3 manage.py test

End points

  • api/v1/post [METHODS GET, POST]
  • api/v1/post/id [METHODS GET, POST, PATCH, DELETE, PUT]
  • api/v1/comment [METHODS GET, POST]
  • api/v1/comment/id [METHODS GET, POST, DELETE, PATCH, PUT]
  • dj-rest-auth/login [METHODS POST]
  • dj-rest-auth/logout [METHODS GET, POST]
  • dj-rest-auth/password/change [METHODS POST]
  • dj-rest-auth/password/reset [METHODS POST]
  • dj-rest-auth/password/reset/confirm [METHODS POST]
  • dj-rest-auth/registration [METHODS POST]
  • dj-rest-auth/registration/verify-email [METHODS POST]
  • dj-rest-auth/registration/resend-email [METHODS POST]
  • dj-rest-auth/user [METHODS GET, PUT, PATCH]
  • api-auth/login [METHODS GET, POST]
  • api-auth/logout [METHODS GET]

or you could just use a swagger to see all endpoints and methods that available, just visit the following route

Docker

To create an image

docker build . -t drf

Run the image, so it creates a container

docker run -p 8000:8000 drf

Documentations

to enhance your understanding of the specific package, you can read the documentations that I listed below

drf's People

Contributors

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