Re: New user question: Where to put non-form validation code?

2019-07-24 Thread Mike Dewhirst
On 25/07/2019 1:03 pm, Jim Illback wrote: I had a slight variation on this thread - where to put some M2M field validation/deletion logic. I have a purely model-based form where a checkbox’s value determines whether another field (it’s a M2M field) in the form should be NULL or keep its value

Re: New user question: Where to put non-form validation code?

2019-07-24 Thread Mike Dewhirst
On 25/07/2019 1:03 pm, Jim Illback wrote: I had a slight variation on this thread - where to put some M2M field validation/deletion logic. I have a purely model-based form where a checkbox’s value determines whether another field (it’s a M2M field) in the form should be NULL or keep its value

Re: New user question: Where to put non-form validation code?

2019-07-24 Thread Jim Illback
I had a slight variation on this thread - where to put some M2M field validation/deletion logic. I have a purely model-based form where a checkbox’s value determines whether another field (it’s a M2M field) in the form should be NULL or keep its values to be saved in the database. So, following

Re: can you plz helpme with this django task

2019-07-24 Thread Kasper Laudrup
Hi Navami, On 24/07/2019 15.10, Navami K wrote: A website that will first randomly generate a number unknown to the website visitor. The visitor needs to guess what that number is. (In other words, the visitor needs to be able to input information.) If the visitor’s guess is wrong, the program

Blog or link sharing in the community page

2019-07-24 Thread Matt Zand
Hi, I shared one blog post last week in community section. It does not show up. https://www.djangoproject.com/community/ Can someone help me out. My article links was below: https://myhsts.org/upload-and-process-website-cvs-file-using-python-django.html and RSS link https://myhsts.org/rss_feed

How do I override default date formats per locale in Django?

2019-07-24 Thread אורי
Hi, We are using Django 1.11 for Speedy Net. I want to override the default values of DATE_FORMAT and MONTH_DAY_FORMAT in English, but keep the default values (or define them again) in Hebrew. So they will not be the same and will not be identical to Django's default values. In English we will hav

Re: Mocking models or at least creating Fakes.

2019-07-24 Thread Roger Gammans
> class TestThing(TestCase):def test_x():fake = > FakeThingy()out = m.Foo( thing = fake ) > > All the error come from the last line when I try to construct a Foo. > Without FakeThinky deriving from Thingy I get a error that fake is > not of the correct class, > and it is (as sh

Re: Sign Up by using E-mail id

2019-07-24 Thread Sam W
This is the official page. It is really simple to follow: https://docs.djangoproject.com/en/2.2/topics/auth/default/ On Wednesday, July 24, 2019 at 5:27:37 AM UTC-5, Soumen Khatua wrote: > > Hi Folks, > I want to create one signup page where end-user can SignUp and LogIn by > using their e-mail

Re: Sign Up by using E-mail id

2019-07-24 Thread Sam W
Check this one out: Django Authentication with just an email and password (no username required!) https://medium.com/@ramykhuffash/django-authentication-with-just-an-email-and-password-no-username-required-33e47976b517 On Wednesday, July 24, 2019 at 5:27:37 AM UTC-5, Soumen Khatua wrote: > > Hi

Re:

2019-07-24 Thread Soumen Khatua
Thanks for your response. Thank You Regards, Soumen On Wed, Jul 24, 2019 at 7:13 PM Devender Kumar wrote: > Read django allauth lib. > > On Wed 24 Jul, 2019, 4:01 PM avi gehlot, wrote: > >> You can contact me .. >> >> On Wed, 24 Jul 2019 at 3:57 PM, Soumen Khatua >> wrote: >> >>> Hi Folks, >

Re: What's the best way to find the number of database accesses being done?

2019-07-24 Thread Don Baldwin
Thanks for the quick response Simon. This looks to be very informative. It will take me a while to digest all of it, but I've already gotten logging working for my queries. Very helpful. Thanks, Don On Tue, Jul 23, 2019 at 11:38 AM Simon Charette wrote: > Hello Don, > > Django logs all databa

Re: What's the best way to update multiple entries in a database based on key/value pairs

2019-07-24 Thread Don Baldwin
Thanks for the quick response Simon. Worked like a charm. -Don On Tue, Jul 23, 2019 at 11:29 AM Simon Charette wrote: > Hello Don, > > If you're on Django 2.2+ you should use bulk_update for this purpose[0] > > TestThing.objects.bulk_update(( > TestThing(id=id, value=new_value) > for i

Re:

2019-07-24 Thread Devender Kumar
Read django allauth lib. On Wed 24 Jul, 2019, 4:01 PM avi gehlot, wrote: > You can contact me .. > > On Wed, 24 Jul 2019 at 3:57 PM, Soumen Khatua > wrote: > >> Hi Folks, >> I want to create one signup page where end-user can SignUp and LogIn by >> using their e-mail id nit by Username. Please

Re: How to access first_name ad last_name in extended User model

2019-07-24 Thread Lim Kai Wey
To pastufrazio, I believe instead of OneToOneField, you should try using, user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.CASCADE, ) Since the authentication is imported. Regards, Kai Wey -- You received this message because you are subscribed to the G

