├── cart ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0002_remove_cart_invoice.py │ └── 0001_initial.py ├── templatetags │ ├── __init__.py │ └── cart_tags.py ├── tests.py ├── apps.py ├── admin.py ├── urls.py ├── models.py └── views.py ├── item ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0002_alter_item_upc.py │ └── 0001_initial.py ├── templatetags │ ├── __init__.py │ └── category_tags.py ├── tests.py ├── apps.py ├── admin.py ├── forms.py ├── templates │ └── item │ │ ├── delete.html │ │ ├── detail.html │ │ ├── service_provider_detail.html │ │ ├── create_form.html │ │ ├── update_form.html │ │ └── service_provider_item_list.html ├── urls.py ├── models.py └── views.py ├── order ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0006_merge_0003_alter_order_status_0005_alter_order_status.py │ ├── 0003_alter_order_status.py │ ├── 0004_alter_order_status.py │ ├── 0005_alter_order_status.py │ ├── 0003_auto_20210913_1956.py │ ├── 0001_initial.py │ └── 0002_auto_20210913_1544.py ├── tests.py ├── apps.py ├── admin.py ├── templates │ └── order │ │ ├── service │ │ ├── order_update.html │ │ ├── order_list.html │ │ ├── order_filter_list.html │ │ └── order_detail.html │ │ └── customer │ │ ├── order_detail.html │ │ └── order_list.html ├── filters.py ├── urls.py ├── models.py └── views.py ├── yummy ├── __init__.py ├── asgi.py ├── wsgi.py ├── urls.py └── settings.py ├── accounts ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0002_auto_20210831_0046.py │ └── 0001_initial.py ├── templatetags │ ├── __init__.py │ └── accounts_tags.py ├── tests.py ├── apps.py ├── templates │ └── accounts │ │ ├── service_provider │ │ ├── login.html │ │ ├── registration.html │ │ ├── change_password.html │ │ └── profile.html │ │ ├── customer │ │ ├── password_set.html │ │ ├── change_password.html │ │ ├── login_register.html │ │ ├── profile_update.html │ │ ├── password_confirm.html │ │ ├── phone_number_confirm.html │ │ └── profile.html │ │ └── base.html ├── admin.py ├── authenticate.py ├── utils.py ├── urls.py ├── models.py └── forms.py ├── address ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0006_rename_user_customeraddress_customer_user.py │ ├── 0004_auto_20210830_1327.py │ ├── 0005_auto_20210830_1329.py │ ├── 0002_auto_20210830_1305.py │ ├── 0003_auto_20210830_1305.py │ └── 0001_initial.py ├── tests.py ├── apps.py ├── templates │ └── address │ │ ├── delete_form.html │ │ ├── customer_address_list.html │ │ └── create_update_form.html ├── urls.py ├── forms.py ├── admin.py ├── models.py └── views.py ├── gateway ├── __init__.py ├── utils │ ├── __init__.py │ └── zarrinpal.py ├── migrations │ ├── __init__.py │ ├── 0002_auto_20210912_2211.py │ └── 0001_initial.py ├── tests.py ├── views.py ├── apps.py ├── admin.py └── models.py ├── library ├── __init__.py ├── models.py └── utils.py ├── payment ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0002_alter_invoice_address.py │ ├── 0003_auto_20210912_1657.py │ └── 0001_initial.py ├── tests.py ├── apps.py ├── urls.py ├── templates │ └── payment │ │ ├── checkout.html │ │ └── verify.html ├── forms.py ├── admin.py ├── views.py └── models.py ├── service ├── __init__.py ├── migrations │ ├── __init__.py │ ├── 0008_service_available.py │ ├── 0002_alter_service_address.py │ ├── 0003_alter_service_address.py │ ├── 0004_alter_service_address.py │ ├── 0007_auto_20210902_2056.py │ ├── 0006_auto_20210902_1943.py │ ├── 0005_auto_20210902_1522.py │ └── 0001_initial.py ├── templatetags │ ├── __init__.py │ └── service_delivary_area.py ├── tests.py ├── apps.py ├── utils.py ├── templates │ ├── service │ │ ├── service_provider │ │ │ ├── create_update_form.html │ │ │ ├── delete_form.html │ │ │ ├── list.html │ │ │ └── detail.html │ │ └── list.html │ ├── service_category │ │ ├── delete_form.html │ │ ├── create_update_form.html │ │ └── detail.html │ ├── delivery_area │ │ ├── delete_form.html │ │ └── create_update_form.html │ └── service_available_time │ │ ├── delete_form.html │ │ └── create_update_form.html ├── filters.py ├── admin.py ├── forms.py ├── urls.py └── models.py ├── requirements.txt ├── manage.py ├── LICENSE ├── templates ├── base.html └── inc │ ├── customer_navbar.html │ ├── admin_navbar.html │ └── service_provider_navbar.html ├── .gitignore └── README.md /cart/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /item/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /order/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yummy/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /accounts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /address/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gateway/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /library/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /payment/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /service/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cart/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gateway/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /item/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /order/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /accounts/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /accounts/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /address/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cart/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gateway/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /item/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /payment/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /service/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /service/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /address/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /cart/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /gateway/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /item/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /order/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /payment/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /service/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /accounts/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /gateway/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /cart/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CartConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'cart' 7 | -------------------------------------------------------------------------------- /item/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ItemConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'item' 7 | -------------------------------------------------------------------------------- /order/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class OrderConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'order' 7 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | asgiref==3.4.1 2 | Django==3.2.5 3 | django-filter==2.4.0 4 | Pillow==8.3.2 5 | psycopg2-binary==2.9.1 6 | pytz==2021.1 7 | sqlparse==0.4.2 8 | suds-jurko==0.6 9 | -------------------------------------------------------------------------------- /accounts/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AccountsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'accounts' 7 | -------------------------------------------------------------------------------- /address/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class AddressConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'address' 7 | -------------------------------------------------------------------------------- /gateway/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class GatewayConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'gateway' 7 | -------------------------------------------------------------------------------- /payment/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class PaymentConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'payment' 7 | -------------------------------------------------------------------------------- /service/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class ServiceConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'service' 7 | -------------------------------------------------------------------------------- /item/templatetags/category_tags.py: -------------------------------------------------------------------------------- 1 | from django import template 2 | 3 | register = template.Library() 4 | 5 | 6 | @register.simple_tag 7 | def filter_category(queryset, category): 8 | return queryset.filter(category=category) 9 | -------------------------------------------------------------------------------- /accounts/templates/accounts/service_provider/login.html: -------------------------------------------------------------------------------- 1 | {% extends 'accounts/base.html' %} 2 | {% block content %} 3 |
8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /payment/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from payment.views import CheckoutView, PaymentVerify 4 | 5 | app_name = 'payment' 6 | 7 | urlpatterns = [ 8 | path('checkout/', CheckoutView.as_view(), name='checkout'), 9 | path('verify/', PaymentVerify.as_view(), name='verify'), 10 | ] 11 | -------------------------------------------------------------------------------- /accounts/templates/accounts/service_provider/registration.html: -------------------------------------------------------------------------------- 1 | {% extends 'accounts/base.html' %} 2 | {% block content %} 3 | 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /gateway/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from gateway.models import Gateway 4 | 5 | 6 | @admin.register(Gateway) 7 | class GatewayAdmin(admin.ModelAdmin): 8 | list_display = ('title', 'gateway_code', 'is_enable') 9 | list_filter = ('is_enable',) 10 | search_fields = ('title',) 11 | 12 | -------------------------------------------------------------------------------- /library/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | 4 | class BaseModel(models.Model): 5 | created_time = models.DateTimeField(verbose_name='created time', auto_now_add=True) 6 | modified_time = models.DateTimeField(verbose_name='modified time', auto_now=True) 7 | 8 | class Meta: 9 | abstract = True 10 | -------------------------------------------------------------------------------- /order/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from .models import Order 4 | 5 | 6 | @admin.register(Order) 7 | class OrderAdmin(admin.ModelAdmin): 8 | list_display = ('customer', 'status') 9 | list_filter = ('status',) 10 | list_editable = ('status',) 11 | search_fields = ('customer__phone_number',) 12 | -------------------------------------------------------------------------------- /payment/templates/payment/checkout.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | {% block content %} 3 | 9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /accounts/templates/accounts/service_provider/change_password.html: -------------------------------------------------------------------------------- 1 | {% extends 'accounts/base.html' %} 2 | {% block content %} 3 |Your username : {{ request.user.username }}
5 |Your email : {{ request.user.email }}
6 |Your phone number : {{ request.user.phone_number }}
7 |Category : {{ item.category.name }}
6 | {% if item.image %} 7 |Description : {{ item.description }}
11 |Price : {{ item.price }}
12 | Add to cartStock : {{ item.stock }}
10 |Category : {{ item.category.name }}
11 |Description : {{ item.description }}
12 |Price : {{ item.price }}
Category name : {{ category.name }}
6 |Your category yet not has item!Create Item
22 | {% endif %} 23 |Phone number : {{ request.user.phone_number }}
6 |First name : {{ request.user.first_name }}
7 |Last name : {{ request.user.last_name }}
8 |id : {{ order.id }}
12 |status : {{ order.get_status_display }}
13 |date time : {{ order.created_time }}
14 |total price : {{ order.invoice.price }}$
15 |status : {{ order.get_status_display }}
8 |order date time : {{ order.created_time }}
9 |address : {{ order.invoice.address.state.name }} - {{ order.invoice.address.city.name }} 10 | - {{ order.invoice.address.area.name }} - {{ order.invoice.address.street }} 11 | - {{ order.invoice.address.alley }} - {{ order.invoice.address.floor }} 12 | - {{ order.invoice.address.plaque }} 13 |
14 || Item | 19 |Quantity | 20 |Price | 21 |
|---|---|---|
| {{ line.item }} | 28 |{{ line.quantity }} | 29 |$ {{ line.price }} | 30 |
id : {{ order.id }}
19 |status : {{ order.get_status_display }}
20 |date time : {{ order.created_time }}
21 |total price : {{ order.invoice.price }}$
22 |Status : {{ order.get_status_display }}
13 |Status : {{ order.get_status_display }}
32 |id : {{ order.id }}
10 |status : {{ order.get_status_display }}
11 |date time : {{ order.created_time }}
12 |total price : {{ order.invoice.price }}$
13 |22 | Item 23 |
24 |27 | Quantity 28 |
29 |36 | {{ cartline.item }} 37 |
38 |41 | {{ cartline.quantity }} 42 |
43 |{{ service.address | truncatechars:30 }}
44 | {% delivery_area_string service as areas %} 45 |{{ areas | truncatechars:15 }}
46 |{{ service.areas | truncatechars:20 }}
47 | 48 |Service name : {{ service.name }}
6 |Service minimum purchase : {{ service.minimum_purchase }}
7 |Service minimum purchase : {{ service.get_service_type_display }}
8 | {% if service.available %} 9 |Service available : Yes
10 | {% else %} 11 |Service available : No
12 | {% endif %} 13 | {% if service.logo %} 14 |Service Logo Image :
Service Logo Image : Not Yet Uploaded
17 | {% endif %} 18 | {% if service.banner %} 19 |Service Banner Image :
Service Logo Image : Not Yet Uploaded
22 | {% endif %} 23 | 24 |state : {{ service.address.state.name }}
30 |city : {{ service.address.city.name }}
31 |area : {{ service.address.area.name }}
32 |street : {{ service.address.street }}
33 |alley : {{ service.address.alley }}
34 |floor : {{ service.address.floor }}
35 |plaque : {{ service.address.plaque }}
36 | Update Address 37 | {% else %} 38 |Your service yet not has address!Create Address
40 | {% endif %} 41 |