GitXplorerGitXplorer
p

bookstore

public
0 stars
1 forks
1 issues

Commits

List of commits on branch master.
Verified
e772623b84b176a7f878f6b82cde7c7debb6546f

Merge pull request #12 from pyjavo/dependabot/pip/django-3.2.25

ppyjavo committed 8 months ago
Verified
9ce4b0b6f4163d76565b0f4a33e768279c72cad4

Bump django from 3.2.24 to 3.2.25

ddependabot[bot] committed 8 months ago
Verified
bdd00793384ee38859c637fffe9cc5a8abf5eca4

Merge pull request #10 from pyjavo/dependabot/pip/django-3.2.24

ppyjavo committed 8 months ago
Verified
f01871bff5eba0324c5adeb0008591e332558b1a

Merge pull request #11 from pyjavo/dependabot/pip/sqlparse-0.5.0

ppyjavo committed 8 months ago
Verified
e029894caef3e0c2ea1708fe97ab79e664d25592

Bump sqlparse from 0.4.4 to 0.5.0

ddependabot[bot] committed 9 months ago
Verified
0c3a6c6d253d40a9b83ca1fc68484fe3fdc29b0b

Bump django from 3.1.14 to 3.2.24

ddependabot[bot] committed a year ago

README

The README file for this repository.

Books CRUD Application

Introduction

This application uses Python 3 and Django 3.0.3. It contains a Books module for managing book entities. Your job is to finish an implementation of the CRUD functionality using CBV.

Task details

Please implement four class-based views (CBV) and mixins for them, so all unit tests will start passing. Also use Django's messages framework to add success/error messages.

1. Implement BookDetailView for showing the book.

Your implementation should load book details data for given isbn parameter. If book for passed isbn doesn't exist, user should be redirected to a '/books/' default route (BookListView: books:index).

2. Implement BookCreateView for creating a book.

Your implementation should populate the form fields with a book's details. After successful submission user should be redirected to the page for the created book (BookDetailView: books:detail). And do not forget to add a validator to check a isbn, it can be separated into its parts with hyphens, so isbn may only contain digits and hyphens.

3. Implement BookUpdateView for editing the book.

Your implementation should populate the form fields with a book's details for passed isbn parameter. If book for passed isbn doesn't exist, user should be redirected to a '/books/' default route (BookListView: books:index). After successful submission user should be redirected to the page for the edited book (BookDetailView: books:detail).

4. Implement BookDeleteView for deleting the book.

Your implementation should delete a book for given isbn parameter. If book for passed isbn doesn't exist, user should be redirected to a '/books/' default route (BookListView: books:index). After the book is deleted, the user should be redirected to a list of books (BookListView: books:index).

Hints

You shouldn't modify the unit tests, just complete the CBVs and mixins to make the unit tests run as expected.

To execute all unit tests, use:

pip install -q -e . && nosetests

TODOs

  • Add nose for being able to run the unit tests
  • Check if unit tests run (with or without nose)
  • Add 404, 403 or 500 error pages