Re: How this Line of code works

2019-04-15 Thread Mayur Bagul
hello jani, thanks for hep. i read django doc and this is the example from it but there is no information provided for why these parameters are used. but thanks for your information it is useful like others gave me. thanking you. On Monday, April 15, 2019 at 11:59:51 AM UTC+5:30, Jani Tiainen

Re: Django soap client

2019-04-15 Thread 1351552...@qq.com
django is a framework, it is worked in different way with php, read the lesson in doc is the best way to undstand it. wblueboat From: oka M Date: 2019-04-12 13:45 To: Django users Subject: Django soap client Hai All, Im php programer and i want to migration from php to pyhton in specific i

make relevance between two fields in django model

2019-04-15 Thread omar ahmed
hii .. in models i have two classes 'Club' and 'League' and i created third class 'Match' class Match(models.Model): league = models.Foreignkey(League) club = models.Foreignkey(League) now i want to make relevance between league and club fields in this class -- You received this message because

Re: Step-by-Step Machine Learning with Python [Full Packt Paid Video Course for free]

2019-04-15 Thread Hari
This is not a ML group..Please post only django relevent topics On Mon, Apr 15, 2019, 11:59 PM Zahid Hossain wrote: > please subscribe o get more paid course for free > https://youtu.be/-Za8_t2DBeU > > -- > You received this message because you are subscribed to the Google Groups > "Django

Python for Everyday Life [Full Packt Paid Video Course for free]

2019-04-15 Thread Zahid Hossain
please subscribe to get more paid course for free https://youtu.be/1Ax12JPL1R0 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Step-by-Step Machine Learning with Python [Full Packt Paid Video Course for free]

2019-04-15 Thread Zahid Hossain
please subscribe o get more paid course for free https://youtu.be/-Za8_t2DBeU -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Using HTTP BASIC AUTH

2019-04-15 Thread Kasper Laudrup
Hi fellow django users, I have a web site where I require authentication for all views and have successfully created custom middleware to handle that (all unauthenticated requests redirect to the login view unless the request is for the login view). Now, I want to extend that a bit to

Re: How to properly use MySQL Generated Fields in Django

2019-04-15 Thread Rob Schneider
Thanks! I’ll give this a try. I did have “alpha” as a function in the model, but found I could not easily include that in queries as easily as a field in the db. so into the db it went. I’ll try this, and see if I can get the data out as wanted. thanks! —rms > On 15 Apr 2019, at 17:08,

RE: How to properly use MySQL Generated Fields in Django

2019-04-15 Thread Matthew Pava
I wouldn’t save alpha in the database. I would use a property on the model or annotate the field to the object manager. Property: class Guest(models.Model): @property def alpha(self): return self.lname[0] if self.lname else '' Or on

How to properly use MySQL Generated Fields in Django

2019-04-15 Thread rmschne
I have a generated field in a MySQL table "alpha = upper(substr(`lname`,1,1))" where the field lname is a last name of a person. Idea is that I get a field of the first letter of the last name. In Django, I have in the table 'attendees' a field alpha = models.CharField("alpha", max_length=1,

Re: DB queries in django scripts

2019-04-15 Thread Web Architect
Hi Derek, Thanks for your response. We are using MySQL. Could you suggest something similar for the same? Thanks. On Thursday, April 11, 2019 at 1:27:02 PM UTC+5:30, Derek wrote: > > If you are using PostggeQL you may want to look at the query analysis > produced by: >

How to override default Django Admin Panel Model display to Customization

2019-04-15 Thread Balaji Shetty
Hi When i do login using Django Admin Panel , i can easily perform CRUD operation on Models. can i customize the display of Models Records in django Admin Panel Itself, when I select the model, I get all the records, But i want to filter the records based on some Criteria. Here is my model .

Lazy evaluation of django custom context processor in base.html

2019-04-15 Thread BIJAL MANIAR
Hi, Have created a custom context processor to retrieve extra user attribute from custom UserData model. Passing this variable in "base.html" template calls the custom context processor function on every request to render html page. Since it is a database query, how to efficiently call custom

Adduser button click error in django admin

2019-04-15 Thread Cigi Sebastine
Hi all I have installed new django application and when clicking the adduser in adminside shows the error: NotImplementedError at /admin/auth/user/add/ Enyone please help me to solve this problem. Thanks Cigi UNKNOWN command not implemented for SQL SAVEPOINT "s140636377462528_x1" -- You

Re: Complex query on inner join - case for __ne?

2019-04-15 Thread nm
I've only had a quick look at your problem, but looks like maybe this section of the Django documentation could be useful: https://docs.djangoproject.com/en/dev/topics/db/queries/#spanning-multi-valued-relationships On Friday, 12 April 2019 15:10:59 UTC+2, Michael Thomas wrote: > > Hello

Re: How to run ORM commands from DOM Javascript?

2019-04-15 Thread Sithembewena L. Dube
You cannot run Django's Python code in JavaScript in a browser. The advice you have been given applies. Kind regards, Sithu *Sent with Shift * On

Re: How to run ORM commands from DOM Javascript?

2019-04-15 Thread sairanganadh Narayana
Thanks for your response. But, I need to run ORM(model.objects.filter(pk=1)) commands in javascript and show results in HTML pages. I was wrong in question. Please suggest any possibility. On Tuesday, April 9, 2019 at 5:51:24 PM UTC+5:30, Robin Riis wrote: > > in models.py you can define a

“Scrapy and Scrapyrt: how to create your own API from (almost) any website” published by Jérôme Mottet - We can Integrate in our own project

2019-04-15 Thread Balaji Shetty
Hi Can we use this one. Anybody has ever tried. We have other option like Rest Framework or Angular JS in front End. Please Discuss -- Forwarded message - From: Medium Daily Digest Date: Sun, Apr 14, 2019 at 8:50 AM Subject: “Scrapy and Scrapyrt: how to create your own API

Re: How this Line of code works

2019-04-15 Thread Jani Tiainen
Hi. get_object_or_404 works so that first argument is the model class you want to query. Rest of the parameters are filters that mus return a single object. You can find this information from the Django docs as well. ma 15. huhtik. 2019 klo 7.23 Mayur Bagul kirjoitti: > how passing Question