├── .gitignore ├── LICENSE ├── Part-01 Django Models Views and Testing ├── Part-1 Initial │ ├── README.md │ ├── core │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ │ └── images │ │ │ ├── img1_DCytNvp.png │ │ │ └── img2_SUlRxwK.png │ ├── requirements.txt │ ├── setup.cfg │ ├── store │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── test_models.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ └── templates │ │ └── store │ │ ├── base.html │ │ ├── home.html │ │ └── products │ │ ├── category.html │ │ └── detail.html └── Part-1 Refactored │ ├── README.md │ ├── core │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ └── images │ │ ├── default.png │ │ ├── img1_DCytNvp.png │ │ └── img2_SUlRxwK.png │ ├── requirements.txt │ ├── setup.cfg │ ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py │ └── templates │ └── store │ ├── base.html │ ├── home.html │ └── products │ ├── category.html │ └── single.html ├── Part-02 Build an E-commerce Basket with Sessions ├── After Refactoring │ ├── README.md │ ├── core │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ │ └── images │ │ │ ├── default.png │ │ │ ├── img1_DCytNvp.png │ │ │ └── img2_SUlRxwK.png │ ├── requirements.txt │ ├── setup.cfg │ ├── store │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── context_processors.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── test_models.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ └── templates │ │ └── store │ │ ├── base.html │ │ ├── home.html │ │ └── products │ │ ├── category.html │ │ └── single.html └── Final │ ├── README.md │ ├── basket │ ├── __init__.py │ ├── apps.py │ ├── basket.py │ ├── context_processors.py │ ├── migrations │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ ├── urls.py │ └── views.py │ ├── core │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ └── images │ │ ├── default.png │ │ ├── img1_DCytNvp.png │ │ └── img2_SUlRxwK.png │ ├── requirements.txt │ ├── setup.cfg │ ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py │ └── templates │ └── store │ ├── base.html │ ├── basket │ └── summary.html │ ├── home.html │ └── products │ ├── category.html │ └── single.html ├── Part-03 User Payment and Order Management ├── After Refactoring │ ├── README.md │ ├── basket │ │ ├── __init__.py │ │ ├── apps.py │ │ ├── basket.py │ │ ├── context_processors.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ ├── core │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ │ └── images │ │ │ ├── default.png │ │ │ ├── img1_DCytNvp.png │ │ │ └── img2_SUlRxwK.png │ ├── requirements.txt │ ├── setup.cfg │ ├── static │ │ ├── basket │ │ │ └── css │ │ │ │ └── basket.css │ │ ├── core │ │ │ └── css │ │ │ │ └── base.css │ │ └── logo.png │ ├── store │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── context_processors.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── test_models.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ └── templates │ │ ├── basket │ │ └── summary.html │ │ └── store │ │ ├── base.html │ │ ├── home.html │ │ └── products │ │ ├── category.html │ │ └── single.html └── Final │ ├── LICENSE │ ├── README.md │ ├── account │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── tokens.py │ ├── urls.py │ └── views.py │ ├── basket │ ├── __init__.py │ ├── apps.py │ ├── basket.py │ ├── context_processors.py │ ├── migrations │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ ├── urls.py │ └── views.py │ ├── core │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ └── images │ │ ├── default.png │ │ ├── img1_DCytNvp.png │ │ └── img2_SUlRxwK.png │ ├── orders │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_remove_order_email.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py │ ├── payment │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py │ ├── requirements.txt │ ├── setup.cfg │ ├── static │ ├── basket │ │ └── css │ │ │ └── basket.css │ ├── core │ │ └── css │ │ │ └── base.css │ ├── logo.png │ └── payment │ │ └── index.js │ ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py │ ├── stripe.exe │ ├── stripe.txt │ └── templates │ ├── account │ ├── registration │ │ ├── account_activation_email.html │ │ ├── activation_invalid.html │ │ ├── login.html │ │ └── register.html │ └── user │ │ ├── dashboard.html │ │ ├── delete_confirm.html │ │ ├── edit_details.html │ │ ├── password_reset_confirm.html │ │ ├── password_reset_email.html │ │ ├── password_reset_form.html │ │ └── reset_status.html │ ├── basket │ └── summary.html │ ├── payment │ ├── error.html │ ├── home.html │ └── orderplaced.html │ └── store │ ├── base.html │ ├── home.html │ └── products │ ├── category.html │ └── single.html ├── Part-04 Refactoring Templates ├── LICENSE ├── README.md ├── account │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── tokens.py │ ├── urls.py │ └── views.py ├── basket │ ├── __init__.py │ ├── apps.py │ ├── basket.py │ ├── context_processors.py │ ├── migrations │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ ├── urls.py │ └── views.py ├── core │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 ├── manage.py ├── media │ └── images │ │ ├── default.png │ │ ├── img1_DCytNvp.png │ │ └── img2_SUlRxwK.png ├── orders │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_remove_order_email.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── payment │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── requirements.txt ├── setup.cfg ├── static │ ├── account │ │ └── css │ │ │ └── account.css │ ├── basket │ │ └── css │ │ │ └── basket.css │ ├── core │ │ └── css │ │ │ └── base.css │ ├── logo.png │ ├── payment │ │ ├── css │ │ │ └── payment.css │ │ └── index.js │ └── store │ │ └── css │ │ └── store.css ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py └── templates │ ├── account │ ├── dashboard │ │ ├── dashboard.html │ │ ├── delete_confirm.html │ │ └── edit_details.html │ ├── login.html │ ├── password_reset │ │ ├── password_reset_confirm.html │ │ ├── password_reset_email.html │ │ ├── password_reset_form.html │ │ └── reset_status.html │ ├── registration │ │ ├── account_activation_email.html │ │ ├── activation_invalid.html │ │ ├── register.html │ │ └── register_email_confirm.html │ └── sub_base.html │ ├── base.html │ ├── basket │ └── summary.html │ ├── payment │ ├── error.html │ ├── orderplaced.html │ ├── payment_form.html │ └── sub_base.html │ └── store │ ├── category.html │ ├── index.html │ └── single.html ├── Part-05 Multi-Product Types Database Development ├── Final │ ├── .vscode │ │ └── settings.json │ ├── LICENSE │ ├── README.md │ ├── _documentation │ │ ├── packages.txt │ │ ├── stripe.txt │ │ └── vscode_settings.txt │ ├── account │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── forms.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── tokens.py │ │ ├── urls.py │ │ └── views.py │ ├── basket │ │ ├── __init__.py │ │ ├── apps.py │ │ ├── basket.py │ │ ├── context_processors.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ ├── core │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── db.sqlite3 │ │ ├── settings │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ └── dev_debug.py │ │ ├── urls.py │ │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ │ └── images │ │ │ ├── default.png │ │ │ ├── img1_DCytNvp.png │ │ │ └── img2_SUlRxwK.png │ ├── orders │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ ├── payment │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ ├── reuirements.txt │ ├── static │ │ ├── account │ │ │ └── css │ │ │ │ └── account.css │ │ ├── basket │ │ │ └── css │ │ │ │ └── basket.css │ │ ├── core │ │ │ └── css │ │ │ │ └── base.css │ │ ├── logo.png │ │ ├── payment │ │ │ ├── css │ │ │ │ └── payment.css │ │ │ └── index.js │ │ └── store │ │ │ └── css │ │ │ └── store.css │ ├── store │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── context_processors.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── tests │ │ │ ├── __init__.py │ │ │ ├── test_models.py │ │ │ └── test_views.py │ │ ├── urls.py │ │ └── views.py │ └── templates │ │ ├── account │ │ ├── dashboard │ │ │ ├── dashboard.html │ │ │ ├── delete_confirm.html │ │ │ └── edit_details.html │ │ ├── login.html │ │ ├── password_reset │ │ │ ├── password_reset_confirm.html │ │ │ ├── password_reset_email.html │ │ │ ├── password_reset_form.html │ │ │ └── reset_status.html │ │ ├── registration │ │ │ ├── account_activation_email.html │ │ │ ├── activation_invalid.html │ │ │ ├── register.html │ │ │ └── register_email_confirm.html │ │ └── sub_base.html │ │ ├── base.html │ │ ├── basket │ │ └── summary.html │ │ ├── payment │ │ ├── error.html │ │ ├── orderplaced.html │ │ ├── payment_form.html │ │ └── sub_base.html │ │ └── store │ │ ├── category.html │ │ ├── index.html │ │ └── single.html └── Stage-1 │ ├── .vscode │ └── settings.json │ ├── LICENSE │ ├── README.md │ ├── _documentation │ ├── packages.txt │ ├── stripe.txt │ └── vscode_settings.txt │ ├── account │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── tokens.py │ ├── urls.py │ └── views.py │ ├── basket │ ├── __init__.py │ ├── apps.py │ ├── basket.py │ ├── context_processors.py │ ├── migrations │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ ├── urls.py │ └── views.py │ ├── core │ ├── __init__.py │ ├── asgi.py │ ├── db.sqlite3 │ ├── settings │ │ ├── __init__.py │ │ ├── base.py │ │ └── dev_debug.py │ ├── urls.py │ └── wsgi.py │ ├── db.sqlite3 │ ├── manage.py │ ├── media │ └── images │ │ ├── default.png │ │ ├── img1_DCytNvp.png │ │ └── img2_SUlRxwK.png │ ├── orders │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py │ ├── payment │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py │ ├── reuirements.txt │ ├── static │ ├── account │ │ └── css │ │ │ └── account.css │ ├── basket │ │ └── css │ │ │ └── basket.css │ ├── core │ │ └── css │ │ │ └── base.css │ ├── logo.png │ ├── payment │ │ ├── css │ │ │ └── payment.css │ │ └── index.js │ └── store │ │ └── css │ │ └── store.css │ ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py │ └── templates │ ├── account │ ├── dashboard │ │ ├── dashboard.html │ │ ├── delete_confirm.html │ │ └── edit_details.html │ ├── login.html │ ├── password_reset │ │ ├── password_reset_confirm.html │ │ ├── password_reset_email.html │ │ ├── password_reset_form.html │ │ └── reset_status.html │ ├── registration │ │ ├── account_activation_email.html │ │ ├── activation_invalid.html │ │ ├── register.html │ │ └── register_email_confirm.html │ └── sub_base.html │ ├── base.html │ ├── basket │ └── summary.html │ ├── payment │ ├── error.html │ ├── orderplaced.html │ ├── payment_form.html │ └── sub_base.html │ └── store │ ├── category.html │ ├── index.html │ └── single.html ├── Part-06 Managing Multiple Addresses - CRUD UUID ├── .vscode │ └── settings.json ├── LICENSE ├── README.md ├── _documentation │ ├── commands.txt │ ├── database_schema.txt │ ├── packages.txt │ ├── stripe.txt │ └── vscode_settings.txt ├── account │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── tokens.py │ ├── urls.py │ └── views.py ├── basket │ ├── __init__.py │ ├── apps.py │ ├── basket.py │ ├── context_processors.py │ ├── migrations │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ ├── urls.py │ └── views.py ├── core │ ├── __init__.py │ ├── asgi.py │ ├── db.sqlite3 │ ├── settings │ │ ├── __init__.py │ │ ├── base.py │ │ └── dev_debug.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 ├── manage.py ├── media │ └── images │ │ ├── default.png │ │ ├── default_7j3pLDD.png │ │ ├── default_AN2mWQr.png │ │ ├── img1_DCytNvp.png │ │ ├── img1_DCytNvp_NlI9SCz.png │ │ └── img2_SUlRxwK.png ├── orders │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── payment │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── requirements.txt ├── static │ ├── account │ │ └── css │ │ │ └── account.css │ ├── basket │ │ └── css │ │ │ └── basket.css │ ├── core │ │ └── css │ │ │ └── base.css │ ├── logo.png │ ├── payment │ │ ├── css │ │ │ └── payment.css │ │ └── index.js │ └── store │ │ └── css │ │ └── store.css ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py └── templates │ ├── account │ ├── dashboard │ │ ├── addresses.html │ │ ├── dashboard.html │ │ ├── delete_confirm.html │ │ ├── edit_addresses.html │ │ └── edit_details.html │ ├── login.html │ ├── password_reset │ │ ├── password_reset_confirm.html │ │ ├── password_reset_email.html │ │ ├── password_reset_form.html │ │ └── reset_status.html │ ├── registration │ │ ├── account_activation_email.html │ │ ├── activation_invalid.html │ │ ├── register.html │ │ └── register_email_confirm.html │ └── sub_base.html │ ├── base.html │ ├── basket │ └── summary.html │ ├── payment │ ├── error.html │ ├── orderplaced.html │ ├── payment_form.html │ └── sub_base.html │ └── store │ ├── category.html │ ├── index.html │ └── single.html ├── Part-07 Wish List ├── .vscode │ └── settings.json ├── LICENSE ├── README.md ├── _documentation │ ├── commands.txt │ ├── database_schema.txt │ ├── packages.txt │ ├── stripe.txt │ └── vscode_settings.txt ├── account │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── tokens.py │ ├── urls.py │ └── views.py ├── basket │ ├── __init__.py │ ├── apps.py │ ├── basket.py │ ├── context_processors.py │ ├── migrations │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ ├── urls.py │ └── views.py ├── core │ ├── __init__.py │ ├── asgi.py │ ├── db.sqlite3 │ ├── settings │ │ ├── __init__.py │ │ ├── base.py │ │ └── dev_debug.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 ├── manage.py ├── media │ └── images │ │ ├── default.png │ │ ├── default_7j3pLDD.png │ │ ├── default_AN2mWQr.png │ │ ├── default_MRh0T2M.png │ │ ├── default_Vi1FAPr.png │ │ ├── img1_DCytNvp.png │ │ ├── img1_DCytNvp_NlI9SCz.png │ │ └── img2_SUlRxwK.png ├── orders │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── payment │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── requirements.txt ├── static │ ├── account │ │ └── css │ │ │ └── account.css │ ├── basket │ │ └── css │ │ │ └── basket.css │ ├── core │ │ └── css │ │ │ └── base.css │ ├── logo.png │ ├── payment │ │ ├── css │ │ │ └── payment.css │ │ └── index.js │ └── store │ │ └── css │ │ └── store.css ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_product_users_wishlist.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py └── templates │ ├── account │ ├── dashboard │ │ ├── addresses.html │ │ ├── dashboard.html │ │ ├── delete_confirm.html │ │ ├── edit_addresses.html │ │ ├── edit_details.html │ │ └── user_wish_list.html │ ├── login.html │ ├── password_reset │ │ ├── password_reset_confirm.html │ │ ├── password_reset_email.html │ │ ├── password_reset_form.html │ │ └── reset_status.html │ ├── registration │ │ ├── account_activation_email.html │ │ ├── activation_invalid.html │ │ ├── register.html │ │ └── register_email_confirm.html │ └── sub_base.html │ ├── base.html │ ├── basket │ └── summary.html │ ├── payment │ ├── error.html │ ├── orderplaced.html │ ├── payment_form.html │ └── sub_base.html │ └── store │ ├── category.html │ ├── index.html │ └── single.html ├── Part-08 PayPal Integration ├── .vscode │ └── settings.json ├── LICENSE ├── README.md ├── _documentation │ ├── commands.txt │ ├── database_schema.txt │ ├── packages.txt │ ├── stripe.txt │ └── vscode_settings.txt ├── account │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── forms.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── tokens.py │ ├── urls.py │ └── views.py ├── basket │ ├── __init__.py │ ├── apps.py │ ├── basket.py │ ├── context_processors.py │ ├── migrations │ │ └── __init__.py │ ├── tests │ │ ├── __init__.py │ │ └── test_views.py │ ├── urls.py │ └── views.py ├── checkout │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── paypal.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── core │ ├── __init__.py │ ├── asgi.py │ ├── db.sqlite3 │ ├── settings │ │ ├── __init__.py │ │ ├── base.py │ │ └── dev_debug.py │ ├── urls.py │ └── wsgi.py ├── db.sqlite3 ├── manage.py ├── media │ └── images │ │ ├── default.png │ │ ├── default_7j3pLDD.png │ │ ├── default_AN2mWQr.png │ │ ├── default_MRh0T2M.png │ │ ├── default_Vi1FAPr.png │ │ ├── img1_DCytNvp.png │ │ ├── img1_DCytNvp_NlI9SCz.png │ │ └── img2_SUlRxwK.png ├── orders │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_auto_20210322_1634.py │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── requirements.txt ├── static │ ├── account │ │ └── css │ │ │ └── account.css │ ├── basket │ │ └── css │ │ │ └── basket.css │ ├── core │ │ └── css │ │ │ └── base.css │ ├── logo.png │ ├── payment │ │ ├── css │ │ │ └── payment.css │ │ └── index.js │ └── store │ │ └── css │ │ └── store.css ├── store │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── context_processors.py │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0002_product_users_wishlist.py │ │ └── __init__.py │ ├── models.py │ ├── tests │ │ ├── __init__.py │ │ ├── test_models.py │ │ └── test_views.py │ ├── urls.py │ └── views.py └── templates │ ├── account │ ├── dashboard │ │ ├── addresses.html │ │ ├── dashboard.html │ │ ├── delete_confirm.html │ │ ├── edit_addresses.html │ │ ├── edit_details.html │ │ ├── user_orders.html │ │ └── user_wish_list.html │ ├── login.html │ ├── password_reset │ │ ├── password_reset_confirm.html │ │ ├── password_reset_email.html │ │ ├── password_reset_form.html │ │ └── reset_status.html │ ├── registration │ │ ├── account_activation_email.html │ │ ├── activation_invalid.html │ │ ├── register.html │ │ └── register_email_confirm.html │ └── sub_base.html │ ├── base.html │ ├── basket │ └── summary.html │ ├── checkout │ ├── delivery_address.html │ ├── delivery_choices.html │ ├── payment_selection.html │ └── payment_successful.html │ └── store │ ├── category.html │ ├── index.html │ └── single.html ├── Part-09 Project Refactor and Pytest Introduction ├── .coveragerc ├── .vscode │ └── settings.json ├── Procfile ├── app.json ├── conftest.py ├── db.sqlite3 ├── docs │ ├── commands.txt │ ├── database_schema.txt │ ├── folder_structure.txt │ ├── heroku.txt │ ├── packages.txt │ ├── part-9.txt │ ├── stripe.txt │ └── vscode_settings.txt ├── ecommerce │ ├── __init__.py │ ├── apps │ │ ├── account │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── tokens.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── basket │ │ │ ├── __init__.py │ │ │ ├── basket.py │ │ │ ├── context_processors.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── catalogue │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── checkout │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── paypal.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── orders │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── manage.py ├── media │ └── images │ │ ├── default.png │ │ └── default_I6Si6UC.png ├── pytest.ini ├── requirements.txt ├── static │ ├── core │ │ └── css │ │ │ └── base.css │ ├── mptt │ │ ├── arrow-move.png │ │ ├── disclosure-down.png │ │ ├── disclosure-right.png │ │ ├── draggable-admin.css │ │ └── draggable-admin.js │ └── payment │ │ ├── css │ │ └── payment.css │ │ └── index.js ├── templates │ ├── account │ │ ├── dashboard │ │ │ ├── addresses.html │ │ │ ├── dashboard.html │ │ │ ├── delete_confirm.html │ │ │ ├── edit_addresses.html │ │ │ ├── edit_details.html │ │ │ ├── user_orders.html │ │ │ └── user_wish_list.html │ │ ├── login.html │ │ ├── password_reset │ │ │ ├── password_reset_confirm.html │ │ │ ├── password_reset_email.html │ │ │ ├── password_reset_form.html │ │ │ └── reset_status.html │ │ ├── registration │ │ │ ├── account_activation_email.html │ │ │ ├── activation_invalid.html │ │ │ ├── register.html │ │ │ └── register_email_confirm.html │ │ └── sub_base.html │ ├── base.html │ ├── basket │ │ └── summary.html │ ├── catalogue │ │ ├── category.html │ │ ├── index.html │ │ └── single.html │ └── checkout │ │ ├── delivery_address.html │ │ ├── delivery_choices.html │ │ ├── payment_selection.html │ │ └── payment_successful.html └── tests │ └── catalogue │ ├── test_catalogue.py │ └── test_catalogue_views.py ├── Part-10 Pytest Testing 1 ├── .coveragerc ├── .vscode │ └── settings.json ├── Procfile ├── app.json ├── conftest.py ├── db.sqlite3 ├── docs │ ├── commands.txt │ ├── database_schema.txt │ └── folder_structure.txt ├── ecommerce │ ├── __init__.py │ ├── apps │ │ ├── account │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── forms.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── tests │ │ │ │ ├── test_account_forms.py │ │ │ │ └── test_account_models.py │ │ │ ├── tokens.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── basket │ │ │ ├── __init__.py │ │ │ ├── basket.py │ │ │ ├── context_processors.py │ │ │ ├── migrations │ │ │ │ └── __init__.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── catalogue │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── context_processors.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── tests │ │ │ │ ├── test_catalogue_model.py │ │ │ │ └── test_catalogue_views.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ ├── checkout │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── migrations │ │ │ │ ├── 0001_initial.py │ │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── paypal.py │ │ │ ├── tests.py │ │ │ ├── urls.py │ │ │ └── views.py │ │ └── orders │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ │ ├── models.py │ │ │ ├── urls.py │ │ │ └── views.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── manage.py ├── media │ └── images │ │ ├── default.png │ │ └── default_I6Si6UC.png ├── pytest.ini ├── requirements.txt ├── static │ ├── core │ │ └── css │ │ │ └── base.css │ ├── mptt │ │ ├── arrow-move.png │ │ ├── disclosure-down.png │ │ ├── disclosure-right.png │ │ ├── draggable-admin.css │ │ └── draggable-admin.js │ └── payment │ │ ├── css │ │ └── payment.css │ │ └── index.js ├── templates │ ├── account │ │ ├── dashboard │ │ │ ├── addresses.html │ │ │ ├── dashboard.html │ │ │ ├── delete_confirm.html │ │ │ ├── edit_addresses.html │ │ │ ├── edit_details.html │ │ │ ├── user_orders.html │ │ │ └── user_wish_list.html │ │ ├── login.html │ │ ├── password_reset │ │ │ ├── password_reset_confirm.html │ │ │ ├── password_reset_email.html │ │ │ ├── password_reset_form.html │ │ │ └── reset_status.html │ │ ├── registration │ │ │ ├── account_activation_email.html │ │ │ ├── activation_invalid.html │ │ │ ├── register.html │ │ │ └── register_email_confirm.html │ │ └── sub_base.html │ ├── base.html │ ├── basket │ │ └── summary.html │ ├── catalogue │ │ ├── category.html │ │ ├── index.html │ │ └── single.html │ └── checkout │ │ ├── delivery_address.html │ │ ├── delivery_choices.html │ │ ├── payment_selection.html │ │ └── payment_successful.html └── tests │ └── factories.py ├── README.md └── logo.svg /.gitignore: -------------------------------------------------------------------------------- 1 | #### 2 | # Django 3 | #### 4 | *.log 5 | *.pot 6 | *.pyc 7 | __pycache__/ 8 | 9 | #### 10 | # Environments 11 | #### 12 | .venv/ 13 | venv/ 14 | 15 | #### 16 | # Unit Test & 17 | # Coverage Reports 18 | #### 19 | htmlcov/ 20 | .coverage 21 | .pytest_cache 22 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/README.md: -------------------------------------------------------------------------------- 1 | # YT_Django_Project_Ecommerce_v1_Part1 2 | 3 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Initial/core/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/core/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.conf.urls.static import static 3 | from django.contrib import admin 4 | from django.urls import include, path 5 | 6 | urlpatterns = [ 7 | path('admin/', admin.site.urls), 8 | path('', include('store.urls', namespace='store')), 9 | ] 10 | 11 | if settings.DEBUG: 12 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 13 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Initial/db.sqlite3 -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Initial/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Initial/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.1 2 | autopep8==1.5.4 3 | coverage==5.3.1 4 | Django==3.1.4 5 | flake8-django==1.1.1 6 | isort==5.7.0 7 | mccabe==0.6.1 8 | Pillow==8.0.1 9 | pycodestyle==2.6.0 10 | pyflakes==2.2.0 11 | pytz==2020.4 12 | sqlparse==0.4.1 13 | testfixtures==6.17.1 14 | toml==0.10.2 15 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,*migrations*,*venv* 3 | max-line-length = 119 -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Initial/store/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Initial/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Initial/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Initial/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.all_products, name='all_products'), 9 | path('item//', views.product_detail, name='product_detail'), 10 | path('search//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/README.md: -------------------------------------------------------------------------------- 1 | # YT_Django_Project_Ecommerce_v1_Part1 2 | 3 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/core/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/core/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.conf.urls.static import static 3 | from django.contrib import admin 4 | from django.urls import include, path 5 | 6 | urlpatterns = [ 7 | path('admin/', admin.site.urls), 8 | path('', include('store.urls', namespace='store')), 9 | ] 10 | 11 | if settings.DEBUG: 12 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 13 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/db.sqlite3 -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/media/images/default.png -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.1 2 | autopep8==1.5.4 3 | coverage==5.3.1 4 | Django==3.1.4 5 | flake8-django==1.1.1 6 | isort==5.7.0 7 | mccabe==0.6.1 8 | Pillow==8.0.1 9 | pycodestyle==2.6.0 10 | pyflakes==2.2.0 11 | pytz==2020.4 12 | sqlparse==0.4.1 13 | testfixtures==6.17.1 14 | toml==0.10.2 15 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,*migrations*,*venv* 3 | max-line-length = 119 -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/store/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-01 Django Models Views and Testing/Part-1 Refactored/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-01 Django Models Views and Testing/Part-1 Refactored/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='product_all'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/README.md: -------------------------------------------------------------------------------- 1 | # YT_Django_Project_Ecommerce_v1_Part1 2 | 3 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/core/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/core/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.conf.urls.static import static 3 | from django.contrib import admin 4 | from django.urls import include, path 5 | 6 | urlpatterns = [ 7 | path('admin/', admin.site.urls), 8 | path('', include('store.urls', namespace='store')), 9 | ] 10 | 11 | if settings.DEBUG: 12 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 13 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/db.sqlite3 -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/media/images/default.png -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.1 2 | autopep8==1.5.4 3 | coverage==5.3.1 4 | Django==3.1.4 5 | flake8-django==1.1.1 6 | isort==5.7.0 7 | mccabe==0.6.1 8 | Pillow==8.0.1 9 | pycodestyle==2.6.0 10 | pyflakes==2.2.0 11 | pytz==2020.4 12 | sqlparse==0.4.1 13 | testfixtures==6.17.1 14 | toml==0.10.2 15 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,*migrations*,*venv* 3 | max-line-length = 119 -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/After Refactoring/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='product_all'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/README.md: -------------------------------------------------------------------------------- 1 | # YT_Django_Project_Ecommerce_v1_Part1 2 | 3 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/basket/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/core/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/db.sqlite3 -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/media/images/default.png -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.1 2 | autopep8==1.5.4 3 | coverage==5.3.1 4 | Django==3.1.4 5 | flake8-django==1.1.1 6 | isort==5.7.0 7 | mccabe==0.6.1 8 | Pillow==8.0.1 9 | pycodestyle==2.6.0 10 | pyflakes==2.2.0 11 | pytz==2020.4 12 | sqlparse==0.4.1 13 | testfixtures==6.17.1 14 | toml==0.10.2 15 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,*migrations*,*venv* 3 | max-line-length = 119 -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/store/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-02 Build an E-commerce Basket with Sessions/Final/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-02 Build an E-commerce Basket with Sessions/Final/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='product_all'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/README.md: -------------------------------------------------------------------------------- 1 | # YT_Django_Project_Ecommerce_v1_Part1 2 | 3 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/basket/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/core/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/db.sqlite3 -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/media/images/default.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.3.1 2 | autopep8==1.5.4 3 | coverage==5.3.1 4 | Django==3.1.4 5 | flake8-django==1.1.1 6 | isort==5.7.0 7 | mccabe==0.6.1 8 | Pillow==8.0.1 9 | pycodestyle==2.6.0 10 | pyflakes==2.2.0 11 | pytz==2020.4 12 | sqlparse==0.4.1 13 | testfixtures==6.17.1 14 | toml==0.10.2 15 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,*migrations*,*venv* 3 | max-line-length = 119 -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/static/logo.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/store/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/After Refactoring/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/After Refactoring/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='product_all'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/account/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import UserBase 4 | 5 | admin.site.register(UserBase) 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/account/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/basket/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/core/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/db.sqlite3 -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/media/images/default.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/orders/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/orders/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrdersConfig(AppConfig): 5 | name = 'orders' 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/orders/migrations/0002_remove_order_email.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.4 on 2021-02-09 18:45 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('orders', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='order', 15 | name='email', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/orders/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/payment/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/payment/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | name = 'payment' 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/payment/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/payment/migrations/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/payment/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/payment/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/payment/tests.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'payment' 6 | 7 | urlpatterns = [ 8 | path('', views.BasketView, name='basket'), 9 | path('orderplaced/', views.order_placed, name='order_placed'), 10 | path('error/', views.Error.as_view(), name='error'), 11 | path('webhook/', views.stripe_webhook), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,*migrations*,*venv* 3 | max-line-length = 119 -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/static/logo.png -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/store/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='product_all'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/stripe.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-03 User Payment and Order Management/Final/stripe.exe -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/stripe.txt: -------------------------------------------------------------------------------- 1 | No auth: 4242424242424242 2 | 3 | Auth: 4000002500003155 4 | 5 | Error: 4000000000009995 -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | invalid 2 | 3 | -------------------------------------------------------------------------------- /Part-03 User Payment and Order Management/Final/templates/payment/error.html: -------------------------------------------------------------------------------- 1 | error -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/account/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import UserBase 4 | 5 | admin.site.register(UserBase) 6 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/account/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/basket/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/core/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/db.sqlite3 -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/media/images/default.png -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/orders/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/orders/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrdersConfig(AppConfig): 5 | name = 'orders' 6 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/orders/migrations/0002_remove_order_email.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 3.1.4 on 2021-02-09 18:45 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('orders', '0001_initial'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='order', 15 | name='email', 16 | ), 17 | ] 18 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/orders/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/payment/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/payment/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | name = 'payment' 6 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/payment/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/payment/migrations/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/payment/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/payment/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/payment/tests.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'payment' 6 | 7 | urlpatterns = [ 8 | path('', views.BasketView, name='basket'), 9 | path('orderplaced/', views.order_placed, name='order_placed'), 10 | path('error/', views.Error.as_view(), name='error'), 11 | path('webhook/', views.stripe_webhook), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | exclude = .git,*migrations*,*venv* 3 | max-line-length = 119 -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/static/account/css/account.css: -------------------------------------------------------------------------------- 1 | .account-form input { 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .account-form input:focus { 7 | border-color: #1497ff; 8 | box-shadow: none; 9 | } -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/static/basket/css/basket.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/static/basket/css/basket.css -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/static/logo.png -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/static/store/css/store.css: -------------------------------------------------------------------------------- 1 | .store-select-dropdown{ 2 | width:50px; 3 | height:40px; 4 | } -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/store/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-04 Refactoring Templates/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='store_home'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/payment/error.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Error{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order Error

