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
- Host: GitHub
- URL: https://github.com/buildwithlal/netent-drf-coding-test
- Owner: BuildWithLal
- Created: 2016-12-15T10:25:54.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-17T20:43:38.000Z (about 9 years ago)
- Last Synced: 2025-01-02T00:42:32.579Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.
```