[web2py] Re: When and how to use command line option -f FOLDER?

2010-05-15 Thread Iceberg
On May15, 11:08am, Jonathan Lundell wrote: > On May 14, 2010, at 11:27 AM, Iceberg wrote: > > > Turns out that the fix [1] is not completed. Most apps work when using > > "web2py -f another_web2py_folder", but not those contains > > local_import('my_module', app='my_app'). > > > Should be easy to

[web2py] Re: jqgrid onSelectRow refresh iframe

2010-05-15 Thread Jason Lotz
Yes I got it working. Using the jqgrid_plugin, very nicely prepared by parroit, I added an onSelectRow event to trigger the reload of an iframe on the same page. The id of the selected row is posted as args to the url. The controller function then uses the row_id to update the view shown in the ifr

[web2py] [SOLVED] Re: jqgrid onSelectRow refresh iframe

2010-05-15 Thread Jason Lotz
On May 15, 6:42 pm, Jason Lotz wrote: > Yes I got it working. Using the jqgrid_plugin, very nicely prepared by > parroit, I added an onSelectRow event to trigger the reload of an > iframe on the same page. The id of the selected row is posted as args > to the url. The controller function then us

[web2py] Re: PGP Mail

2010-05-15 Thread szimszon
Agree :) It was late night as I code it. It's not fully tested but it should work. So any tests are welcome :) And you need python-pyme and gpgme libs but it's imported only as it is needed. On máj. 15, 07:12, Iceberg wrote: > On May15, 10:39am, Massimo Di Pierro wrote: > > > > > > > Thanks to

Re: [web2py] Re: large sites/application.

2010-05-15 Thread Thadeus Burgess
Yes, web2py runs fine with 50 models. And this is awesome if your just dealing with one application What gets messy is when you have two applications, which depend on each others models. You end up having to stick the common models in a module, and importing it, but now you have three places

[web2py] Re: large sites/application.

2010-05-15 Thread Iceberg
Just some thought. What if we could somehow change app1's model into a module, automatically? For example app1/models/__init__.py # Add this And then append this into your app1/models/db.py: __all__ = [ 'what', 'you', 'wanna', 'share' ] # This might not be necessary Havn't tried it. But i

Re: [web2py] Re: large sites/application.

2010-05-15 Thread Thadeus Burgess
So I have to execute it with this craziness from applications.app1 import myModel Its crazy because this whole design principle breaks when dealing with external scripts. -- Thadeus On Sat, May 15, 2010 at 6:23 AM, Iceberg wrote: > Just some thought. What if we could somehow change app1's

[web2py] integer range select box

2010-05-15 Thread Richard
I want the user to select an integer between a certain range (their birth year) . IS_INT_IN_RANGE provides the restriction but uses an input box - how can I get SQLFORM to use a select box for this integer range? Richard

[web2py] Re: Routes.py on GAE

2010-05-15 Thread Chris S
I've updated my code and run it again. Sorry for the delay last time I downloaded a web2py trunk it was in Subversion. While it didn't take me long to get it in Mercurial it did trigger a lot of Subversion/ Mercurial/Git research simply because I had not heard of them before :P New error log: --

[web2py] Re: Routes.py on GAE

2010-05-15 Thread Chris S
Apparently it doesn't copy/paste correctly. The second routes.py that I used kept the entire routes_in in a single line. On May 15, 10:00 am, Chris S wrote: > I've updated my code and run it again.  Sorry for the delay last time > I downloaded a web2py trunk it was in Subversion.  While it didn'

[web2py] Re: PGP Mail

