Re: ML-Python

2019-03-13 Thread Hafit Omar
It works thanks a lot sir, On Wed, 13 Mar 2019, 11:35 pm Utpal Mishra, wrote: > You have to use "model_selection", it will work. Quite a while ago > "cross_validation" has been replaced by" model_selection". > For reference you can go through my code: >

RE: Bug in Django 2.1 on ModelMultipleChoiceField

2019-03-13 Thread Matthew Pava
Looking at it, I would say that this is by design. You shouldn’t use an empty label on a multiple choice field. Perhaps this should be clarified in the docs. Saying that, if you really want an empty label on a multiple choice field, you could create your own class that initializes empty_label

Bug in Django 2.1 on ModelMultipleChoiceField

2019-03-13 Thread 'Odile Lambert' via Django users
Hello, I believe Bugs in Django are to be reported in this user list. Below is a report for a bug which does not seem to be already filed. In the documentation reference on the ModelMultipleChoiceField there is no restrictios mentioned on the empty_label

Re: Need to Store All Model data in RAM

2019-03-13 Thread Vaibhav Mishra
Hi Chetan, Thanks ,Ok , Now I get it :) Will try this and share my experience. On Wednesday, March 13, 2019 at 12:43:38 PM UTC-4, Chetan Ganji wrote: > > Bhai, read your original question > > *"I have a table of over 100,000 rows which I need to compare with another > list to find if the

Customizing serializer based on emplid

2019-03-13 Thread siddarthkatekar
my serializer looks like class FeeSerializer(serializers.Modelserializer): class Meta: model = Fee fields = ( 'id', 'name', 'emplid', 'emplid_check' ) I want to serialize and send 'emplid_check' in the response for few 'emplid', How to customize serializer. 1) If 'emplid' matches

I need adding records within another model

2019-03-13 Thread Jack Gonzales
Hi everyone, i have two classes in my model.py, this system is for registering the payments of an account, for instance, a client is lent 1000 dollars and that account has an ID, each loan has an ID and what i want is when the client makes the payment of his fees i can register each ammount

Re: Need to Store All Model data in RAM

2019-03-13 Thread Chetan Ganji
Bhai, read your original question *"I have a table of over 100,000 rows which I need to compare with another list to find if the entry matching a rows is in there or not "* Which another list were you talking about? so the another_list could be a pre-populated list of python or another list

Re: Need to Store All Model data in RAM

2019-03-13 Thread Vaibhav Mishra
Thanks Andreas, Will try out the list Method. On Wednesday, March 13, 2019 at 9:58:16 AM UTC-4, Andréas Kühne wrote: > > Hi, > > You can't. The way that you are working - it would always go back to the > database - because you are using the filter methods. > > You would need to create a list

Re: Need to Store All Model data in RAM

2019-03-13 Thread Vaibhav Mishra
Hi Chetan, Thanks for your help, I have a confusion , the code uses another_list as a list on line 1 ,and is being queried in the loop below , but where did it get populated ? Sorry if I sound stupid. On Wednesday, March 13, 2019 at 10:08:39 AM UTC-4, Chetan Ganji wrote: > > Hi Vaibhav, > >

Re: migrating from sqlite to mysql breaks the site

2019-03-13 Thread Anh Nguyen
Could you insert a post on admin panel ? On Wed, Mar 13, 2019 at 10:38 PM Pedram Badakhchani < pedrambadakhch...@gmail.com> wrote: > bump > > On Wednesday, 6 March 2019 10:44:56 UTC, Pedram Badakhchani wrote: >> >> specifically in the get_absolute_url method. >>> >> >> I don't understand why

Re: migrating from sqlite to mysql breaks the site

2019-03-13 Thread Pedram Badakhchani
bump On Wednesday, 6 March 2019 10:44:56 UTC, Pedram Badakhchani wrote: > > specifically in the get_absolute_url method. >> > > I don't understand why this works fine with sqlite but breaks in mysql. > > thanks for any help. > -- You received this message because you are subscribed to the

Re: ML-Python

2019-03-13 Thread Utpal Mishra
You have to use "model_selection", it will work. Quite a while ago "cross_validation" has been replaced by" model_selection". For reference you can go through my code: https://colab.research.google.com/drive/1NliqtxZVvLhZNXhNFyXQZpwG392hcvh4 Do inform, in any case. On Wed, Mar 13, 2019 at 5:14 PM

Re: Using sessions key variables as a url argument

2019-03-13 Thread GavinB841
Hi Alvaro/Ranganath, Appreciate your feedback, I understand what you are recommending but I can seem to get it working. Please see the below hopefully it will make more sense: *View sample for team:* class TeamInfo(APIView): renderer_classes = [TemplateHTMLRenderer] template_name =

Re: ML-Python

2019-03-13 Thread Hafit Omar
When I type from sklearn import cross_validation , appears red line on cross_validation what's wrong? On Wed, 13 Mar 2019, 10:10 pm Bob Gailer, wrote: > On Mar 13, 2019 7:44 AM, "Hafit Omar" wrote: > > > > Hi Everyone I'm Hafit from Libya, > > Can anyone help me in in sklearn library I want to

Re: ML-Python

