Giter VIP home page Giter VIP logo

drf-serializer-class-dynamic's Introduction

drf-serializer-class-dynamic

Decide serializer class dynamically based on viewset actions

Installation steps

I assume python3.7 is available in system path at /usr/bin or /usr/local/bin directory. If you don't have it then I would recommend to install it (for example, sudo apt install python3.7)!

Also, please upgrade pip via pip install --upgrade pip --user

  • clone the repository via git clone https://github.com/rsudip90/drf-serializer-class-dynamic.git and change directory to it via cd drf-serializer-class-dynamic

  • create virtualenv via virtualenv --python=/usr/bin/python3.7 venv

  • active virtualenv via source venv/bin/activate\

  • install the dependencies via pip install -r requirements.txt

  • change directory to webapp via cd webapp

  • run migrations via python manage.py migrate

  • load fixtures available for sample app via python manage.py loaddata sample

  • run the web application server via python manage.py runserver

  • There are three users available in fixtures as follows:

    email password is_superuser is_staff
    [email protected] admin yes yes
    [email protected] 1234 no no
    [email protected] 1234 no no
  • get logged in via username [email protected] at url http://localhost:8000/api-auth/login/

  • visit http://localhost:8000/api/v1/ and that's it.

drf-serializer-class-dynamic's People

Contributors

rsudip90 avatar

Watchers

James Cloos 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.