[web2py] Fetch next record in database

2013-11-22 Thread Ruud Schroen
Hi, I have a swipe-slider with 4 database records in them. When you swipe to the left and reach the end of the slider, there will be inserted more content via AJAX (like a pull to refresh). When I try to GET the data, the controller takes the ID of the last slide given by args. Now i want the

[web2py] Re: Select Image In Custom Registration

2013-11-22 Thread Ruud Schroen
A simple way of doing it would be adding a field with a string set (avatar 1, avatar 2 , avatar 3). Then in the view you can show a image based on which string the user chose. Example {{if (row.avatar == avatar 1):}} {{url to first image..}} {{elif (row.avatar == avatar 2):}} {{url to second

[web2py] Re: Making the DAL orders-of-magnitude faster...

2013-11-22 Thread Paolo Valleri
+ 1 for changing dal.py:8359 in fields = colnames or [f[0] for f in columns] This will allow us to change the columns name even when as_dict=True. Example: sql = db(db.coordinate.is_active == True)._select(db.coordinate.point2d. count(), db.coordinate.point3d.count()) rows = db.executesql(sql,

Re: [web2py] web2py 2.6.1 is OUT - IMPORTANT READ

2013-11-22 Thread Remco Boerma
Cheers, And a big Thank you to all who have contributed! With kind regards, Remco Boerma On Fri, Sep 13, 2013 at 12:27 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Web2py 2.6.1 is finally OUT. It needs some more testing. READ BELOW BEFORE UPGRADING Attention all users:

Re: [web2py] Fetch next record in database

2013-11-22 Thread Vinicius Assef
record = db(db.my_table.idlast_read_id).select(orderby=db.my_table.id, limit=(0,1)) On Fri, Nov 22, 2013 at 7:03 AM, Ruud Schroen r...@formatics.nl wrote: Hi, I have a swipe-slider with 4 database records in them. When you swipe to the left and reach the end of the slider, there will be

[web2py] Re: AppAdmin: CSV import bug

2013-11-22 Thread Andy W
Just come across the same problem - using ver 2.7.4 with pythonanywhere.com The issue seems to be with the csv files created by Excel (I am on Mac OSX). I have a simple 2-column list of ISO country codes and nationalities on an Excel spreadsheet. Saving from Excel to CSV creates a file that,

[web2py] now.weekday() as string

2013-11-22 Thread dirman
how do i return now.weekday() as string instead of a integer and also two days ahead from current weekday? -- 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] Form self-submit broken after redirection

2013-11-22 Thread Anthony
It's not quite clear what's happening. Can you show some code? -- 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

[web2py] Re: now.weekday() as string

2013-11-22 Thread Niphlod
http://docs.python.org/2/library/datetime.html On Friday, November 22, 2013 12:02:11 PM UTC+1, dirman wrote: how do i return now.weekday() as string instead of a integer and also two days ahead from current weekday? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: Form self-submit broken after redirection

2013-11-22 Thread weheh
It works like this: # index controller def index(): # some preamble if session.state == 'a': redirect(URL('thiscontoller', 'myfunc1.load', user_signature=True)) # some more states and redirects #later on def myfunc1(): form = SQLFORM.factory(Field(...the usual stuff,

[web2py] Re: Form self-submit broken after redirection

2013-11-22 Thread Anthony
I tried your code and it works fine for me. Maybe we need to see more of the code and understand the workflow better. On Friday, November 22, 2013 7:55:50 AM UTC-5, weheh wrote: It works like this: # index controller def index(): # some preamble if session.state == 'a':

Re: [web2py] Re: beginner questions about REST

2013-11-22 Thread Joel Samuelsson
Is this in the stable version yet? I am having the same issue and updating to the latest stable doesn't help. If not, is there a small fix I can use in the meantime? Best regards, Joel Samuelsson Den onsdagen den 18:e september 2013 kl. 14:56:50 UTC+2 skrev Dimid Korovev: Ticket opened:

[web2py] Minimalist Streaming Audio (html5) app

2013-11-22 Thread Massimo Di Pierro
http://www.reddit.com/r/Python/comments/1r7v23/audio_streaming_app_in_web2py_from_scratch/ -- 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

Re: [web2py] Re: DAL db.table.field.contains

2013-11-22 Thread Richard Vézina
I guess because his Author reference field is of type list:reference ?! Richard On Thu, Nov 21, 2013 at 3:12 PM, Niphlod niph...@gmail.com wrote: why contains instead of == ? db(db.Book.Author == Author.id).select(db.Book.ALL, orderby=db.Book.Name) On Thursday, November 21, 2013 4:31:53

Re: [web2py] Re: DAL db.table.field.contains

2013-11-22 Thread Kevin Bethke
thats why. thanks richard for your solution it works perfectly. -- 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

Re: [web2py] Re: DAL db.table.field.contains

2013-11-22 Thread Richard Vézina
:) On Fri, Nov 22, 2013 at 10:20 AM, Kevin Bethke kevin.bet...@gmail.comwrote: thats why. thanks richard for your solution it works perfectly. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: NDB support for GAE

2013-11-22 Thread Cato Gonzalez
I am just starting a project on GAE using web2py and would certainly prefer to start with ndb from the beginning. Is this patch going to be official? Can I start with the regular db and then switch to ndb once it's official? I am new to GAE and web2py but after reading all docs I believe they

[web2py] Checkbox Value of Grid with Join Query

2013-11-22 Thread EW
Is there a way I can control the values assigned to the checkboxes in my SQL grid (selectable=True)? My queries end up to be something like this: (((block_info.json_dir_id = json_dir.id) AND (json_dir.build = 'unknown'))AND (json_dir.program = 'test')) and my issue is that the

Re: [web2py] Re: NDB support for GAE

2013-11-22 Thread Quint van den Muijsenberg
You can always switch between DB and NDB. Thats the idea of the patch. You can also grab the trunk version and help testing it. On Nov 22, 2013 5:12 PM, Cato Gonzalez catogonza...@gmail.com wrote: I am just starting a project on GAE using web2py and would certainly prefer to start with ndb

Re: [web2py] Minimalist Streaming Audio (html5) app

2013-11-22 Thread Vinicius Assef
Beautiful. :-) On Fri, Nov 22, 2013 at 12:33 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: http://www.reddit.com/r/Python/comments/1r7v23/audio_streaming_app_in_web2py_from_scratch/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: Virtual Field and sqlform.grid

