[web2py] call to PUT restapi from angular

2018-03-13 Thread yogeshwar khalkar
Hi, I want to update table on PUT call from angular but, Angular PUT request is not recognised by Web2Py PUT restapi. Here is angular code: this.http.put('http://127.0.0.1:8000/automation/workflow/updateAgenda/'+this.id, JSON.stringify(data)).subscribe(res=>{ console.log(res); }) Here is W

Re: [web2py] Re: call to PUT restapi from angular

2018-03-13 Thread yogeshwar khalkar
Still don't work. It returns 405 method not found. On Mar 13, 2018 7:00 PM, "Leonel Câmara" wrote: > You're missing a return locals() > > > @request.restful() > def updateAgenda(): > > def PUT(id): > data = json(request.body.read()) > ret = db(db.agenda.id >

Re: [web2py] Re: call to PUT restapi from angular

2018-03-13 Thread yogeshwar khalkar
Hi Leonel, print request.env.request_method prints - "OPTIONS" Thanks, Yogeshwar On Wed, Mar 14, 2018 at 2:19 AM, Val K wrote: > And keep in mind that 'return locals()' should be related to updateAgenda, > not PUT + I think it should be PUT(id, **kw) because you pass additional > payload, ot

[web2py] track email delivery

2018-03-26 Thread yogeshwar khalkar
Hi All, I want to track the email delivery, Is there any way to do it using web2py. Thanks for any help. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) ---

[web2py] Sending emails from different email ids

2018-04-03 Thread yogeshwar khalkar
Hi, I want to send email from different email IDs each time. I have configured 1 smtp email for sender in appconfig file & it's working fine, But i want to configure different email on user login. Please help me to solve the problem. -- Resources: - http://web2py.com - http://web2py.com/boo

Re: [web2py] Re: Sending emails from different email ids

2018-04-03 Thread yogeshwar khalkar
ril 3, 2018 at 4:01:26 AM UTC-4, yogeshwar khalkar wrote: >> >> Hi, >> >> I want to send email from different email IDs each time. >> >> I have configured 1 smtp email for sender in appconfig file & it's >> working fine, But >> i wa

[web2py] auth decorator with rest api

2018-04-12 Thread yogeshwar khalkar
Hi All, I was implementing the @auth.requires_login() with @request.restful() but it not working. It redirects me every time even if I am login. @auth.requires_login() @request.restful() def getActivity(): def POST(): data = "do Something" return json(data) retu

Re: [web2py] Re: auth decorator with rest api

2018-04-12 Thread yogeshwar khalkar
return json(data) return locals() Thanks, Yogeshwar On Fri, Apr 13, 2018 at 3:52 AM, Anthony wrote: > How are you (a) logging in and (b) making the calls to getActivity? > > > On Thursday, April 12, 2018 at 8:55:02 AM UTC-4, yogeshwar khalkar wrote: >> >> Hi All, &g

Re: [web2py] Re: auth decorator with rest api

2018-04-13 Thread yogeshwar khalkar
from a browser? If so, confirm that the session cookie is being set and > sent back and forth on each request, and confirm that the user record is > being added to the session upon login. > > > On Friday, April 13, 2018 at 12:27:35 AM UTC-4, yogeshwar khalkar wrote: >> >>

Re: [web2py] Re: auth decorator with rest api

2018-04-15 Thread yogeshwar khalkar
2018 at 2:29:02 AM UTC-4, yogeshwar khalkar wrote: >> >> The session cookie is being set and user record is being added to the >> session upon login. >> but it not being sent back and forth on each request. >> >> Also, self.user is None before logout and logout eve

[web2py] Error in mysql connection

2018-05-10 Thread yogeshwar khalkar
Hi all, I am facing some issue to connect to the database with password including '@' symbol. without including '@' symbol in the password, it works. Is this a bug or am I missing something mysql://root:pass@123@localhost/csautomation It workes for following string: mysql://root:pass123@loca

[web2py] json field data sequence

2018-05-31 Thread yogeshwar khalkar
Hi, I have a JSON field in the table with multiple key-value pairs. I want to render that data on the screen in the sequence I have entered it. But web2py rearranges that data in the database, don't know on which precedence. I want the data in the sequence I have entered in the database. Anyo

[web2py] Cannot resolve reference

2018-06-21 Thread yogeshwar khalkar
Hi, I am getting 'Cannot resolve reference company_process in board_meeting definition' error when using circular reference.. Table structure db.define_table('board_meeting', Field('agenda', 'json'), Field('process',db.process), Field('event','r

[web2py] Changes not reflecting

2018-07-26 Thread yogeshwar khalkar
Hi All I am facing strange behavior in web2py. When I make some changes in controller or models it's getting saved in file but changes is not reflecting in application. I have restarted the app multiple times but changes not reflecting in app. I have compiled the app and installed in new proje

[web2py] restapi for login

2018-01-15 Thread yogeshwar khalkar
Please help me to create restapi for login on auth_user table thanks in advance -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message

Re: [web2py] Re: restapi for login

2018-01-16 Thread yogeshwar khalkar
> On Monday, January 15, 2018 at 10:16:38 AM UTC-5, yogeshwar khalkar wrote: >> >> Please help me to create restapi for login on auth_user table >> >> thanks in advance >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Docum

[web2py] comparison between foreign key id and name

2018-01-16 Thread yogeshwar khalkar
Hi, Please help me with following. I have created the api I am passing company_name(string) to it, for select I am comparing reference Id to name. I get the error invalid literal for long() with base 10: 'cadence' at db.company_user.company == company_name I actually don't know how to compare

[web2py] web2py api call from angular 4

2018-01-22 Thread yogeshwar khalkar
Please help me, When I am try to login from angular 4 app to web2py rest api browser shows error like OPTIONS http://127.0.0.1:8000/csautomation/user/login 405 (METHOD NOT ALLOWED) *AND* Failed to load http://127.0.0.1:8000/csautomation/user/login: Response to preflight request doesn't pass

Re: [web2py] Re: web2py api call from angular 4

2018-01-22 Thread yogeshwar khalkar
ampaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Tue, Jan 23, 2018 at 2:30 AM, Dave S wrote: > > > On Monday, January 22, 2018 at 4:57:34 AM UTC-8, yogeshwar khalkar wrote: >> >> Please help me, >> >> >> When I

[web2py] POST api return 405

2018-02-01 Thread yogeshwar khalkar
I have POST api in web2py I am accessing it using angular httpclient post service but, it returns 405(method not allow) error. can anybody give me solution for it Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] how to use restapi for email verification

2018-02-07 Thread yogeshwar khalkar
My application is in angular 5 I want to write rest api in web2py to verify email on registration This is my register api @request.restful() def register(): def GET(**fields): user = auth.register_bare(**fields); del user['password'] return json(user.id) How can I wr