2019-03-13 Thread Bob Gailer
On Mar 13, 2019 7:44 AM, "Hafit Omar" wrote: > > Hi Everyone I'm Hafit from Libya, > Can anyone help me in in sklearn library I want to import cross_validation it doesn't work Please be more specific. What is the evidence that it doesn't work? -- You received this message because you are

Re: Need to Store All Model data in RAM

2019-03-13 Thread Chetan Ganji
Hi Vaibhav, Andréas is right. You need to evaluate the queryset first as the orm queries are lazy. So the solution would be something like below example. another_list = [] getdata = data.objects.all() # this is a queryset # apply filters if you need to getdata = list(getdata) # this would be

Re: Need to Store All Model data in RAM

2019-03-13 Thread Andréas Kühne
Hi, You can't. The way that you are working - it would always go back to the database - because you are using the filter methods. You would need to create a list from the items, then do the comparison in python - which probably will be slower (but not necessarily). Regards, Andréas Den ons

Re: add Image Field in model

2019-03-13 Thread omar ahmed
i installed it thanks Amitesh but what about creating image field in model On Wednesday, March 13, 2019 at 10:58:50 AM UTC+2, Amitesh Sahay wrote: > > Hello Omar, > > You need to install "pillow" python module in order to work with image > files. > > Regards, > Amitesh Sahay > *91-750 797

Re: Django Queryset for Multiple set

2019-03-13 Thread Chetan Ganji
Hi Vaibhav, I think this would do what you want. Make sure too call the objects on the model name ( Modelname ) ;-) systems = ['windows', 'unix'] variable = Modelname.objects.filter(clientname=cname, clienttype__in=systems, errorcode='20') Regards, Chetan Ganji +91-900-483-4183

Re: Django csv file

2019-03-13 Thread Chetan Ganji
Welcme CIGI Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Wed, Mar 13, 2019 at 5:13 PM Cigi Sebastine wrote: > Thank you Chetan. > > > On Wed, Mar 13, 2019 at 3:41 AM Chetan Ganji > wrote: > >> I would suggest you use transactions for inserting those

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: Hello From Nigeria

2019-03-13 Thread Thaddeaus Iorbee
Yes please. 0814390 On Monday, March 11, 2019, Joshua Kayode wrote: > Greetings, if you are a django developer in Nigeria, would you consider > joining a WhatsApp group? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To

Re: Django csv file

2019-03-13 Thread Cigi Sebastine
Thank you Chetan. On Wed, Mar 13, 2019 at 3:41 AM Chetan Ganji wrote: > I would suggest you use transactions for inserting those many documents. > https://www.mongodb.com/transactions > > Django ORM does not support MongoDB. So, you can't use models/ORM/Class > Based Views of Django with

Need to Store All Model data in RAM

2019-03-13 Thread Vaibhav Mishra
Hi All, I have a table of over 100,000 rows which I need to compare with another list to find if the entry matching a rows is in there or not The following does not work getdata = data.objects.all() mydata= getdata.filter(mycriteria) Process information and comparision from 'mydata'

Django Queryset for Multiple set

2019-03-13 Thread Vaibhav Mishra
Hi All, I am trying to achieve below , variable = object.filter(clientname =cname , clienttype='windows' and clienttype='unix', errorcode='20') Notice that I want to filter by two or more values in second parameter.. How can we do this ? -- You received this message because you are

Ldap authentication and Token generation

2019-03-13 Thread Dimple Mathew
I am developing a django project. I want to implement SSO in it. The authentication is done by LDAP So should the apps generate tokens[with same algo and secret keys] and then send the token along with the request? How should I go about implementing this? -- You received this message because

ML-Python

2019-03-13 Thread Hafit Omar
Hi Everyone I'm Hafit from Libya, Can anyone help me in in sklearn library I want to import cross_validation it doesn't work but the other like preprocessing and svm it does, please it's urgent, Thank you in advance -- You received this message because you are subscribed to the Google Groups

Re: hi guys i have been having trouble setting up a login and registration page, can anyone please help me

2019-03-13 Thread gauravsrivastava2k17
Please post traceback so that I can know what type of error you are getting On Tuesday, March 12, 2019 at 8:26:04 PM UTC+5:30, abhishek jayalal wrote: > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: add Image Field in model

2019-03-13 Thread 'Amitesh Sahay' via Django users
Hello Omar,  You need to install "pillow" python module in order to work with image files. Regards, Amitesh Sahay91-750 797 8619 On Tuesday, 12 March, 2019, 6:51:09 pm IST, omar ahmed wrote: helloi want to add image field in my modeli typed :  image = models.ImageField()but :  

Re: Zero Downtime Field Type Changes

2019-03-13 Thread Markus Holtermann
Hey Kyle, that sounds about right. It's a variation of the "Migration Recipe" I came up with a while ago: https://markusholtermann.eu/2016/04/django-migrations-recipe-2/ . My question would be if you really need the field of the new type to have the exact same name as the old one. If you can

Re: Zero Downtime Field Type Changes

2019-03-13 Thread Mike Dewhirst
On 13/03/2019 2:40 pm, 'Kyle Mulka' via Django users wrote: Hi there, Wondering if there's any tool out there to make a zero downtime field type change easier. I want to change a django model field from one type to another, and the format of the field in the database is slightly different.