Giter Site home page Giter Site logo

shopy's Introduction

ShoppingList

Models User (extend AbstractUser, обязательно добавить поля email(uniq), phone) Account (id, user, amount (default=0)) Reserved (id, user, product_id, number_of_units) Storage(id, name, shop_name, unit, number_of_units, price_for_unit, price_for_kg)

User one-to-one Account User one-to-many Reserved

Функционал

User видит только свои товары. + User выбирает товар, number_of_units, нажимает кнопку “Add” и его товары добавляется в Reserved (уменьшается number_of_units в Product).+ User выбирает товар, number_of_units, нажимает кнопку “Remove” и его товары удаляются из Reserved (увеличивается number_of_units в Storage). User выбирает товар и нажимает кнопку “Delete” и все его товары одного вида удаляются из Reserved (увеличивается number_of_units в Storage).

User нажимает кнопку “Buy” и все его товары удаляются из Reserved и списываются деньги с Account. User нажимает кнопку “Clear” и все его товары удаляются из Reserved (увеличивается number_of_units в Storage).

User пользуется фильтрами и сортировкой для добавления продуктов + Добавить фильтрацию товаров по названию магазина. + Добавить фильтрацию товаров по названию товара. + Добавить сортировку по price_for_unit. + Добавить сортировку по price_for_kg. +

Товары в Product добавляет Admin через DjangoAdmin. Пополнение Account через DjangoAdmin.

Задачи:

  1. Создать модели : User (extend AbstractUser, обязательно добавить поля email(uniq), phone) Account (id, user, amount (default=0)) Reserved (id, user, product_id, number_of_units) Product(id, name, shop_name, unit, number_of_units, price_for_unit, price_for_kg)
  2. Создать listview для reserve.
  3. Добавить аутенцификацию пользователей.
  4. Создать view c запросоми на добавления(add) и изменение(edit) и удаление(delete) товара. Важно ли какой тип запроса?
  5. Создать view, что удаляет товары из Reserved и списывает деньги. - В случае покупки
  6. Создать view, что удаляет товары из Reserved и списывает деньги. - В случае обновления корзины
  7. Во view c User использовать filter и order_by
  8. Во view c Product использовать filter по name_shop.
  9. Во view c Product использовать filter по name_product. Увелилить number of users.
  10. Переписать url
  11. Исправить валидаторы
  12. Переписать request
  13. Bulk_update

shopy's People

Contributors

andreyeuivan 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.