Giter Club home page Giter Club logo

drf_tutorial's Introduction

Music Service API

About

This is a simple music service API that I created as an example for a tutorial for learning Django REST Framework.

Goal

The goal of this project is teach Django REST framework on novice programmers.

Features

With this API;

  • You can create, view, update, and delete a song

Technology stack

Tools used during the development of this API are;

Requirements

  • Use Python 3.x.x+
  • Use Django 2.x.x+

Tests

"Code without tests is broken as designed", said Jacob Kaplan-Moss. Therefore i shall not give you code that can not be tested or has no tests. So, to run tests, enter the following command

    $ python manage.py test

Running the application

To run this application, clone the repository on your local machine and execute the following command.

    $ cd music_service
    $ virtualenv virtenv
    $ source virtenv/bin/activate
    $ pip install -r requirements.txt
    $ python manage.py makemigrations
    $ python manage.py migrate
    $ nohup python manage.py runserver & disown

drf_tutorial's People

Contributors

kasulani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drf_tutorial's Issues

AssertionError at /api/v1/auth/register/

Hi Kasulani,

First of all thanks for your tutorial, it realy helps me understanding some facets of DRF !

I followed all the steps you describe on the readme file to run your application but I can't register.
I get the following error :

AssertionError at /api/v1/auth/register/

'RegisterUsers' should either include a serializer_class attribute, or override the get_serializer_class() method.

Request Method: | GET
Request URL: | http://localhost:8000/api/v1/auth/register/
Django Version: | 2.0.3

mkdir & add fails

Thanks for the nice tutorial and the demo repo.

The mkdir for nginx failed and the add /static failed as well.

  1. the mkdir issue was resolved by following this link ( -p to be added before the path )
    https://stackoverflow.com/questions/30741995/cannot-execute-run-mkdir-in-a-dockerfile

  2. the Dockerfile of nginx fails to add static, as its in the parent directory. To make it work, i copied the static folder from the parent folder into the nginx directory. The nginx dockerfile doesnt has permission to read the files of the parent dir.

I have posting the issues, in case anyone faces it as well.

By the way, I tried fixing the bad 400 request, by adding * and localhost address to the settings.py and rebuilding again. it still did not work.

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.