An open API service indexing awesome lists of open source software.

https://github.com/buildwithlal/netent-drf-coding-test

Django and DRF Coding Test for NetEnt
https://github.com/buildwithlal/netent-drf-coding-test

Last synced: 12 months ago
JSON representation

Django and DRF Coding Test for NetEnt

Awesome Lists containing this project

README

          

##### Tested Enviroment
```
Python 2.7
Python 3.4
Django 1.10
Django Rest Framework 3.5
SQLite
Ubuntu 14.04
```

##### Switch to project root directory and run below command to install project dependencies
```
pip install -r requirements.txt
```

##### API Endpoints
```
POST http://localhost:8000/api-auth/login/

GET http://localhost:8000/api-auth/logout/

POST http://localhost:8000/add_book/

PUT http://localhost:8000/update_book/{pk}/

POST http://localhost:8000/add_genre/
```

##### Available Users for testing purposes (Django built-in User Model)
```
user: demo1
pass: demo1

user: demo2
pass: demo2
```

##### Validations
```
1. The author should automatically be selected based on the logged in user.

2. Only the author should be able to update his/her book.

3. A book title has to be unique per author (each author can have a book with the same title,
but an author can not have two books with the same title).

4. An author is only allowed to have 5 books at one time.
```