Git Product home page Git Product logo

books-django's Introduction

General Assembly Logo

Django Book API

Use Django and the Django REST Framework to build an API of books.

Instructions

  1. Fork and clone this repository.
  2. Change into the new directory.
  3. Set up a virtual environment and install dependencies.
  4. Fulfill the listed requirements.

Please turn in your submission by the deadline on your cohort calendar.

Requirements

Part 1

Setup

Create a new Django project and app. Define a Book model and create a few instances through the admin interface.

Don't forget to create a new database and user in Postgres!

Install the djangorestframework module for the next section.

Build the Model and Serializer

Define a ModelSerializer for your Book Model.

Note: Do not use the HyperlinkedModelSerializer serializer. That serializer is for linked models. Here we have just a plain model.

Views and URLS

Once you have your model and serializer in place, use the generic views to create your views and URLs.

Make it so you can perform full CRUD on your Book model (without needing to be logged in).

Part 2

Implement a User model with authentication. Users should be able to create an account, sign in (through the API, not a UI), and get a token.

Set up permissions so that any user can read books from your database (both list and detail), but only authenticated users can create, update, or delete books.

Bonus

Implement one of the following as a bonus. When you finish, implement the rest!

  1. All content is licensed under a CC­BY­NC­SA 4.0 license.
  2. All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].

books-django's People

Contributors

mustafabin avatar tomatohammado avatar jrhorn424 avatar jserrao avatar

Stargazers

 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.