Re: Django Queryset for Multiple set

2019-03-13 Thread Krishnasagar Subhedarpage
You could do using django ORM query expressions. Refer below link: https://docs.djangoproject.com/en/2.1/ref/models/expressions/ Regards, Krishnasagar Subhedarpage On Wed, 13 Mar 2019 at 17:14, Vaibhav Mishra wrote: > Hi All, > > I am trying to achieve below , > > variable

Re: Django ORM queryset substring on a column

2019-01-04 Thread Krishnasagar Subhedarpage
You can try with __contains queryset. Regards, Krishnasagar Subhedarpage On Fri, 4 Jan 2019 at 15:34, BIJAL MANIAR wrote: > > Hello, > > Can anyone please help with this. > > Thanks, > Bijal > > On Thursday, January 3, 2019 at 6:47:43 PM UTC+5:30, BIJAL M

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-15 Thread Krishnasagar Subhedarpage
Okay. Please check error logs of mysql. Its default path: /var/log/mysql/error.log Please look into any error signals for the same table into it. This could give clue for root cause of issue. Regards, Krishnasagar Subhedarpage On Thu, 15 Nov 2018 at 14:42, prateek gupta wrote: > Hi, >

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread Krishnasagar Subhedarpage
Hi Prateek, Did you check disk info of server instance? What's disk consumption? Regards, Krishnasagar Subhedarpage On Thu, 15 Nov 2018 at 12:09, prateek gupta wrote: > It is strange again, now I am getting the same error. > Till morning it was working fine but now it is again showin

Re: How to edit model.py and serializer so I can recieve contact":{"name":"asdf","email":"m...@email.com","phone":"1111111111"}}

2018-10-31 Thread Krishnasagar Subhedarpage
Hi Tim, IMHO, you can change angular's request body as per model defined in app so that, serializer can validate and save into table. Regards, Krishna On Wed, 31 Oct 2018 at 15:11, Tim Vogt wrote: > Hi group ;-) > > I have a little challenge. > > We have a frontend angular api. Wich sinds

Re: DRF JWT Token with Mobile

2017-12-28 Thread Krishnasagar Subhedarpage
Can you elaborate question? Please add some background for it. --- Krishnasagar On Thu, Dec 28, 2017 at 1:40 PM, Mukul Mantosh wrote: > How to get JWT Token in DRF using only mobile number as the parameter > instead of email and password.. > > -- > You received this

Re: How can I get this result?

2015-02-15 Thread Krishnasagar Subhedarpage
Hi, consider two objects, ls_dic=[{'key1':a , 'key2': b},{'key1':c , 'key2': d}] num=sum([len(x.values()) for x in ls_dic]) print '%s' % ','.join(sorted(sum([x.values() for x in ls_dic],[])))[:-num] print '%s' % ','.join(sorted(sum([x.values() for x in ls_dic],[])))[num:] This is will help a