Re: Can't save to Postgres db locally - Fresher

2019-05-16 Thread Emmanuel klutse
Thanks, I tried your approach but it failed again. I will start all over with a different approach. I will update you if I find a way out. > On May 16, 2019, at 1:45 AM, salimon jamiu olashile > wrote: > > Hello, > > From what I see contact is a model & you want to create a new contact. So,

Re: Can't save to Postgres db locally - Fresher

2019-05-16 Thread salimon jamiu olashile
Is “contact” a model? On Wed, 15 May 2019 at 8:36 PM, Emmanuel klutse wrote: > Thanks Chetan Ganji, well appreciated. > > H, I changed the method name but problem still persist. > > I have tried all I can to handle the new errors but failed again. > > When I changed the contact here to con

Re: Can't save to Postgres db locally - Fresher

2019-05-16 Thread salimon jamiu olashile
Hello, >From what I see contact is a model & you want to create a new contact. So, instead of this; c = contact(email='email',subject=‘ subject',message='message') c.save() just do this; c = *contact.objects.create*(email=email, subject=subject, message=message) Regards On Thu, 16 May 2019 a

Re: Can't save to Postgres db locally - Fresher

2019-05-15 Thread Emmanuel klutse
Thanks Chetan Ganji, well appreciated. H, I changed the method name but problem still persist. I have tried all I can to handle the new errors but failed again. When I changed the contact here to contacts "c = contact(email='email',subject='subject',message='message’)" NameError at /contac

Re: Can't save to Postgres db locally - Fresher

2019-05-15 Thread salimon jamiu olashile
You’re passing a string instead of a variable. c = contact(email=email,subject=subject,message=message) On Wed, 15 May 2019 at 4:33 PM, Chetan Ganji wrote: > *Problem - * > def *contact*(request): > .. > c = *contact*(email='email',subject='subject',message='message') > ...

Re: Can't save to Postgres db locally - Fresher

2019-05-15 Thread Chetan Ganji
*Problem - * def *contact*(request): .. c = *contact*(email='email',subject='subject',message='message') .. The two methods that should be doing two separate things have the same name. So, the python interpreter is confused. *Solution - * Rename anyone of the above metho

Can't save to Postgres db locally - Fresher

2019-05-15 Thread Emmanuel klutse
Hello Team, I need help please, I’m try to save to my db from a FORM using the command below. I’ve all I could but the process keeps failing and I’m stack. File "/Users/emmanuelklutse/Documents/djangodev/myPortfolio/emmanuel/views.py", l ine 17, in contact c = contact(email='email',subject