Re: How to Filter Children Model In Django RestFramework

2022-09-11 Thread Abhineet Baranwal
Just use that foreign key field name with double underscore filter field name. For example - you have a parent model ClassRoom having it's children model Student which is referred as student fk in ClassRoom. So if you want to filter student name from ClassRoom api then you can just write : filterse

Django-filter customization for rest api

2019-09-05 Thread Abhineet Baranwal
When we pass fields in Meta class for custom filter then django-filter adds 'and' in-between the fields .how to add 'or' operator in between the fields.please explain with an example for rest api. -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: How can i start with learning django

2019-04-05 Thread Abhineet Baranwal
you can go through django documentation here On Fri, Apr 5, 2019 at 4:52 PM Harsh Jain wrote: > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving em

Re: django Query filter

2019-04-04 Thread Abhineet Baranwal
erminal it will show you how > many value you have in dictionary > > > On Wed, Apr 3, 2019 at 5:03 PM Abhineet Baranwal < > suabhineetbaran...@gmail.com> wrote: > >> >> *this is my views file which creates an error like >> django.utils.datastructures.Mul

Re: google chrome extension

2019-04-04 Thread Abhineet Baranwal
icate with a server side > application, this part can be whatever you want, providing a REST API for > your extension. > > Hope it helps ! > > Regards, > > Alex > > > On Wednesday, April 3, 2019 at 8:33:20 AM UTC-3, Abhineet Baranwal wrote: >> >>

Re: django Query filter

2019-04-04 Thread Abhineet Baranwal
Thanks..I'll search for that but i think its not related to the query, its related to two search i have used in one post request On Wed, Apr 3, 2019 at 5:57 PM Guru Murthy wrote: > Hi abhineet baranwal, > You have to use q(id__in=search) instead q(id__icontains=search) ..search >

Re: django Query filter

2019-04-04 Thread Abhineet Baranwal
gt; mi = create_store.objects.filter(Q(id__icontains=search)) > if mi: > return render(request,'viewstr.html',{'vi':mi,'brn':brn}) > > return > render(request,'viewstr.html',{'viewstr':vi

Re: django Query filter

2019-04-03 Thread Abhineet Baranwal
d, 3 Apr, 2019, 5:02 PM Abhineet Baranwal, < > suabhineetbaran...@gmail.com> wrote: > >> >> *this is my views file which creates an error like >> django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can

google chrome extension

2019-04-03 Thread Abhineet Baranwal
*Can i create a chrome extension in django or flask ? I have already created an extension in javascript but i didn't know how to start creating it in django . Can anyone tell me how to do it with some example?* -- You received this message because you are subscribed to the Google Groups "Djan

django Query filter

2019-04-03 Thread Abhineet Baranwal
*this is my views file which creates an error like django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone tell me where i go wrong?* *def viewstr(request):* *views = create_store.objects.all()brn = Prod_Brand.objects.all()mi = ''if requ

django

2019-04-03 Thread Abhineet Baranwal
*The below code works fine on one search but for another it gives an error like django.utils.datastructures.MultiValueDictKeyError: 'search1' . Can anyone tell me where i go wrong?* *def viewstr(request):* *views = create_store.objects.all()brn = Prod_Brand.objec