[web2py] gluon.main not part of Windows installation

2013-04-21 Thread mkerins
I'm trying to run my web2py app behind Apache on Windows, however, when Apache loads wsgihandler.py and tries to execute the line: import gluon.main it fails with the error: [Sun Apr 21 00:27:54 2013] [error] [client 127.0.0.1] mod_wsgi (pid=1644): Target WSGI script 'C:/Documents and

[web2py] db select with rows

2013-04-21 Thread BlueShadow
I can't get my head around this problem it's probably easy but I ask anyway: I got rows(lets call them rowsA) from tableA and I want to select all items from another tableB which have one of the ids in tableA I could do it with a for loop selecting one at a time like so: for row in rowsA:

[web2py] Re: db select with rows

2013-04-21 Thread Paolo valleri
You get the last element simply because in the loop you have an assignment. So that you will get only the last element of the loop. What about that: rows = db(db.tableA. http://db.tableb.id/id_b==db.tableB.idhttp://row.id/ ).select(db.tableB.ALL) or temp = [] for row in rowsA:

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-21 Thread Neil
I'm having this problem now - is there a trick to having two ajax forms on one page? Basically, as above, I have to hit submit twice for anything result. Has anyone successfully had 2+ ajax forms on the same page? On Wednesday, 21 July 2010 08:37:54 UTC+1, mdipierro wrote: will look into

[web2py] Re: hostmonster, pythonanywhere, or gae for my current situation

2013-04-21 Thread Harry Percival
I'm sorry we didn't quite get there in time to help you out! A few answers, for future reference, in case anyone else has similar problems: I think Brian had the right answer to why you were having problems with bitbucket/mercurial, it will create a folder for you unless you give it a

[web2py] Re: gluon.main not part of Windows installation

2013-04-21 Thread Niphlod
did you download the source code version, right ? the archive at http://www.web2py.com/examples/static/web2py_src.zip has gluon/main.py On Sunday, April 21, 2013 8:12:43 AM UTC+2, mke...@halstead.com wrote: I'm trying to run my web2py app behind Apache on Windows, however, when Apache

[web2py] Re: How to write a full query for IS_IN_DB validator?

2013-04-21 Thread Niphlod
look here http://web2py.com/books/default/chapter/29/07#Database-validators there are snippets that shows you how you can pass a query to the IS_IN_DB validator On Sunday, April 21, 2013 7:19:53 AM UTC+2, Alex Glaros wrote: What is the syntax for a full query for IS_IN_DB? In the example

[web2py] Re: How to write a full query for IS_IN_DB validator?

2013-04-21 Thread Alex Glaros
Thanks Simone, That solves part of what I need but what is the syntax for selecting the current record's related records? I tried this but it doesn't work: dataBelongingToUserOnly = db(db.PartyEmailIntersection.partyID==db.PartyDefaultInfo.partyID) thanks, Alex On Saturday, April 20, 2013

[web2py] smartgrid orderby descending

2013-04-21 Thread Jake Lowen
In a normal grid the orderby descending works just fine: grid = SQLFORM.grid(db.meetings, orderby=~db.meetings.meeting_date, ) But I can't get the parent table of a smart group to sort the same way: grid = SQLFORM.smartgrid(db.meetings, linked_tables=['meeting_docs'],

[web2py] Re: gluon.main not part of Windows installation

2013-04-21 Thread mkerins
Thanks. No, since I was on Windows I was only developing with binaries and didn't know I needed source files as well - didn't see that in the book... I downloaded the src files and do see gluon/main.py now. So, in wsgihandler.py do I now change import gluon.main to import main.py? I tried

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-21 Thread Massimo Di Pierro
I opened an issue and will check later today: https://code.google.com/p/web2py/issues/detail?id=1457thanks=1457ts=1366557484 On Sunday, 21 April 2013 04:03:06 UTC-5, Neil wrote: I'm having this problem now - is there a trick to having two ajax forms on one page? Basically, as above, I have

[web2py] Re: gluon.main not part of Windows installation

2013-04-21 Thread mkerins
One more note: it seems like there must be more configuration steps involved for Windows setup than are documented. In addition to changes in wsgihandler.py, it looks like utils.py also has to be modified. It is looking for files in the unix directory structure which are named differently in

[web2py] Re: Old DAL bug (?) ValueError: invalid literal for int() with base 10: 'AssetTypes\\Character.png'

2013-04-21 Thread Arnon Marcus
On Thursday, April 18, 2013 4:53:30 PM UTC+3, Massimo Di Pierro wrote: That is a very old version of web2py. It is hard to support something so old. you should be able to upgrade and nothing should break. The only case I have seen something like this is when a string field contained data

Re: [web2py] Re: REF: Displaying a Virtual Field in SQLFORM.grid throws an exception....

2013-04-21 Thread Jurgis Pralgauskis
Hi, probably, virtual fields can be injected somewhere in: https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L1931 https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2242 https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2322 ps.: For virtual fields, one

[web2py] SQLFORM add a second custom submit button

2013-04-21 Thread lucas
hello one and all, working on a custom SQLFORM. i use the form.custom.submit to display it in the view and when it is pressed it properly updates that record in the databse. good. now i want to add a second custom button that will also still update the fields to the proper record and then do

[web2py] Re: gluon.main not part of Windows installation

2013-04-21 Thread Anthony
Although web2py is generally easy to use and set up, it does assume some knowledge of Python, so you might want to learn a little more Python before proceeding. In Python, dots within the name of an imported module do in fact indicate a hierarchy of directories -- so, for example, import

Re: [web2py] Re: REF: Displaying a Virtual Field in SQLFORM.grid throws an exception....

2013-04-21 Thread Jurgis Pralgauskis
for now the workaround might be manipulating generated html table like https://groups.google.com/d/msg/web2py/BmbIlkWYZVo/hccT2JQCUp0J you need to know id of records - so you could get info for calculating virtual field, so instead : fields=[db.product.name, db.product.cost,

[web2py] Re: Multiples ajax forms (with LOAD). It is possible?

2013-04-21 Thread Anthony
Probably both forms have the same formname, either because they are both based on the same DAL table or because they are both SQLFORM.factory forms. To avoid the problem, assign unique formnames to each via .process(formname='myform1'), etc. This is discussed in the book:

[web2py] Re: smartgrid orderby descending

2013-04-21 Thread Anthony
I believe the keys of the orderby dict should be the actual table names, not the literal keys parent and child. Anthony On Sunday, April 21, 2013 10:47:59 AM UTC-4, Jake Lowen wrote: In a normal grid the orderby descending works just fine: grid = SQLFORM.grid(db.meetings,

Re: [web2py] Re: RESTful api and JSON POST data with curl

2013-04-21 Thread Michele Comitini
Brent, you can read the raw body of a POST using the variable request.body mic 2013/4/19 Brent Zeiben bzei...@tuheadz.com Ok Thanks Niphlod Thought I could use json to prepare the data, using urllib.urlencode on the dictionary instead. Didn't have to change the curl command. Thanks

[web2py] Re: The Great Web Framework Shootout

2013-04-21 Thread OJ
The application was copied from https://github.com/seedifferently/the-great-web-framework-shootout/issues/14 ... Please point me some performance problems and I'll fix and re-run the tests. .oj On Wednesday, April 17, 2013 1:05:35 AM UTC+3, Derek wrote: Seems a bit low, but no way to

[web2py] Returning gzipped content, generic.json.gz ?

2013-04-21 Thread Vincent
Hi, I want to return gzipped json content (although the json part is not really important). I did some googling and found this post which is somewhat related, https://groups.google.com/d/msg/web2py/cgSrsC73vzg/ZNYN3u7ChVwJ as far as I could tell the minify part of the question was answered

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-21 Thread Ricardo Pedroso
You can not blindly gzip your data unless you control the clients. It's the client that tells if it can accept gzip content or not, and the web server will choose to gzip it or not. I will advice you to let this to the web server. But if you really want to gzip yourself, than you should take

[web2py] THUMB function in contrib - bug

2013-04-21 Thread Tito Garrido
Hi Folks, I was trying to use THUMB function following Bruno's tutorial for python RQ and I got: File /root/web2py/gluon/contrib/imageutils.py, line 54, in THUMB img = Image.open(request.folder + 'uploads/' + image) File /usr/lib/python2.7/dist-packages/PIL/Image.py, line 1952, in open

Re: [web2py] THUMB function in contrib - bug

2013-04-21 Thread Ricardo Pedroso
On Sun, Apr 21, 2013 at 10:35 PM, Tito Garrido titogarr...@gmail.com wrote: Hi Folks, I was trying to use THUMB function following Bruno's tutorial for python RQ and I got: File /root/web2py/gluon/contrib/imageutils.py, line 54, in THUMB img = Image.open(request.folder + 'uploads/' +

Re: [web2py] THUMB function in contrib - bug

2013-04-21 Thread Tito Garrido
I have fixed it adding '/uploads/', this way also works, but it needs to be fixed in contrib, I guess Massimo can do that. Regards, Tito On Sun, Apr 21, 2013 at 6:45 PM, Ricardo Pedroso rmdpedr...@gmail.comwrote: On Sun, Apr 21, 2013 at 10:35 PM, Tito Garrido titogarr...@gmail.com wrote:

[web2py] app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-21 Thread BlueShadow
Hi, I was developping my app for the last couple weeks directly on my server. now for my new functions I wanted some easy tests like using the print command and see it directly^^ So I package the app and put it on my windows PC (web2py 2.4.6-stable same as on Server (not the compiled version:

Re: [web2py] app behaves radically diffrent on home PC (Windows) than on server(linux)

2013-04-21 Thread Ricardo Pedroso
On Sun, Apr 21, 2013 at 10:56 PM, BlueShadow kevin.bet...@gmail.com wrote: Hi, I was developping my app for the last couple weeks directly on my server. now for my new functions I wanted some easy tests like using the print command and see it directly^^ So I package the app and put it on my

[web2py] Re: Smartgrid drop-down field orderby

2013-04-21 Thread James Burke
Thanks Anthony, although thinking about it... it might be easier just to use a date field with a date picker. -- --- 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

[web2py] web2py chat example

2013-04-21 Thread Ricardo Pedroso
Due to a recent discussion about async in web2py I made an example web2py app based on tornado long polling chat example. The only requirement is to run it with gevent. Can be done with anyserver.py shipped with web2py. You can grab it here: https://github.com/rpedroso/w2pchat Ricardo --

[web2py] Re: SQLFORM add a second custom submit button

2013-04-21 Thread Limedrop
Ideally something like this will work for you... def test_form(): form = SQLFORM(db.table, buttons = [INPUT(_type='Submit', _name='submit1', _value='Submit1'), INPUT(_type='Submit', _name='submit2', _value='Submit2')]) if form.accepts(request): if

[web2py] Re: Autocomplete, Tag_list, Multiple field suggestions, and validate against that list.

2013-04-21 Thread funmanhk
Hi Massimo, Thanks for providing the advices. I've downloaded the plugin, and trying it out. When i tried to call on the plugin_social, i got a ticket. There is a mention in the /models/plugin_social/plugin_social.py To use this plugin you need a database called db, you need auth File

[web2py] Can't insert data on PostgreSQL/Heroku

2013-04-21 Thread Vixus
My app is deployed on Heroku using the PostgreSQL db. No issues with running the app, everything seems to be working. Except for the following: I have some initial data that is entered when my database is initialised (ie. when all the tables are empty). This code is in a model and basically is:

Re: [web2py] Returning gzipped content, generic.json.gz ?

2013-04-21 Thread Vincent
Hi Ricardo, in this case I do control the clients. The scientific data would be on an intranet and would only really make sense to the a specialized client. So apart from having appropriate headers I just need to write the json.dumps and gzip myself? There is no functionality already

[web2py] Re: Can't insert data on PostgreSQL/Heroku

2013-04-21 Thread Massimo Di Pierro
How are you connecting to the database? On Sunday, 21 April 2013 18:49:28 UTC-5, Vixus wrote: My app is deployed on Heroku using the PostgreSQL db. No issues with running the app, everything seems to be working. Except for the following: I have some initial data that is entered when my

[web2py] Re: Old DAL bug (?) ValueError: invalid literal for int() with base 10: 'AssetTypes\\Character.png'

2013-04-21 Thread Massimo Di Pierro
Nothing depends on sql.py. You can do what you say. On Sunday, 21 April 2013 11:23:37 UTC-5, Arnon Marcus wrote: On Thursday, April 18, 2013 4:53:30 PM UTC+3, Massimo Di Pierro wrote: That is a very old version of web2py. It is hard to support something so old. you should be able to

[web2py] Re: Can't insert data on PostgreSQL/Heroku

2013-04-21 Thread Vixus
from gluon.contrib.heroku import get_db db = get_db(name=None, pool_size=10) On Monday, April 22, 2013 1:51:31 AM UTC+1, Massimo Di Pierro wrote: How are you connecting to the database? On Sunday, 21 April 2013 18:49:28 UTC-5, Vixus wrote: My app is deployed on Heroku using the PostgreSQL

[web2py] Re: Can't insert data on PostgreSQL/Heroku

2013-04-21 Thread Massimo Di Pierro
Can you explain what you experience? Get a ticket? Data is not inserted? Data is inserted and disappears? Do you have more than one database? Have you tried replace name=None with name= the database name assigned by heroku? Massimo On Sunday, 21 April 2013 18:49:28 UTC-5, Vixus wrote:

[web2py] Re: SQLFORM add a second custom submit button

2013-04-21 Thread lucas
thanx, i am going to use that code. why is it browser version dependent? what is that special quality that is required in the browser to properly execute the above code? thanx again. lucas -- --- You received this message because you are subscribed to the Google Groups web2py-users