Re: RelatedObjectDoesNotExist: User has no vendor

2021-06-09 Thread GWISU MANYANDA
because of `vendor = request.user.vendor` > you have attached user to vendor so you can access user from vendor by > doing > `user = vendor.created_by` but you can not access vendor from user > > On Wed, 9 Jun 2021 at 12:43, GWISU MANYANDA > wrote: > >> Hi Every one! I &

RelatedObjectDoesNotExist: User has no vendor

2021-06-09 Thread GWISU MANYANDA
Hi Every one! I 'm looking for help. I'm working with a multi vendor website using django. But there is an issue that I have vendor object vendor but it says User has no vendor. Why is this happening and how may I solve this? *MY model* from django.contrib.auth.models import Userfrom django.db

Re: List Products of one Category

2021-05-07 Thread GWISU MANYANDA
> [image: Linkedin] <https://in.linkedin.com/in/shailesh-yadav-b7ab89110> > > > > On Fri, May 7, 2021 at 7:13 PM Shailesh Yadav > wrote: > >> What Error are you getting? >> >> Thanks & Regards >> Shailesh Yadav >> +91-9920886044 >

List Products of one Category

2021-05-07 Thread GWISU MANYANDA
Hi Every one! I 'm looking for help. I'm working with Ecommerce I have a few categories and I would like to list the products of one Category not List of products of each Categories *My model* *class Category*(models.Model): name = models.CharField(max_length=200) def __str__(self): return self.