Environment: Request Method: GET Request URL: http://localhost:8000/vendorDashboard/ Django Version: 3.2.5 Python Version: 3.9.0 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'accounts', 'vendor', 'menu', 'marketplace', 'django.contrib.gis', 'customers', 'orders'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] Traceback (most recent call last): File "/Users/brendon/Desktop/Foodweb/env/food/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/brendon/Desktop/Foodweb/env/food/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response response = wrapped_callback(request, callback_args, **callback_kwargs) File "/Users/brendon/Desktop/Foodweb/env/food/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view return view_func(request,args, kwargs) File "/Users/brendon/Desktop/Foodweb/env/food/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view return view_func(request, *args, kwargs) File "/Users/brendon/Desktop/Foodweb/food/accounts/views.py", line 201, in vendorDashboard current_month_revenue += i.get_total_by_vendor()['grand_total'] File "/Users/brendon/Desktop/Foodweb/food/orders/models.py", line 66, in get_total_by_vendor vendor = Vendor.objects.get(user=request_object.user)
@arvobrendon Can you please attach a screenshot of the error? Also, provide your updated Github repo link so we can look at your code.
Here you go
The Vender has a issue
@arvobrendon The issue you're encountering seems to be related to the request_object. In your order/models.py or request_object.py, there might be a mistake causing the request_object to return a string instead of a request instance. If you can provide us with access to your GitHub repository, we’d be happy to assist you further.
I install github project from Rathan Kumar it's also the same problem I didn't put this project to github can I send you by email instead
@arvobrendon Please send your project on this mail address: mohaiminul.islam@appzoneit.com
Do I need re write the whole code again ?
@arvobrendon can you share your registerVendor function code with me here so I can review it? The error you're encountering seems to be due to an issue with the registerVendor function, where some fields in your vendor form are not getting validated. I believe there might be a mistake that's causing this.