2013-11-22 Thread Eduardo Cruz
type 'exceptions.AttributeError' 'Row' object has no attribute 'unknown' Version web2py™ Version 2.7.4-stable+timestamp.2013.10.14.15.16.29 Traceback Traceback (most recent call last): File /home/eduardo/PycharmProjects/gblog/web2py/gluon/restricted.py, line 217, in restricted exec ccode

[web2py] Why Logging.conf?

2013-11-22 Thread Perry Randall
Hey this question is mostly out of curiosity after spending the better half of an hour trying to get the python standard logging facilities working. Why must you use a logging.conf in ini format instead of a python file? It would take me far fewer lines to do it in python, would be more

[web2py] Re: Starting web2py fails silently with Cygwin python

2013-11-22 Thread Raul Romay Barrero
I had exactly the same behavior when using cygwin x64. I installed cygwin x32 version and web2py was working ok (but AVG detected python.exe as a virus...) Regards, Raúl. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Why Logging.conf?

2013-11-22 Thread Jonathan Lundell
On 22 Nov 2013, at 11:25 AM, Perry Randall the.p.maes...@gmail.com wrote: Hey this question is mostly out of curiosity after spending the better half of an hour trying to get the python standard logging facilities working. Why must you use a logging.conf in ini format instead of a python

[web2py] Re: Estore (new!)

2013-11-22 Thread 黄祥
it seems http://web2py.com/appliances is not updated yet with appliances on github (https://github.com/mdipierro/web2py-appliances) @jim could you try to download the whole folder of estore appliance not just

Re: [web2py] Minimalist Streaming Audio (html5) app

2013-11-22 Thread 黄祥
why it's not work when i upload a video? what can i do to run the video too on the application? this is the result when i upload video :

[web2py] Re: Checkbox Value of Grid with Join Query

2013-11-22 Thread 黄祥
i think query is should be about comparation not assignment. e.g. (((block_info.json_dir_id == json_dir.id) AND (json_dir.build == 'unknown')) AND (json_dir.program == 'test')) not (((block_info.json_dir_id = json_dir.id) AND (json_dir.build = 'unknown')) AND (json_dir.program = 'test')) best

[web2py] FutureWarning from menu.py?

2013-11-22 Thread Jonathan Lundell
I see this in my logs: applications/watchup/compiled/models/menu.py:595: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. It's apparently from Element.__bool__() in lxml. What does that have to do with

[web2py] Re: AppAdmin: CSV import bug

2013-11-22 Thread Dave S
On Friday, November 22, 2013 2:49:37 AM UTC-8, Andy W wrote: Just come across the same problem - using ver 2.7.4 with pythonanywhere.comhttp://www.google.com/url?q=http%3A%2F%2Fpythonanywhere.comsa=Dsntz=1usg=AFQjCNE87nZNBtnO7Cp-WuDu5NNkjqvjrA The issue seems to be with the csv files

Re: [web2py] Minimalist Streaming Audio (html5) app

2013-11-22 Thread Massimo Di Pierro
Because your expand_all does not recognize the wmv extension. In gluon/contrib/autolinks.py there is a list of supported formats: 'mov': video, 'mpe': video, 'mp4': video, 'mpg': video, 'mpg2': video, 'mpeg': video, 'mpeg4': video, 'movie': video, try add

[web2py] Re: FutureWarning from menu.py?

2013-11-22 Thread Massimo Di Pierro
No idea. I do not believe lxml is imported by web2py. On Friday, 22 November 2013 18:30:02 UTC-6, Jonathan Lundell wrote: I see this in my logs: applications/watchup/compiled/models/menu.py:595: FutureWarning: The behavior of this method will change in future versions. Use specific

[web2py] Re: now.weekday() as string

2013-11-22 Thread Dave S
On Friday, November 22, 2013 3:52:16 AM UTC-8, Niphlod wrote: http://docs.python.org/2/library/datetime.htmlhttp://www.google.com/url?q=http%3A%2F%2Fdocs.python.org%2F2%2Flibrary%2Fdatetime.htmlsa=Dsntz=1usg=AFQjCNEXPMvuc67QJpilf3nhQJMY2ERscw On Friday, November 22, 2013 12:02:11 PM UTC+1,

[web2py] LOAD Helper ajax True produces only Loading... message.

2013-11-22 Thread James Burke
Hi, I've just upgraded to the latest release of web2py 2.7.4-stable+timestamp.2013.10.14.15.16.29 . Using a modified version of the Manage Users and Members slice found here: http://www.web2pyslices.com/slice/show/1542/manage-users-and-memebership-in-the-same-form My LOAD helper now only