Re: [web2py] Re: Mobile and Tablets detection

2013-07-21 Thread LightDot
A quick look at WURFL - looks fine, except for the license which might be problematic for some projects - AGPL v3. They offer commercial licenses too, which might solve the problem for some. Regards, Ales On Saturday, July 20, 2013 6:14:17 PM UTC+2, Christian Foster Howes wrote: > > is the WURF

[web2py] Using Custom Forms with upstream version of twitter bootstrap ( not using all default *.css web2py)

2013-07-21 Thread Rollover Cable
Hello everybody, can someone give me some light how to accomplish this kind of stuff i want to build horizontal forms from bootstrap sample ( http://twitter.github.io/bootstrap/base-css.html#forms) using sqlfom/sqlform.smartgrid i read the docs and do googling, can anyone give me some example h

Re: [web2py] ast module

2013-07-21 Thread LightDot
On Saturday, July 20, 2013 5:10:38 PM UTC+2, Jonathan Lundell wrote: > I was bitten by this (other features, not ast) just yesterday. My local > environment (OS X) has 2.7; my production environment (RHEL6) had 2.6. > Turns out that 2.6 does not support collections.Counter (no surprise there, >

[web2py] split windows with redirect?

2013-07-21 Thread lucas
hello one and all, i have a main page and when it processes the form, i want the browser to refresh and remain on that page. but i want a second window/tab to open which will show a report output of the main window. any good ideas on how to do that? lucas -- --- You received this message

[web2py] Re: Front-end dev workflow on OS X?

2013-07-21 Thread davedigerati
Thanks Massimo, the link worked perfect / Christian thanks also, had a suspicion but didn't want to explore a potential rabbit hole if I could help it;) On Thursday, July 18, 2013 11:26:48 PM UTC-4, davedigerati wrote: > > > Newbie, first app with web2py, on OS X, have tried google/group/docs an

[web2py] Re: need help testing app

2013-07-21 Thread greaneym
Thanks for testing! On Saturday, July 20, 2013 4:43:49 PM UTC-5, dhmorgan wrote: > > After installing BeautifulSoup, it ran fine. Results matched those > provided by wunderground. > > >

[web2py] Problem with SUM on DAL statement

2013-07-21 Thread Jim S
Just upgraded to latest trunk, Version 2.6.0-development+timestamp.2013.07.20.12.59.52. Having a problem with SUM statements that previously worked. If the query returns no rows, then I'm getting this traceback: Traceback (most recent call last): File "C:\dev\web2py\gluon\restricted.py", line

[web2py] Re: split windows with redirect?

2013-07-21 Thread Niphlod
a window.open with javascript maybe ? On Sunday, July 21, 2013 2:33:59 PM UTC+2, lucas wrote: > > hello one and all, > > i have a main page and when it processes the form, i want the browser to > refresh and remain on that page. but i want a second window/tab to open > which will show a report

[web2py] Prevent specific field from update

2013-07-21 Thread lesssugar
When going to update page I would like to check the value of field_X. Then, depending on its current value, field_X should be updated along with the other ones OR be excluded from upload: if db.table[id].field_X == A: #perform full update elif db.table[id].field_X == B: #update all fields

[web2py] Re: Problem with SUM on DAL statement

2013-07-21 Thread Niphlod
this should have been fixed already on the latest trunk On Sunday, July 21, 2013 3:33:51 PM UTC+2, Jim S wrote: > > Just upgraded to latest trunk, Version > 2.6.0-development+timestamp.2013.07.20.12.59.52. > > Having a problem with SUM statements that previously worked. > > If the query retur

Re: [web2py] Re: Problem with SUM on DAL statement

2013-07-21 Thread Jim Steil
Do you have a test you can run on it? None of mine are working and I just updated in the last hour. On Sun, Jul 21, 2013 at 8:48 AM, Niphlod wrote: > this should have been fixed already on the latest trunk > > > On Sunday, July 21, 2013 3:33:51 PM UTC+2, Jim S wrote: >> >> Just upgraded to

Re: [web2py] Re: Problem with SUM on DAL statement

2013-07-21 Thread Michele Comitini
There is a bug. must be None i.e. the result is not defined. I fixed the bug and I will send the PR asap db.define_table('tt', Field('aa', 'integer')) assert(db(db.tt.aa == 2).count()==0) sum = (db.tt.aa + 1).sum() assert(db(db.tt.aa == 2).select(sum).first()[sum]==0) -> AssertionError I added

Re: [web2py] Re: Problem with SUM on DAL statement

2013-07-21 Thread Jim Steil
Thanks. Really appreciate the prompt reply on a Sunday morning!! Jim On Jul 21, 2013 9:22 AM, "Michele Comitini" wrote: > There is a bug. must be None i.e. the result is not defined. > > I fixed the bug and I will send the PR asap > > db.define_table('tt', Field('aa', 'integer')) > > assert(db

Re: [web2py] Re: Problem with SUM on DAL statement

2013-07-21 Thread Michele Comitini
Warm sunday afternoon here in Italy ;-) pull request: https://github.com/web2py/web2py/pull/144 2013/7/21 Jim Steil > Thanks. Really appreciate the prompt reply on a Sunday morning!! > > Jim > On Jul 21, 2013 9:22 AM, "Michele Comitini" > wrote: > >> There is a bug. must be None i.e. the re

[web2py] bulk updates/insert

2013-07-21 Thread ssuresh
Hi, I have a table userskills with the following structure {user_id,user_skills,skill_rating}.. It can have values like {1,java,5} {1,python,6} {1,javascript,9} {2,java,3} etc For a particular user, I will show him an editable grid (jquery based) containing all his skills and ratings. He ca

[web2py] Question about @request.restful

2013-07-21 Thread Franco
Greetings everyone, I've been using request.restful to provide an restful interface to my angularjs app, i tried to post data from the angularjs app and it works, it sends the data but in the POST method i've got an empty dictionary, here is my code and some data logs: default controller @reques

[web2py] define model, required only one from two fields

2013-07-21 Thread K. Antonis Tzorvas
i have a table: db.define_table('records', Field('file', 'upload'), Field('url', 'string')) and i want either "file" or "url" to be filled, cases that both are empty or filled should not pass. any idea on how to implement this one? -- --- You received this message because you are subscribed

[web2py] cannot redefine field

2013-07-21 Thread K. Antonis Tzorvas
db.define_table('station', Field('name'), Field('country', 'string'), Field('city', 'string'), Field('records_file', 'upload'), format='%(name)s', migrate=False) db.station.name.requires = IS_NOT_IN_DB(

Re: [web2py] cannot redefine field

2013-07-21 Thread Jonathan Lundell
On 21 Jul 2013, at 11:28 AM, "K. Antonis Tzorvas" wrote: > db.define_table('station', > Field('name'), > Field('country', 'string'), > Field('city', 'string'), > Field('records_file', 'upload'), > format='%(name)s', >

Re: [web2py] cannot redefine field

2013-07-21 Thread K. Antonis Tzorvas
you are right, forgotten about the .requires part :/ thanks! On Sunday, July 21, 2013 9:32:15 PM UTC+3, Jonathan Lundell wrote: > > On 21 Jul 2013, at 11:28 AM, "K. Antonis Tzorvas" > > > wrote: > > db.define_table('station', > Field('name'), > Field('country', 's

[web2py] Re: Is there an issue with my web2py install? "can't pickle function objects"

2013-07-21 Thread Joe Magaro
Hi. I have another issue,and in researching it i'm wondering if this is somewhat related to having 2 or more domains served from web2py? On Tuesday, July 16, 2013 10:44:46 PM UTC-4, Joe Magaro wrote: > > Hi, Lately when I'm in the admin section, when I perform an action such as > installing a n

[web2py] Re: Using a recursive select but encountered a broken reference

2013-07-21 Thread Joe Magaro
Hi, Im also having the same issue, and the fix above seemed to work -- I'm wondering if there is an official fix for this? On Saturday, March 2, 2013 2:55:17 PM UTC-5, Marin Pranjić wrote: > > This happened to an user multiple times. No idea why it happens. > > Error ticket doesn't show much, th

[web2py] Re: bulk updates/insert

2013-07-21 Thread Niphlod
unless you're updating the corresponding rows whenever the user clicks on it, deleting them all and then reinserting them it's one of the two ways to go. I'd just "vote" for update_or_insert() if you're concerned about keeping the same original ids as long as the user doesn't modify those, but

[web2py] offtopic : beuatiful code

2013-07-21 Thread Niphlod
I actually skipped over this a few times and today I finally reached its place in my playlist for free time... sorry if you seen it before, but I actually learned at least 5 things out of it that I really didn't know of. https://www.youtube.com/watch?v=OSGv2VnC0go if you want slides https

[web2py] Re: need help testing app

2013-07-21 Thread Massimo Di Pierro
Thank you margaret. Will test it asap. Massimo On Saturday, 20 July 2013 16:18:10 UTC-5, greaneym wrote: > > Hello, > > I would like to share an app with the web2py community, and also am asking > for help testing it. > > https://github.com/greaneym/weather > > It needs more work but please feel

[web2py] Re: Prevent specific field from update

2013-07-21 Thread Massimo Di Pierro
How about this? record = db.table[id] newfieldvalues = {'field_X':'value', } if record.field_X == 'B': del newfieldvalues['field_X'] record.update_record(**newfieldvalues) if db.table[id].field_X == A: #perform full update elif db.table[id].field_X == B: #update all fields except field

Re: [web2py] Re: Problem with SUM on DAL statement

2013-07-21 Thread Jim Steil
That fixed it. Thanks again. Enjoy the weather while you can. Here in Wisconsin, the summer goes by too quickly. On Sun, Jul 21, 2013 at 9:57 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > Warm sunday afternoon here in Italy ;-) > > pull request: https://github.com/web2py/web2py/

[web2py] Serializers Error?

2013-07-21 Thread Auden RovelleQuartz
Does anyone know what the following error means? { Ticket ID 70.92.230.24.2013-07-22.00-17-44.194ba64e-ab76-48e6-9d4c-935bedce8cf2 'module' object has no attribute 'serializers'Versionweb2py™Version 2.5.1-stable+timestamp.2013.06.06.15.39.19PythonPython 2.7.3: /usr/bin/python (prefix: /usr)T

[web2py] Re: define model, required only one from two fields

2013-07-21 Thread Massimo Di Pierro
def index(): if 'file' in request.var: db.records.url.requires=IS_NOT_EMPTY() else: db.records.file.requires=IS_NOT_EMPTY() form = SQLFORM(db.records) On Sunday, 21 July 2013 13:11:40 UTC-5, K. Antonis Tzorvas wrote: > > i have a table: > > db.define_table('records', Field('fi

Re: [web2py] ast module

2013-07-21 Thread Jonathan Lundell
On 21 Jul 2013, at 5:07 AM, LightDot wrote: > I suggest looking into RHEL Software Collections, which were created to solve > this exact problem. They allow you to install newer versions of software in > rpm safely into /opt and switch between new and old releases. This allows > your RHEL syste

[web2py] Re: Front-end dev workflow on OS X?

2013-07-21 Thread Tim Richardson
Using the source is really easy and definitely the way to go once you've got your feet under the desk. Python even comes with OS X, although go to python.org and update it perhaps. I use OS X and I can't even remember the 'app' version. You just go into a terminal, cd to the folder where you h

[web2py] Re: Errors in form, please check it out....... HOW?

2013-07-21 Thread REM
Crucially, one needs to remain aware of this passage from the manual: *"When you upload an application, you need to specify a name for it (using different names allows you to install multiple copies of the same application)"* This is the root of the problem I was having and, probably, you too.

[web2py] Re: Editor broken in trunk (07-18-13) on FF 23

2013-07-21 Thread Tim Richardson
On trunk, OS x 10.8.3 and Firefox 23 it works fine for me. -- --- 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 o

[web2py] [web2pyy] Mysql 2 Mongodb

2013-07-21 Thread Mike Veltman
I am just playing around with mongodb and web2py I noticed that when I just make a web2py dump of my mysql db and then upload it to mongodb some of the "joins" now just rec id's are right and some are newly generated. Also would it be possible to keep id to be web2py specific and to use _id f

[web2py] Pass helpers in variable to views

2013-07-21 Thread shapovalovdenis
Hi! Know that I missing something obvious here, but still: I store parts of page to be displayed in db, in html code, and return it to view, so content from db is in content_block var: def get_block(): [some other code] content_block = XML("h1> Some Title ", sanitize=False