How to access first_name ad last_name in extended User model

2019-07-24 Thread pastrufazio
Hi all, newbie here! I cannot access self.user.first_name and self.user.last_name in my ClientProfile class, this is the error message: *Instance of 'OneToOneField' has no 'first_name' member* *Instance of 'OneToOneField' has no 'last_name' member* What am I doing wrong? class ClientProfi

Re: about Django tutorial

2019-07-24 Thread Lim Kai Wey
To 田村佑太, *Is it fine if you show use your urls.py in the polls app as well? I believe the problem is caused from there. * *Regards,* *Kai Wey* On Wed, Jul 24, 2019 at 7:03 PM 田村佑太 wrote: > Using the URLconf defined in mysite.urls, Django tried these URL > patterns, in this order: > >1. ad

Re: about Django tutorial

2019-07-24 Thread Avi gehlot
Medium.com On Wed, 24 Jul 2019 at 4:33 PM, 田村佑太 wrote: > Using the URLconf defined in mysite.urls, Django tried these URL > patterns, in this order: > >1. admin/ > > The current path, polls/, didn't match any of these. > > > what is the problem of this? > > > at ./mysite/mysite/urls.py > > I

Mocking models or at least creating Fakes.

2019-07-24 Thread Roger Gammans
Hi, The django ORM is being far to helpful for me in this case; I need to find some method of bypasssing it; for my unittests. I've got system which look something like:- ## In models.pyclass Thingy(models.Model):friendly_name = models.CharField(max_length =200)title = models.CharField(max_

about Django tutorial

2019-07-24 Thread 田村佑太
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order: 1. admin/ The current path, polls/, didn't match any of these. what is the problem of this? at ./mysite/mysite/urls.py I wrote this code. from django.contrib import admin from django.urls import

Re: Error running Django tutorial

2019-07-24 Thread Will Brown
Thank you. I think this is the issue for many of us... mysite/ On Friday, January 4, 2019 at 4:38:47 AM UTC-8, Nitin Tiwari wrote: > > I just wanna, explain my experience, in the official tutorial > https://docs.djangoproject.com/en/2.1/intro/tutorial01/ >

Re: interoperability of django with another web server

2019-07-24 Thread CodingManiac
Thank you for your reply On Wed, 24 Jul 2019, 3:58 am Kasper Laudrup, wrote: > Hi CodingManiac, > > On 23/07/2019 14.44, CodingManiac wrote: > > Other framework in python > > > > Your question is really not very precise and you it's hard for anyone to > tell you "how you can do that", but you ca

[no subject]

2019-07-24 Thread avi gehlot
You can contact me .. On Wed, 24 Jul 2019 at 3:57 PM, Soumen Khatua wrote: > Hi Folks, > I want to create one signup page where end-user can SignUp and LogIn by > using their e-mail id nit by Username. Please tell me how i can do > that,please provide me source code for that. > > Thank You > > R

Sign Up by using E-mail id

2019-07-24 Thread Soumen Khatua
Hi Folks, I want to create one signup page where end-user can SignUp and LogIn by using their e-mail id nit by Username. Please tell me how i can do that,please provide me source code for that. Thank You Regards, Soumen -- You received this message because you are subscribed to the Google Group