8 |

Please contact our customer support team

9 | Dashboard 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/payment/orderplaced.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Order Placed{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order has been placed

8 |

Check your email for confirmation

9 | See orders 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-04 Refactoring Templates/templates/payment/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'payment/css/payment.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/_documentation/packages.txt: -------------------------------------------------------------------------------- 1 | Package List 2 | #### 3 | 4 | django 5 | black 6 | isort 7 | django-mptt 8 | pillow 9 | stripe 10 | coverage 11 | six -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/_documentation/stripe.txt: -------------------------------------------------------------------------------- 1 | No auth: 4242424242424242 2 | Auth: 4000002500003155 3 | Error: 4000000000009995 -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/account/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import UserBase 4 | 5 | admin.site.register(UserBase) 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/account/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/basket/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/core/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/core/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/core/db.sqlite3 -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/core/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/core/settings/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/db.sqlite3 -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/media/images/default.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/orders/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/orders/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrdersConfig(AppConfig): 5 | name = 'orders' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/orders/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/payment/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/payment/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | name = 'payment' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/payment/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/payment/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/payment/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/payment/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/payment/tests.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'payment' 6 | 7 | urlpatterns = [ 8 | path('', views.BasketView, name='basket'), 9 | path('orderplaced/', views.order_placed, name='order_placed'), 10 | path('error/', views.Error.as_view(), name='error'), 11 | path('webhook/', views.stripe_webhook), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/static/account/css/account.css: -------------------------------------------------------------------------------- 1 | .account-form input { 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .account-form input:focus { 7 | border-color: #1497ff; 8 | box-shadow: none; 9 | } -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/static/basket/css/basket.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/static/basket/css/basket.css -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/static/logo.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/static/store/css/store.css: -------------------------------------------------------------------------------- 1 | .store-select-dropdown{ 2 | width:50px; 3 | height:40px; 4 | } -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/store/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Final/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='store_home'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/payment/error.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Error{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order Error

8 |

Please contact our customer support team

9 | Dashboard 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/payment/orderplaced.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Order Placed{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order has been placed

8 |

Check your email for confirmation

9 | See orders 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Final/templates/payment/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'payment/css/payment.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/_documentation/packages.txt: -------------------------------------------------------------------------------- 1 | Package List 2 | #### 3 | 4 | django 5 | black 6 | isort 7 | django-mptt 8 | pillow 9 | stripe 10 | coverage 11 | six -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/_documentation/stripe.txt: -------------------------------------------------------------------------------- 1 | No auth: 4242424242424242 2 | Auth: 4000002500003155 3 | Error: 4000000000009995 -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/account/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import UserBase 4 | 5 | admin.site.register(UserBase) 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/account/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/basket/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/core/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/core/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/core/db.sqlite3 -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/core/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/core/settings/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/db.sqlite3 -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/media/images/default.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/orders/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/orders/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrdersConfig(AppConfig): 5 | name = 'orders' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/orders/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/payment/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/payment/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | name = 'payment' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/payment/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/payment/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/payment/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/payment/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/payment/tests.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'payment' 6 | 7 | urlpatterns = [ 8 | path('', views.BasketView, name='basket'), 9 | path('orderplaced/', views.order_placed, name='order_placed'), 10 | path('error/', views.Error.as_view(), name='error'), 11 | path('webhook/', views.stripe_webhook), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/static/account/css/account.css: -------------------------------------------------------------------------------- 1 | .account-form input { 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .account-form input:focus { 7 | border-color: #1497ff; 8 | box-shadow: none; 9 | } -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/static/basket/css/basket.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/static/basket/css/basket.css -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/static/logo.png -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/static/store/css/store.css: -------------------------------------------------------------------------------- 1 | .store-select-dropdown{ 2 | width:50px; 3 | height:40px; 4 | } -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/store/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return { 6 | 'categories': Category.objects.all() 7 | } 8 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-05 Multi-Product Types Database Development/Stage-1/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='store_home'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/payment/error.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Error{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order Error

8 |

Please contact our customer support team

9 | Dashboard 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/payment/orderplaced.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Order Placed{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order has been placed

8 |

Check your email for confirmation

9 | See orders 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-05 Multi-Product Types Database Development/Stage-1/templates/payment/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'payment/css/payment.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/_documentation/commands.txt: -------------------------------------------------------------------------------- 1 | py manage.py makemigrations --check 2 | 3 | 4 | # Migrations 5 | python manage.py showmigrations -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/_documentation/packages.txt: -------------------------------------------------------------------------------- 1 | Package List 2 | #### 3 | 4 | django 5 | black 6 | isort 7 | django-mptt 8 | pillow 9 | stripe 10 | coverage 11 | six -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/_documentation/stripe.txt: -------------------------------------------------------------------------------- 1 | No auth: 4242424242424242 2 | Auth: 4000002500003155 3 | Error: 4000000000009995 -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/account/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Customer 4 | 5 | admin.site.register(Customer) 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/account/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/basket/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/core/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/core/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/core/db.sqlite3 -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/core/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/core/settings/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/db.sqlite3 -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/media/images/default.png -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/media/images/default_7j3pLDD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/media/images/default_7j3pLDD.png -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/media/images/default_AN2mWQr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/media/images/default_AN2mWQr.png -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/media/images/img1_DCytNvp_NlI9SCz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/media/images/img1_DCytNvp_NlI9SCz.png -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/orders/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/orders/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrdersConfig(AppConfig): 5 | name = 'orders' 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/orders/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/payment/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/payment/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | name = 'payment' 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/payment/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/payment/migrations/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/payment/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/payment/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/payment/tests.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'payment' 6 | 7 | urlpatterns = [ 8 | path('', views.BasketView, name='basket'), 9 | path('orderplaced/', views.order_placed, name='order_placed'), 10 | path('error/', views.Error.as_view(), name='error'), 11 | path('webhook/', views.stripe_webhook), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/static/account/css/account.css: -------------------------------------------------------------------------------- 1 | .account-form input { 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .account-form input:focus { 7 | border-color: #1497ff; 8 | box-shadow: none; 9 | } -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/static/basket/css/basket.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/static/basket/css/basket.css -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/static/logo.png -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/static/store/css/store.css: -------------------------------------------------------------------------------- 1 | .store-select-dropdown{ 2 | width:50px; 3 | height:40px; 4 | } -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/store/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return {"categories": Category.objects.filter(level=0)} 6 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-06 Managing Multiple Addresses - CRUD UUID/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='store_home'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/payment/error.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Error{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order Error

8 |

Please contact our customer support team

9 | Dashboard 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/payment/orderplaced.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Order Placed{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order has been placed

8 |

Check your email for confirmation

9 | See orders 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-06 Managing Multiple Addresses - CRUD UUID/templates/payment/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'payment/css/payment.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-07 Wish List/_documentation/commands.txt: -------------------------------------------------------------------------------- 1 | py manage.py makemigrations --check 2 | 3 | 4 | # Migrations 5 | python manage.py showmigrations -------------------------------------------------------------------------------- /Part-07 Wish List/_documentation/packages.txt: -------------------------------------------------------------------------------- 1 | Package List 2 | #### 3 | 4 | django 5 | black 6 | isort 7 | django-mptt 8 | pillow 9 | stripe 10 | coverage 11 | six -------------------------------------------------------------------------------- /Part-07 Wish List/_documentation/stripe.txt: -------------------------------------------------------------------------------- 1 | No auth: 4242424242424242 2 | Auth: 4000002500003155 3 | Error: 4000000000009995 -------------------------------------------------------------------------------- /Part-07 Wish List/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/account/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Customer 4 | 5 | admin.site.register(Customer) 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/account/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-07 Wish List/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-07 Wish List/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/basket/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-07 Wish List/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/core/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-07 Wish List/core/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/core/db.sqlite3 -------------------------------------------------------------------------------- /Part-07 Wish List/core/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/core/settings/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-07 Wish List/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/db.sqlite3 -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/default.png -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/default_7j3pLDD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/default_7j3pLDD.png -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/default_AN2mWQr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/default_AN2mWQr.png -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/default_MRh0T2M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/default_MRh0T2M.png -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/default_Vi1FAPr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/default_Vi1FAPr.png -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/img1_DCytNvp_NlI9SCz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/img1_DCytNvp_NlI9SCz.png -------------------------------------------------------------------------------- /Part-07 Wish List/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-07 Wish List/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/orders/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-07 Wish List/orders/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrdersConfig(AppConfig): 5 | name = 'orders' 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/orders/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-07 Wish List/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-07 Wish List/payment/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/payment/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/payment/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /Part-07 Wish List/payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | name = 'payment' 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/payment/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/payment/migrations/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/payment/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /Part-07 Wish List/payment/tests.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/payment/tests.py -------------------------------------------------------------------------------- /Part-07 Wish List/payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'payment' 6 | 7 | urlpatterns = [ 8 | path('', views.BasketView, name='basket'), 9 | path('orderplaced/', views.order_placed, name='order_placed'), 10 | path('error/', views.Error.as_view(), name='error'), 11 | path('webhook/', views.stripe_webhook), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-07 Wish List/static/account/css/account.css: -------------------------------------------------------------------------------- 1 | .account-form input { 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .account-form input:focus { 7 | border-color: #1497ff; 8 | box-shadow: none; 9 | } -------------------------------------------------------------------------------- /Part-07 Wish List/static/basket/css/basket.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/static/basket/css/basket.css -------------------------------------------------------------------------------- /Part-07 Wish List/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/static/logo.png -------------------------------------------------------------------------------- /Part-07 Wish List/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-07 Wish List/static/store/css/store.css: -------------------------------------------------------------------------------- 1 | .store-select-dropdown{ 2 | width:50px; 3 | height:40px; 4 | } -------------------------------------------------------------------------------- /Part-07 Wish List/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/store/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return {"categories": Category.objects.filter(level=0)} 6 | -------------------------------------------------------------------------------- /Part-07 Wish List/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-07 Wish List/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-07 Wish List/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='store_home'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-07 Wish List/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-07 Wish List/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-07 Wish List/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-07 Wish List/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-07 Wish List/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-07 Wish List/templates/payment/error.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Error{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order Error

8 |

Please contact our customer support team

9 | Dashboard 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-07 Wish List/templates/payment/orderplaced.html: -------------------------------------------------------------------------------- 1 | {% extends "./sub_base.html" %} 2 | {% block title %}Order Placed{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Order has been placed

8 |

Check your email for confirmation

9 | See orders 10 |
11 |
12 | 13 | {% endblock %} -------------------------------------------------------------------------------- /Part-07 Wish List/templates/payment/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'payment/css/payment.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/README.md: -------------------------------------------------------------------------------- 1 | # YT_Django_Project_Ecommerce 2 | 3 | ## Instructions 4 | 5 | 1. Download 6 | 2. Extract in a folder 7 | 3. Open with visual studio code 8 | 9 | Commands: 10 | 11 | py -m venv venv 12 | venv\Scripts\activate 13 | pip install -r requirements.txt 14 | py manage.py runserver 15 | 16 | # Admin login 17 | 1. http://127.0.0.1:8000/admin 18 | 2. a@a.com and password admin -------------------------------------------------------------------------------- /Part-08 PayPal Integration/_documentation/commands.txt: -------------------------------------------------------------------------------- 1 | py manage.py makemigrations --check 2 | 3 | 4 | # Migrations 5 | python manage.py showmigrations 6 | 7 | # PayPal 8 | pip install paypal-checkout-serversdk 9 | 10 | # Session 11 | from django.contrib.sessions.models import Session 12 | s = Session.objects.get(pk='ye8evivr1r9rbdgj8tkkbtqr33t7fr56') 13 | s.get_decoded() -------------------------------------------------------------------------------- /Part-08 PayPal Integration/_documentation/packages.txt: -------------------------------------------------------------------------------- 1 | Package List 2 | #### 3 | 4 | django 5 | black 6 | isort 7 | django-mptt 8 | pillow 9 | stripe 10 | coverage 11 | six -------------------------------------------------------------------------------- /Part-08 PayPal Integration/_documentation/stripe.txt: -------------------------------------------------------------------------------- 1 | No auth: 4242424242424242 2 | Auth: 4000002500003155 3 | Error: 4000000000009995 -------------------------------------------------------------------------------- /Part-08 PayPal Integration/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/account/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Customer 4 | 5 | admin.site.register(Customer) 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/account/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountConfig(AppConfig): 5 | name = 'account' 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/account/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-08 PayPal Integration/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/basket/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/basket/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class BasketConfig(AppConfig): 5 | name = 'basket' 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/basket/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/basket/tests/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/checkout/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/checkout/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/checkout/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import DeliveryOptions 4 | 5 | admin.site.register(DeliveryOptions) 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/checkout/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CheckoutConfig(AppConfig): 5 | name = 'checkout' 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/checkout/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/checkout/migrations/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/checkout/paypal.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from paypalcheckoutsdk.core import PayPalHttpClient, SandboxEnvironment 4 | 5 | 6 | class PayPalClient: 7 | def __init__(self): 8 | self.client_id = "" 9 | self.client_secret = "" 10 | self.environment = SandboxEnvironment(client_id=self.client_id, client_secret=self.client_secret) 11 | self.client = PayPalHttpClient(self.environment) 12 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/checkout/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/core/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/core/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/core/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for core project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/core/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/core/db.sqlite3 -------------------------------------------------------------------------------- /Part-08 PayPal Integration/core/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/core/settings/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/core/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for core project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/db.sqlite3 -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/default.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/default_7j3pLDD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/default_7j3pLDD.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/default_AN2mWQr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/default_AN2mWQr.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/default_MRh0T2M.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/default_MRh0T2M.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/default_Vi1FAPr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/default_Vi1FAPr.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/img1_DCytNvp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/img1_DCytNvp.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/img1_DCytNvp_NlI9SCz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/img1_DCytNvp_NlI9SCz.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/media/images/img2_SUlRxwK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/media/images/img2_SUlRxwK.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/orders/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-08 PayPal Integration/orders/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrdersConfig(AppConfig): 5 | name = 'orders' 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/orders/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/static/account/css/account.css: -------------------------------------------------------------------------------- 1 | .account-form input { 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .account-form input:focus { 7 | border-color: #1497ff; 8 | box-shadow: none; 9 | } -------------------------------------------------------------------------------- /Part-08 PayPal Integration/static/basket/css/basket.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/static/basket/css/basket.css -------------------------------------------------------------------------------- /Part-08 PayPal Integration/static/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/static/logo.png -------------------------------------------------------------------------------- /Part-08 PayPal Integration/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-08 PayPal Integration/static/store/css/store.css: -------------------------------------------------------------------------------- 1 | .store-select-dropdown{ 2 | width:50px; 3 | height:40px; 4 | } -------------------------------------------------------------------------------- /Part-08 PayPal Integration/store/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/store/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/store/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class StoreConfig(AppConfig): 5 | name = 'store' 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/store/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return {"categories": Category.objects.filter(level=0)} 6 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/store/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/store/migrations/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/store/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-08 PayPal Integration/store/tests/__init__.py -------------------------------------------------------------------------------- /Part-08 PayPal Integration/store/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'store' 6 | 7 | urlpatterns = [ 8 | path('', views.product_all, name='store_home'), 9 | path('', views.product_detail, name='product_detail'), 10 | path('shop//', views.category_list, name='category_list'), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-08 PayPal Integration/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-08 PayPal Integration/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-08 PayPal Integration/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-08 PayPal Integration/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-08 PayPal Integration/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | *venv/* 4 | conftest.py 5 | *tests* 6 | *settings.py* 7 | 8 | [report] 9 | omit = 10 | *venv/* 11 | conftest.py 12 | *tests* 13 | *__init__.py* 14 | *settings.py* -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn ecommerce.wsgi -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/conftest.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | 4 | @pytest.fixture(scope="session") 5 | def test_fixture1(): 6 | print("Run once") 7 | return 1 8 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/db.sqlite3 -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/docs/commands.txt: -------------------------------------------------------------------------------- 1 | py manage.py makemigrations --check 2 | 3 | 4 | # Migrations 5 | python manage.py showmigrations 6 | 7 | # PayPal 8 | pip install paypal-checkout-serversdk 9 | 10 | # Session 11 | from django.contrib.sessions.models import Session 12 | s = Session.objects.get(pk='ye8evivr1r9rbdgj8tkkbtqr33t7fr56') 13 | s.get_decoded() -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/docs/heroku.txt: -------------------------------------------------------------------------------- 1 | https://heroku.com/deploy?template=https://github.com/veryacademy/django-ecommerce -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/docs/packages.txt: -------------------------------------------------------------------------------- 1 | Package List 2 | #### 3 | 4 | django 5 | black 6 | isort 7 | django-mptt 8 | pillow 9 | stripe 10 | coverage 11 | six -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/docs/stripe.txt: -------------------------------------------------------------------------------- 1 | No auth: 4242424242424242 2 | Auth: 4000002500003155 3 | Error: 4000000000009995 -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/account/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Customer 4 | 5 | admin.site.register(Customer) 6 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/basket/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/catalogue/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/catalogue/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/catalogue/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return {"categories": Category.objects.filter(level=0)} 6 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/catalogue/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/catalogue/migrations/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/catalogue/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = "catalogue" 6 | 7 | urlpatterns = [ 8 | path("", views.product_all, name="store_home"), 9 | path("", views.product_detail, name="product_detail"), 10 | path("shop//", views.category_list, name="category_list"), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/checkout/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/checkout/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/checkout/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import DeliveryOptions 4 | 5 | admin.site.register(DeliveryOptions) 6 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/checkout/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/checkout/migrations/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/checkout/paypal.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from paypalcheckoutsdk.core import PayPalHttpClient, SandboxEnvironment 4 | 5 | 6 | class PayPalClient: 7 | def __init__(self): 8 | self.client_id = "" 9 | self.client_secret = "" 10 | self.environment = SandboxEnvironment(client_id=self.client_id, client_secret=self.client_secret) 11 | self.client = PayPalHttpClient(self.environment) 12 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/checkout/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/orders/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/apps/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/ecommerce/wsgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from django.core.wsgi import get_wsgi_application 4 | 5 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerce.settings') 6 | 7 | application = get_wsgi_application() 8 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/media/images/default.png -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/media/images/default_I6Si6UC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/media/images/default_I6Si6UC.png -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | DJANGO_SETTINGS_MODULE = ecommerce.settings 3 | python_files = tests.py test_*.py *_tests.py 4 | 5 | filterwarnings = 6 | addopts = -p no:warnings 7 | 8 | markers = 9 | core: marks tests that are core to a set of apps -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/static/mptt/arrow-move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/static/mptt/arrow-move.png -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/static/mptt/disclosure-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/static/mptt/disclosure-down.png -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/static/mptt/disclosure-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-09 Project Refactor and Pytest Introduction/static/mptt/disclosure-right.png -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /Part-09 Project Refactor and Pytest Introduction/tests/catalogue/test_catalogue_views.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | 4 | @pytest.mark.core 5 | def test_hello_world3(test_fixture1): 6 | print("function_fixture3") 7 | assert test_fixture1 == 1 8 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = 3 | *venv/* 4 | conftest.py 5 | *tests* 6 | *__init__.py* 7 | *settings.py* 8 | *AppData* 9 | 10 | [report] 11 | omit = 12 | *venv/* 13 | conftest.py 14 | *tests* 15 | *__init__.py* 16 | *settings.py* 17 | *AppData* -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn ecommerce.wsgi -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/db.sqlite3 -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/account/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/account/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/account/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Customer 4 | 5 | admin.site.register(Customer) 6 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/account/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/account/migrations/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/account/tokens.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.tokens import PasswordResetTokenGenerator 2 | from six import text_type 3 | 4 | 5 | class AccountActivationTokenGenerator(PasswordResetTokenGenerator): 6 | def _make_hash_value(self, user, timestamp): 7 | return ( 8 | text_type(user.pk) + text_type(timestamp) + 9 | text_type(user.is_active) 10 | ) 11 | 12 | 13 | account_activation_token = AccountActivationTokenGenerator() -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/basket/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/basket/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/basket/context_processors.py: -------------------------------------------------------------------------------- 1 | from .basket import Basket 2 | 3 | 4 | def basket(request): 5 | return {'basket': Basket(request)} 6 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/basket/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/basket/migrations/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/basket/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'basket' 6 | 7 | urlpatterns = [ 8 | path('', views.basket_summary, name='basket_summary'), 9 | path('add/', views.basket_add, name='basket_add'), 10 | path('delete/', views.basket_delete, name='basket_delete'), 11 | path('update/', views.basket_update, name='basket_update'), 12 | ] 13 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/catalogue/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/catalogue/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/catalogue/context_processors.py: -------------------------------------------------------------------------------- 1 | from .models import Category 2 | 3 | 4 | def categories(request): 5 | return {"categories": Category.objects.filter(level=0)} 6 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/catalogue/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/catalogue/migrations/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/catalogue/tests/test_catalogue_views.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from django.urls import reverse 3 | 4 | 5 | @pytest.mark.django_db 6 | def test_root_url(client): 7 | url = reverse("catalogue:store_home") 8 | response = client.get(url) 9 | assert response.status_code == 200 10 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/catalogue/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = "catalogue" 6 | 7 | urlpatterns = [ 8 | path("", views.product_all, name="store_home"), 9 | path("", views.product_detail, name="product_detail"), 10 | path("shop//", views.category_list, name="category_list"), 11 | ] 12 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/checkout/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/checkout/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/checkout/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import DeliveryOptions 4 | 5 | admin.site.register(DeliveryOptions) 6 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/checkout/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/checkout/migrations/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/checkout/paypal.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from paypalcheckoutsdk.core import PayPalHttpClient, SandboxEnvironment 4 | 5 | 6 | class PayPalClient: 7 | def __init__(self): 8 | self.client_id = "" 9 | self.client_secret = "" 10 | self.environment = SandboxEnvironment(client_id=self.client_id, client_secret=self.client_secret) 11 | self.client = PayPalHttpClient(self.environment) 12 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/checkout/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/orders/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/orders/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/orders/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order, OrderItem 4 | 5 | admin.site.register(Order) 6 | admin.site.register(OrderItem) -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/orders/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/ecommerce/apps/orders/migrations/__init__.py -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/apps/orders/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from . import views 4 | 5 | app_name = 'orders' 6 | 7 | urlpatterns = [ 8 | path('add/', views.add, name='add'), 9 | ] 10 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for ecommerce project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerce.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/ecommerce/wsgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from django.core.wsgi import get_wsgi_application 4 | 5 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ecommerce.settings') 6 | 7 | application = get_wsgi_application() 8 | -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/media/images/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/media/images/default.png -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/media/images/default_I6Si6UC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/media/images/default_I6Si6UC.png -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/pytest.ini: -------------------------------------------------------------------------------- 1 | [pytest] 2 | DJANGO_SETTINGS_MODULE = ecommerce.settings 3 | python_files = tests.py test_*.py *_tests.py 4 | addopts = -p no:warnings -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/static/mptt/arrow-move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/static/mptt/arrow-move.png -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/static/mptt/disclosure-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/static/mptt/disclosure-down.png -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/static/mptt/disclosure-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/veryacademy/django-ecommerce-project/85d194eab621b206068ab1226f2359b538aa4c46/Part-10 Pytest Testing 1/static/mptt/disclosure-right.png -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/static/payment/css/payment.css: -------------------------------------------------------------------------------- 1 | .account-form input{ 2 | border: 2px solid #ccc; 3 | height: calc(2em + .75rem + 2px); 4 | } 5 | 6 | .form-control { 7 | border: 2px solid #ccc; 8 | } 9 | 10 | .account-form input:focus { 11 | border-color: #1497ff; 12 | box-shadow: inset 0 0px 0px rgba(0, 0, 0, 0.075), 0 0 0px rgba(255, 0, 0, 0.6); 13 | } -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/templates/account/dashboard/delete_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Delete Account Confirmation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Delete Account

8 |

You have now deleted your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/templates/account/registration/account_activation_email.html: -------------------------------------------------------------------------------- 1 | {% autoescape off %} 2 | Hi {{ user.user_name }}, 3 | 4 | Your account has successfully created. Please click below link to activate your account 5 | 6 | http://{{ domain }}{% url 'account:activate' uidb64=uid token=token %} 7 | {% endautoescape %} -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/templates/account/registration/activation_invalid.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Invalide Activation{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Error

8 |

Please contact our support team

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/templates/account/registration/register_email_confirm.html: -------------------------------------------------------------------------------- 1 | {% extends "../sub_base.html" %} 2 | {% block title %}Account Email Sent{% endblock %} 3 | {% block content %} 4 | 5 |
6 |
7 |

Account email sent

8 |

Check your email to activate your account

9 |
10 |
11 | 12 | {% endblock %} -------------------------------------------------------------------------------- /Part-10 Pytest Testing 1/templates/account/sub_base.html: -------------------------------------------------------------------------------- 1 | {% extends "../base.html" %} 2 | {% load static %} 3 | {% block stylesheet %}{% static 'account/css/account.css' %}{% endblock %} 4 | 5 | {% block content %} 6 |
7 | 12 |
13 | {% endblock %} 14 | --------------------------------------------------------------------------------