Rémy Reche | 31 Jul 11:33 2014
Rémy Reche <remy.reche@...>

Encoding and 'invalid argument'

I am using the decorator <at> request.restful() in order to implement a rest API. Unfortunatly, one on my function take an argument which can contain non-ascii character, for instance 'Gymnase Joseph Guétat'. Each request using this string returns a web2py error with the following comment: invalid arg <Gymnase Joseph Gu\xc3\xa9tat>. Is this an issue with the url encoding/decoding mechanism ? a routing issue ? How can I solve this problem ?

Thanks,

Rémy

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
tangsjian | 1 Aug 05:40 2014
Picon

'Query' object is not callable

I want to insert a form include two fields coursename and  teache_id reference auth_user,as students and teachers in the same table(auth_user),so I want to filter content of dropdown in SQLFORM only to show the role is teacher,so i do this
query=(db.auth_membership.user_id==db.auth_user.id)(db.courses.teacher_id==db.auth_user.id)(db.auth_membership.group_id==db.auth_group.id)(db.auth_group.role=='teacher')
db.courses.teacher_id.requires=IS_IN_DB(db(query),'db.auth_user.id')
form=SQLFORM(db.courses)
return dict(form=form)
but it comes out error:'Query' object is not callable
maybe there is error in query so I test it  in mysql like this:
select auth_user.id
from auth_user,auth_membership,auth_group
where auth_membership.user_id = auth_user.id and auth_membership.group_id=auth_group.id and auth_group.role='teacher'



it's ok!
who can help me!

Thanks
jian

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Andrew | 30 Jul 11:12 2014
Picon

Social auth with google- userinfo endpoint deprecated.

Hi I am working with the code provided by Michele Comitini for  integrating google login to my app. https://groups.google.com/forum/#!msg/web2py/fjpbFxRAGJM/pxvoBJKk2UkJ 
But I find that it is using the userinfo endpoint to get the credentials. Google has mentioned that they have deprecated it and it wont work from Sep 1st. https://developers.google.com/+/api/auth-migration#timetable. 

Please let me know if an updated version of the snippet is available or any pointers to the changes i need to make to the code snippet. Thanks a lot for your guidance. 

-Andrew

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Leonardo Pires Felix | 1 Aug 05:16 2014

Export limit

There is a clever way to limit the number of rows passed to exporter class?
The easy way i see is in limiting on the query, but on that way the user will cannot search on the rows that isn't included on the search.
There is a way to only limit the export?

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
LoveWeb2py | 1 Aug 04:05 2014
Picon

Creating a 5 page PDF file to teach web2py -- What should I focus on?

Hello,

I'm creating a 5 page PDF to get users acquainted with web2py. I'd like to orientate them with the MVC model, have them define a database, and create a simple app.

I could add an extra page if needed, but do you think there is a better topic I could focus on other than what I have listed? I'm totally open to input and will share the presentation when complete :)

Everyone here has helped me so much in the past so I truly value and appreciate your input.

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
LoveWeb2py | 31 Jul 23:48 2014
Picon

LOAD doesn't refresh page sessions?

Hello,

Can I call =LOAD on the same page as I want to refresh?

The function I'm calling goes through a sequence of events, loads everything to session.dictionary and then takes the user to a page based on their results.

In my view I have {{=LOAD('controller','function')}}

However, when I try to use the same input field the page stays the same. None of the session variables change which tells me the page controller isn't properly loading? Am I missing something?

I would post the code but its over 500 lines... If its absolutely necessary I can load it to github. I just want to make sure I have the concept right

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
LoveWeb2py | 31 Jul 18:46 2014
Picon

display html based on user auth groups

Hello I have an update page on my index.html

I only want to display certain text if members belong in certain groups:

For example:

{{if auth.has_membership('finance'):}}
   <h1> Welcome to the finance page</h2>
{{pass}}
{{else}}:
 <h1> Hello Users!</h1>
{{pass}}

The problem I'm having is it shows everything... Do I need to specify certain groups? in the else statement or what can I do?

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Ivan | 31 Jul 17:51 2014
Picon

db commit and xmlrpc faults

I've read (if it is correct) that at the end of a request without errors, the db is automatically committed by web2py.
Now, I have an xmlrpc function that should insert 2 records in a transaction.
If the second insert fails (for example for a syntax error in the query, or for a notnull constraint violated), the client receives an xmlrpc fault message but the first insert was committed!
Is it a web2py bug or I'm wrong?

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
jimbo | 31 Jul 13:51 2014
Picon

Sample application?

Has anyone got a simple example application of a database such as a company personal database or similar with several fields showing how they are joined or whatever the Web2py method is.

I am a novice with both databases and Web2py.


Anything that would help would be very welcome, thank you!

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
lyn2py | 30 Jul 19:45 2014
Picon

Re: Are MD5sums posted for Web2Py?

You need to use HTTPS to access admin

On Saturday, May 24, 2014 3:18:06 AM UTC+8, Dave S wrote:


On Friday, May 23, 2014 11:57:27 AM UTC-7, Dave S wrote:
I just downloaded the Normal ("stable"?) version and the Developer's ("nightly"?) version for use on a Centos machine,

Also, I can't see what I did wrong at startup, but the "admin interface is disabled because of insecure channel".

I'm using a browser on the same machine, same user session.   The local IP is 10.xx.yy.zz, and I used "-i 10.xx.yy.zz", and set a password on the first try,
and used "-a '<recycle>' " on the second try.  And that matches how I did it on the Fedora machine, where I don't have any problems.
Both are using Version 2.9.5-stable+timestamp.2014.03.16.02.35.39.

(I also have the Windows version working on Yet Another Machine (my laptop)).


/dps


 
and I wanted to check that I got what I think I got.

The values I get are

# developer version
d083f552b19ac25d24020fdc6388baea

# normal
fe8e532990006964fda40478ef18d663

/dps

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Dave S | 30 Jul 19:07 2014
Picon

Re: Are MD5sums posted for Web2Py?



On Friday, May 23, 2014 12:18:06 PM UTC-7, Dave S wrote:


On Friday, May 23, 2014 11:57:27 AM UTC-7, Dave S wrote:
I just downloaded the Normal ("stable"?) version and the Developer's ("nightly"?) version for use on a Centos machine,

Also, I can't see what I did wrong at startup, but the "admin interface is disabled because of insecure channel".

I'm using a browser on the same machine, same user session.   The local IP is 10.xx.yy.zz, and I used "-i 10.xx.yy.zz", and set a password on the first try,
and used "-a '<recycle>' " on the second try.  And that matches how I did it on the Fedora machine, where I don't have any problems.
Both are using Version 2.9.5-stable+timestamp.2014.03.16.02.35.39.


FWIW, on the Centos machine, the admin interface _is_ available when I start an instance with -i 127.0.0.1, as recommended in
<https://groups.google.com/d/msg/web2py/khJTQxdNVoc/6lep5lXo91UJ>

Not sure why the Fedora machine can recognize its outside IP as local and the Centos can't, but there you have it.

/dps

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Gmane