Hello!

Sorry for answering myself, but I've been working on this problem without 
success. This time I've tried with this post:

https://groups.google.com/forum/#!msg/web2py/JZSL1R9J-C0/qsZ32kVfhGAJ

Following Massimo advise in that post I've done this:

This is my Routes.py:

#!/usr/bin/python
# -*- coding: utf-8 -*-
routes_in = (('/myapp/default/public_call/json/public_function_1/$1/$2/$3', 
'/myapp/default/public_call/json/public_function_1?var1=$1&var2=$2&var3=$3'
), ('/myapp/default/private_call/json/private_function_1/$1/$2', 
'/myapp/default/private_call/json/private_function_1?var1=$1&var2=$2'))



And this is my default.py:

...
public_services=Service()
private_services=Service()
...
def public_call(): 
    return public_services()


@auth.requires_login()
def private_call(): 
    return private_services()
...
@public_services.json
def public_function_1():
    var1 = request.vars.var1
    var2 = request.vars.var2
    var3 = request.vars.var3
    print var1
    print var2
    print var3
...


@private_services.json
def private_function_1():
    var1 = request.vars.var1
    var2 = request.vars.var2
    print var1
    print var2
...


But the output in both cases is

None
None
None

and 

None
None

What am I doing wrong??

On Thursday, September 5, 2013 9:54:09 PM UTC+2, Wonton wrote:
>
>
> Arrgh! I must be missing something, I'm very sorry :-(.
>
> I've tried this:
>
> - No changes. The site is working correctly except for the special chars.
> - I've created in web2py root directory the routes.py file with this 
> content:
>
> routes_apps_raw=['myapp']
>
> -I've restarted web2py.
> - My app is not working anymore. All request are getting an "invalid 
> request" error.
> - I've edited routes.py, now it contains:
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> routes_apps_raw=['myapp']
>
> -I've restarted web2py.
> - My app is not working yet, all request are invalid.
> -I've deleted routes.py file.
> -I've restarted web2py.
> -My app is working correctly except for the special chars.
>
> So, I'm sure I'm doing anythong very wrong. Besides creating the routes.py 
> file, should I change any other thing in my controllers?
>
> Thank you very much again!
>
>
>

-- 
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 because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to