2010-05-15 Thread mdipierro
The send method does not specify the sender account. mail.settings.sender does. That is why I think these settings also belong there. On May 15, 12:12 am, Iceberg wrote: > On May15, 10:39am, Massimo Di Pierro wrote: > > > > > Thanks to szimszon we have PGP in Mail (trunk only) > > > mail.send( >

[web2py] Re: integer range select box

2010-05-15 Thread Jose
On 15 mayo, 10:58, Richard wrote: > I want the user to select an integer between a certain range (their > birth year) . IS_INT_IN_RANGE provides the restriction but uses an > input box - how can I get SQLFORM to use a select box for this integer > range? > > Richard This helps you? .requires =

[web2py] Re: large sites/application.

2010-05-15 Thread mdipierro
The current design is motivated by two principles: 1) each app should be able to be packed and moved independently 2) if multiple apps access the same db, at least one of the should be clearly in charge of migrations 3) even if two apps access the same db table(s) it is not obvious they need to see

[web2py] Re: Custom form renderings and attributes

2010-05-15 Thread Oatman
Sorry to hijack the thread somewhat, but where can I find out how to use blobstore simply to upload large files with web2py? Thanks, Tris On May 4, 1:41 am, mdipierro wrote: > You can do > > form = SQLFORM(db.artwork, request.args[0], fields=fields, >                    upload=URL(r=request, c='

[web2py] now the value from a variable

2010-05-15 Thread kike
Hi, I have a form with a file called name and storage the value of that field in f.vars.name, when I search I return the SQLTABLE with the result in f.vars.data. the variable data contain name,age,sex. My problems is in the view, I want call a value from data separately, for example I need call age

Re: [web2py] Re: JqGrid Plugin

2010-05-15 Thread Tito Garrido
This is the best plugin ever! Is there a way to customize the language? I've installed here and seems to be using italian... Also can we set the Grid title and columns names? Regards, Tito On Fri, May 14, 2010 at 10:53 AM, AsmanCom wrote: > @Andrea > > Your plugin is absolutely awesome, that´

[web2py] Re: JqGrid Plugin

2010-05-15 Thread mdipierro
I am sure there is a way because it containsan i18n folder. Page http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options says "In our tutorial, we see that jqGrid should load the appropriate language file in order to work properly. This file is used in all modules and the main purpose is to ha

Re: [web2py] Re: When and how to use command line option -f FOLDER?

2010-05-15 Thread Jonathan Lundell
On May 15, 2010, at 12:46 AM, Iceberg wrote: > Mysteriously, using sys.path.insert(...) rather than > sys.path.append(...) does help. But I just don't understand. I used to > think that the build-in import statement always goes through all > folders inside sys.path, one by one, so in theory it doe

[web2py] crud.select and links

2010-05-15 Thread Jose
Hi, When I use crud.select (...), if I pass the argument fields, break the link id field. This shows the values ids to link. rows = crud.select(my_table, query=query, ..., linkto=URL(r=request, f='read')) This will only values, but without link rows = crud.select(my_table, query=query, fields=f

[web2py] Re: integer range select box

2010-05-15 Thread Iceberg
On May15, 11:14pm, Jose wrote: > On 15 mayo, 10:58, Richard wrote: > > > I want the user to select an integer between a certain range (their > > birth year) . IS_INT_IN_RANGE provides the restriction but uses an > > input box - how can I get SQLFORM to use a select box for this integer > > range?

Re: [web2py] Re: PGP Mail

2010-05-15 Thread Thadeus Burgess
I think mail.settings. If you have multiple sends that get different PGP keys, you can always change mail.settings in between function calls -- Thadeus On Sat, May 15, 2010 at 10:12 AM, mdipierro wrote: > The send method does not specify the sender account. > mail.settings.sender does. T

Re: [web2py] Re: large sites/application.

2010-05-15 Thread Thadeus Burgess
I agree with this. It comes to using the right tool for the job. Web2py is just a tool, and an excellent one if your working with one application. Other systems are better designed for multiple apps, and if thats what you need then you should use them for the job. Web2py is great for large sites/

[web2py] Re: integer range select box

2010-05-15 Thread Jose
> > Why bother the [x for x in ...] ?  Just do >     requires = IS_IN_SET(range(1, 4)) You are right Jose

[web2py] Testing an upload function

2010-05-15 Thread Mathieu Clabaut
Hello, I'd like to test an upload function in my default controller (I use Thadeus testrunner from web2py_utils). I wonder what object I shall put in my request.post_vars.file where 'file' is the upload field ? Apparently it should have a 'filename' attribute and a read method ? Any tip on h

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
After spending some time with Firebug to find and fix a couple of typos, I've got it working now. There seems to be no way around explicitly referring to the SPAN element (see below), but I can live with that. Now I need to tackle the next level, which is to expand the server- side JSON function

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
After spending some time with Firebug to find and fix a couple of typos, I've got it working now. There seems to be no way around explicitly referring to the SPAN element (see below), but I can live with that. Now I need to tackle the next level, which is to expand the server- side JSON function

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
For multiple elements you might want to try and put it into a jQuery plugin, allowing you to re-use the code for each sparkline. $(".spark").makeSparkline({url:/path/to/call/sparkdata, args:etc}); -- Thadeus On Sat, May 15, 2010 at 1:34 PM, MikeEllis wrote: > > After spending some time with

Re: [web2py] Re: Auth not showing all my custome feilds... [SOLVED]

2010-05-15 Thread Jason Brower
With a bit of effort I rebuilt it to work by meerging my code with the documentation found in the manual. Ish... lots of work... but for the sake of showing it to others, here you go. Thank you for the book. It was the big saver in all this. --- BR, Jason On Wed, 2010-05-12 at 21:05 -0700, mdipie

[web2py] Error with template.py from revision e9e41cce0c onwards.

2010-05-15 Thread Praneeth
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, The lines 291 through 293 of gluon/template.py check for the string 'return' in line. This misinterprets the javascript returns present in the line as those of python and unindents the next lines in the template, Causing a problem when the

Re: [web2py] Testing an upload function

2010-05-15 Thread Thadeus Burgess
I attempted to solve this by inserting data into the request environment, including the form name, however I did not have any luck.. I would use WebTest for file upload testing instead, however you will need to use a mixture of webtest and new_env(), this is because you need to get the unique _for

[web2py] Re: Custom form renderings and attributes

2010-05-15 Thread howesc
for blobstore usage i followed (more or less) the steps here: http://web2pyslices.com/main/slices/take_slice/63. i added my tweaks to the process in the comments (as cfhowes) good luck! cfh On May 15, 8:47 am, Oatman wrote: > Sorry to hijack the thread somewhat, but where can I find out how to

Re: [web2py] Error with template.py from revision e9e41cce0c onwards.

2010-05-15 Thread Thadeus Burgess
Ah, this is quite a nasty bug to fix :) Originally we just looked if the line started with return, however the following line of code would then fail... {{ if True: return }} I sent a patch to Massimo, would you mind testing again when he applies it? -- Thadeus On Sat, May 15, 2010 at 3:06

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
Thanks, Thaddeus. That's a good suggestion. It turns out my case can be simplified considerably by using explicit id's for the sparklines, e.g. $(function() { $(this).everyTime(1000,function(i) { $.getJSON('/peertool/sparkline/call/json/sparkdata/ 13/0/20', function(data)

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
Would you make a web2pyslice of this with some screenshots? Looks like great work. -- Thadeus On Sat, May 15, 2010 at 5:09 PM, MikeEllis wrote: > Thanks, Thaddeus.  That's a good suggestion. It turns out my case can > be simplified considerably by using explicit id's for the sparklines, > e.

[web2py] Re: crud.select and links

2010-05-15 Thread mdipierro
In the second case, does the list of fields include db.table.id? On May 15, 11:32 am, Jose wrote: > Hi, > > When I use crud.select (...), if I pass the argument fields, break the > link id field. > > This shows the values ids to link. > rows = crud.select(my_table, query=query, ..., linkto=URL(r=

[web2py] Re: integer range select box

2010-05-15 Thread Richard
thanks for that. I found if the range includes negative numbers such as IS_IN_SET(range(-5, 6), zero=None), and the field value is 0, then SQLFORM will select the first entry (-5) rather than 0. On May 16, 2:46 am, Iceberg wrote: > On May15, 11:14pm, Jose wrote: > > > On 15 mayo, 10:58, Richa

[web2py] Re: integer range select box

2010-05-15 Thread mdipierro
you have to add db.table.field.default=0 On May 15, 9:26 pm, Richard wrote: > thanks for that. > > I found if the range includes negative numbers such as > IS_IN_SET(range(-5, 6), zero=None), and the field value is 0, then > SQLFORM will select the first entry (-5) rather than 0. > > On May 16, 2

[web2py] Re: ORM-like DAL

2010-05-15 Thread ionel
I had worked for an ORM for Web2py. I'm not a python programmer but I like Web2py very much and I try to do my best. Anyway, because I don't have much experience with python I decided to show my work, maybe somebody can help and make something usable. http://code.google.com/p/web2pyorm/ The modul

Re: [web2py] Re: bug in dal.py _first() and SQLFORM ._tablename

2010-05-15 Thread Thadeus Burgess
More DAL testing... It is interesting, in that the first time the dal.py code is executed everything works just fine, however on the very next request I receive this trackback. http://paste.pocoo.org/show/214476/ sql.py works just fine for many requests. I am obviously using the dal in an envir

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
Done. See http://www.web2pyslices.com/main/slices/take_slice/79 On May 15, 8:44 pm, Thadeus Burgess wrote: > Would you make a web2pyslice of this with some screenshots? Looks like > great work. > > -- > Thadeus > > On Sat, May 15, 2010 at 5:09 PM, MikeEllis wrote: > > Thanks, Thaddeus.  That's

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
Nice :) -- Thadeus On Sat, May 15, 2010 at 10:50 PM, MikeEllis wrote: > Done.  See http://www.web2pyslices.com/main/slices/take_slice/79 > > On May 15, 8:44 pm, Thadeus Burgess wrote: >> Would you make a web2pyslice of this with some screenshots? Looks like >> great work. >> >> -- >> Thadeus

[web2py] Re: nightly built

2010-05-15 Thread Iceberg
On Apr17, 1:17pm, mdipierro wrote: > Please check it: > http://web2py.com/examples/static/nightly/web2py_src.zip http://web2py.com/examples/static/nightly/web2py_win.zip http://web2py.com/examples/static/nightly/web2py_osx.zip > > -- Just an idea. Why not put this download links inside http://

[web2py] web2py 1.78.1 is OUT

2010-05-15 Thread mdipierro
Please check it changelog - new template system allows {{block name}}{{end}}, thanks Thadeus - fixed mime headers in emails, included PGP in emails, thanks Gyuris - automatic database retry connect when pooling and lost connections - OPTGROUP helper, thanks Iceberg - web2py_ajax_trap captures all

[web2py] Re: nightly built

2010-05-15 Thread mdipierro
will do On May 16, 12:11 am, Iceberg wrote: > On Apr17, 1:17pm, mdipierro wrote:> Please check it: > > http://web2py.com/examples/static/nightly/web2py_src.zip > > http://web2py.com/examples/static/nightly/web2py_win.zip > > http://web2py.com/examples/static/nightly/web2py_osx.zip > > > > > -- >

[web2py] Re: When and how to use command line option -f FOLDER?

2010-05-15 Thread Iceberg
On May15, 3:46pm, Iceberg wrote: > @Massimo, thanks for your latest attempt, but it should be adjusted as > below. And please also keep the comment which is valuable also. > >   sys.path.insert(0, path) # somehow it need to be ahead of cwd > Hi Massimo, the latest 1.78.1 solves the problem, well,

Re: [web2py] web2py 1.78.1 is OUT

2010-05-15 Thread Jason Brower
Oh fun. But waht OPTGROUP, and block name/end stuff do? How do I use it? Best Regards, Jason On Sat, 2010-05-15 at 22:14 -0700, mdipierro wrote: > Please check it > > changelog > - new template system allows {{block name}}{{end}}, thanks Thadeus > - fixed mime headers in emails, included PGP in