According to the Task, has been implemented next:
- Created two entities: Book(has 'title' field) and Author(has 'name' field). The reletionship is M2M.
- Addition entity User was used to authorize user. The entity has 'login', 'password', 'is_authorized' and 'is_admin' fields. 'is_admin' property was used for authorize users to edite list of users. Users 'is_authorized' property can searching books and viewing the list of books.
- Anonymous users can register himselfs or log in. After registration can do nothing during Admin set user`s 'is_authorized' to "True".
- Searching the books by keyword. The searching occurs in books
titles and authors
names. If keyword is empty, whole list of books is shown. Every lists has paginations. - Admin interface is available for users, who have 'is_admin' in 'True'
- Forms fields are validated for empty value, unique values for User and Author.
cd ./prod_lib/src
sudo pip install -r requirements.txt # installing requirement packages
python manage.py run_init_db # create database file and create tables
python manage.py post_test_data # insert test data into the db
python manage.py runserver