[web2py] Re: Passing arg from view to controller.

2012-02-21 Thread Annet
Hi Anthony, Thanks for your reply. $(function() { $(#no_table_locality_args).autocomplete({ source: {{=URL('hubaddressbook', 'locality_args_autocomplete')}} + / + $(select#no_table_word).val(), I tried the above, which made the view's JavaScript invalid, I had to add '' to make it

[web2py] Re: Validate the Checkbox

2012-02-21 Thread whowhywhat
also TR(Type:,TD(INPUT(_type=checkbox,_name=options,_value=a,_size=0,requires = IS_NOT_EMPTY(error_message=Please select at least one check-box)), A ... to have your required error message Please check out the excellent web2py documentation for forms and validators

[web2py] Re: BELONGS is not supported on GAE?

2012-02-21 Thread Peter G.
Hmm, if that's the case, can someone recommend a viable alternative to perform what I'm trying to do with an operation that works under GAE? On Feb 20, 11:09 pm, guruyaya guruy...@gmail.com wrote: I think inner select belongs are not supported by GAE, but using an array, is. Can anyone confirm

[web2py] How to optimize the output typography of blocks in web2py views?

2012-02-21 Thread chinakr
The block instructions in web2py will cause extra blank lines in final HTML, which are useless and ugly in HTML source code. e.g. with {{block head}} {{end}} we will get two extra blank lines in final HTML. Demo: http://www.haijia.org/ In the source code of the page, Line 13 and line 15 are the

[web2py] $.ajax : how to parse data sent to the controller

2012-02-21 Thread Vineet
Earlier i was using ajax() function. But since it is not possible to send js array or json object, I am trying $.ajax function. --- View --- var jsonObjects = [{id:1, name:amit}, {id:2, name:ankit},{id:3, name:atin},{id:1, name:puneet}]; $.ajax({ url: {{=URL('myControllerName')}},

[web2py] Re: BELONGS is not supported on GAE?

2012-02-21 Thread BrendanC
I've just started looking Web2py and the Google App Engine - here is some research you might find useful. While this does not relate directly to Web2py it's worth reading/reviewing as it illustrates some gae fundamentals.

Re: [web2py] Re: Validate the Checkbox

2012-02-21 Thread Sanjeet Kumar
I got it but you are putted here the same name of the check box through which we can validate the multiple checkbox eaisly but here i want the value of the different check box in different variables for checking the multiple conditions. such as qury=db((db.employee.name==a ) | (db.employee.name==b

[web2py] Hide the Links based on Permission

2012-02-21 Thread Sanjeet Kumar
I am using the same layout for the Admin and Client but i want to hide some links for the clients in my page based on the permissions

[web2py] Re: crontab sytax

2012-02-21 Thread Wikus van de Merwe
I say the book works just fine: http://web2py.com/book/default/chapter/04#Cron The syntax you want to use is: @reboot * * * * root *applications/test/controllers/private.py Set that in your app/cron/crontab and make sure your controller does db.commit() at the end. Also you need SOFTCRON =

[web2py] Re: Validate the Checkbox

2012-02-21 Thread Wikus van de Merwe
The easiest way to do that is rely on web2py model - form transformation and use a validator (instead of the custom form). model -- MY_OPTIONS = [a,b,c] db.define_table(my_table, db.Field(my_options, list:string, default=MY_OPTIONS))

[web2py] Re: How to optimize the output typography of blocks in web2py views?

2012-02-21 Thread Wikus van de Merwe
You can do tricks like that, but it does not have the best readability: {{ for i in range(10): }} p text {{=i}} text /p {{ pass }}

Re: [web2py] Re: Web2py Code University and Officaial Certify Training

2012-02-21 Thread Kanthi Narisetti
I appreciate your thoughts. I would suggest an online course(on Google+), tutorials involving some real time projects. Also we can take advantage of google hangouts etc to make it more interactive. I have been working on building a web development team for my friends startup and I face the same

[web2py] I save content of textarea into db.doc following,

2012-02-21 Thread web2py_lover
I save content of textarea into db.docas following, db.define_table('doc', Field('title'), Field('content', 'text')) But how can I save this 'text' content into xxx.doc (as ms office format) for downloading? Can pyRTF do this thing, how to ? Thank you all.

[web2py] Re: $.ajax : how to parse data sent to the controller

2012-02-21 Thread Wikus van de Merwe
if students in request.vars: students = json.loads(request.vars.students) print students[0][student_id] For python 2.5 you might need to import the simplejson from contrib (I'm not sure if this is done automatically): import gluon.contrib.simplejson as json

[web2py] Re: Validate the Checkbox

2012-02-21 Thread whowhywhat
Good tip Wikus.. you can also do the something similar with SQLFORM.factory and not define in the model (that way no DB table is created) in controller MY_OPTIONS = [a,b,c] form = SQLFORM.factory( Field(my_options, list:string,

[web2py] Re: Validate the Checkbox

2012-02-21 Thread Sanjeet Kumar
Thanks My problems are solved

[web2py] Re: $.ajax : how to parse data sent to the controller

2012-02-21 Thread Vineet
Oh I see. It worked as per your tip. Thank you ! :) -- Vineet On Feb 21, 4:17 pm, Wikus van de Merwe dupakrop...@googlemail.com wrote: if students in request.vars:   students = json.loads(request.vars.students)   print students[0][student_id] For python 2.5 you might need to import the

[web2py] Re: Passing arg from view to controller.

2012-02-21 Thread Alan Etkin
I tried the above, which made the view's JavaScript invalid, I had to add '' to make it valid JavaScript: $('select#no_table_word').val() Testing this, results in the following url: .../init/hubaddressbook/locality_args_autocomplete/?term=Am So jQuery doesn't find data in

[web2py] math Division in web2py

2012-02-21 Thread Hassan Alnatour
Dear All , i have two variables am using : 1 - myfull returns 3 2 - myfull 2 returns 5 so what am trying to do is myfull1 = (myfull / myfull2)* 100 , so i can get a percent {{=myfull1%}} but i keep geting 0 it should be 60%

[web2py] Re: Hide the Links based on Permission

2012-02-21 Thread Alan Etkin
There is a lot of options by using the auth object features and templates. I think the online manual has many examples on this. http://web2py.com/books/default/chapter/29/9 Maybe this can help: groups.google.com/group/web2py/browse_thread/thread/cda7a114fb627b86/ cb1adee3cf4c8940 On Feb 21, 7:17 

[web2py] cached values from background tasks

2012-02-21 Thread Brian Will
In parts of my app, some needed values take a long time to generate, so I'm farming the generation of these values out to Scheduled tasks and designing with the expectation that some values just won't be ready to include in a page. When ready, the generated values are then incorporated into the

[web2py] Re: Dedicated IDE beginner

2012-02-21 Thread Alan Etkin
Have you followed the installation instructions? I think I have managed to run welcome inside ide2py (with mercurial) The alternative installation (without mercurial) shouldn't be much different, downloading the packages and extracting de data into the specified folders.

[web2py] Re: Hide the Links based on Permission

2012-02-21 Thread Hassan Alnatour
{{if auth.has_permission == SeeLinks}} Your link here {{pass}} make a group called myadmin and add the ones who you want to see the links and then give myadmin group permission SeeLinks ... Best Regards, Hassan Alnatour

[web2py] Re: math Division in web2py

2012-02-21 Thread Brian Will
This is actually just a Python quirk: In Python 2.x, the / operator always returns an integer when both operands are integers, e.g. (5 / 2) returns 2, not 2.5. The solution is to simply make one or both operands a float: percent = float(x) / y * 100 # x/y as a percentage If you want your

[web2py] New official release, any time soon?

2012-02-21 Thread guruyaya
It's been quite some time since the last official release. There are several features in trunk, that I'd love to use, but I cannot use unstable releases (like trunk). when are we seeing another version? Thanks Yair

[web2py] force mobilize

2012-02-21 Thread OpenMercury
I was wondering if there is a way to set a global variable that would force a site to present in mobile mode. Thanks for the help.

[web2py] Re: How to optimize the output typography of blocks in web2py views?

2012-02-21 Thread chinakr
Sorry, but I am puzzled with your suggestion @_@ On 2月21日, 下午7时09分, Wikus van de Merwe dupakrop...@googlemail.com wrote: You can do tricks like that, but it does not have the best readability: {{ for i in range(10):}} p text {{=i}} text /p {{ pass }}

[web2py] How can I Show the html output of a controller function from shell

2012-02-21 Thread guruyaya
I'm looking for a way to create a command line script, that will enable me to send all possible params for a certin request (originating ip, requested app, requested controller and so on), and get the HTML output (or, if possible, an object containing the full response, including header options).

[web2py] Re: Dedicated IDE beginner

2012-02-21 Thread Ashraf Mansour
Thanks yesterday, I download the wing trial version. it is perfect. On Feb 21, 2:55 pm, Alan Etkin spame...@gmail.com wrote: Have you followed the installation instructions? I think I have managed to run welcome inside ide2py (with mercurial) The alternative installation (without mercurial)

[web2py] Re: How to optimize the output typography of blocks in web2py views?

2012-02-21 Thread Anthony
In the case of blocks, I think Wikus is suggesting: {{block head }}[your block markup]{{ end}} But you can also do: {{block head}}[your block markup... ...more block markup]{{end}} Anthony On Tuesday, February 21, 2012 8:13:11 AM UTC-5, chinakr wrote: Sorry, but I am puzzled with your

[web2py] Re: How can I Show the html output of a controller function from shell

2012-02-21 Thread Anthony
Are you saying you want to call a web2py URL from a script and receive the HTML output? You should be able to do that the same way as you would any external URL: import urllib html = urllib.urlopen('http://[web2py url]').read() Or using the shortcut web2py fetch method: from gluon.tools

[web2py] Re: force mobilize

2012-02-21 Thread OpenMercury
I forgot to mention, this would be done when a user would trigger this via link or maybe from a specific site that they arrived from. On Feb 21, 8:12 am, OpenMercury scott.benningh...@gmail.com wrote: I was wondering if there is a way to set a global variable that would force a site to present

[web2py] Re: New member and new to web2py and need some clarification about file paths.

2012-02-21 Thread Anthony
Thanks for pointing me in the right direction for the docs. URL rewrite was the next thing I was going to be looking for since right now we're exposing the user pages from default/user/account etc. I wanted to omit the /default/ but I haven't gotten around to that point yet. I'm sure

[web2py] Re: Web2py Code University and Officaial Certify Training

2012-02-21 Thread Massimo Di Pierro
There are various people offering web2py courses and certification in various languages. I think there is a value in putting all the information together and sharing (some) course material. I am happy to list them all under web2py.com and/or experts4solutions.com If you are teaching using web2py

[web2py] Re: I save content of textarea into db.doc following,

2012-02-21 Thread Massimo Di Pierro
yes. There are some example in the source and on the http://web2py.com/examples/default/examples page On Feb 21, 3:27 am, web2py_lover lia...@gmail.com wrote: I save content of textarea into db.docas  following,  db.define_table('doc',    Field('title'),    Field('content', 'text'))  But

[web2py] Re: New official release, any time soon?

2012-02-21 Thread Massimo Di Pierro
Next week. Meanwhile try the nightly built On Feb 21, 7:01 am, guruyaya guruy...@gmail.com wrote: It's been quite some time since the last official release. There are several features in trunk, that I'd love to use, but I cannot use unstable releases (like trunk). when are we seeing another

[web2py] Re: How can I Show the html output of a controller function from shell

2012-02-21 Thread guruyaya
Good. I think you'll like what I'm about to do with this one... On 21 פברואר, 16:06, Anthony abasta...@gmail.com wrote: Are you saying you want to call a web2py URL from a script and receive the HTML output? You should be able to do that the same way as you would any external URL: import

[web2py] Re: Any way to make web2py SQLFORM.grid accept inserted fields?

2012-02-21 Thread whowhywhat
anybody .. please .. pretty please :).. On Feb 21, 10:20 am, whowhywhat mads...@gmail.com wrote: I need a web2py SQLFORM.grid to accept and process based on some conditions, which need to be triggered based on some check boxes. I have inserted these checkboxes into the form by doing something

[web2py] Re: Any way to make web2py SQLFORM.grid accept inserted fields?

2012-02-21 Thread Cliff
## Caveat beware sloppy syntax below ## DO NOT forget to validate!! def add_my_field(form): form.vars.myfield = request.post_vars.myfield # After defining the form but before returning the dict if form[0].process(onvalidation=add_my_field) On Feb 21, 10:09 am, whowhywhat mads...@gmail.com

[web2py] Re: how to modify scaffolding form for a specific model

2012-02-21 Thread Can Candan
Great, thank you On Feb 21, 5:43 am, Anthony abasta...@gmail.com wrote: Here are some options:http://stackoverflow.com/questions/8146260/best-practice-for-populati... Anthony On Sunday, February 19, 2012 2:41:14 PM UTC-5, Can Candan wrote: I am willing to extend the behavior of the

[web2py] Re: Hide the Links based on Permission

2012-02-21 Thread nick name
Whichever way you choose, make sure you verify permissions on the server as well -- don't rely on not presenting the link to the client as a form of security.

[web2py] Re: Any way to make web2py SQLFORM.grid accept inserted fields?

2012-02-21 Thread whowhywhat
Thanks a lot cliff! :) .. really appreciate it! On Feb 21, 9:39 pm, Cliff cjk...@gmail.com wrote: ## Caveat beware sloppy syntax below ## DO NOT forget to validate!! def add_my_field(form):   form.vars.myfield = request.post_vars.myfield # After defining the form but before returning the

[web2py] Re: New official release, any time soon?

2012-02-21 Thread nick name
Is that going to be 2.0? IMO, the rocket download problem which AFAIK has not yet been fixed is a blocker for 2.0 Also, IIRC, Bruno is working on Bootstrap integration -- which is probably worthy of delaying 2.0 for (Web2py 2: Now with bootstrap!)

[web2py] can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Ashraf Mansour
Hi All, can the query in IS_IN_DB have more than one table? And how the fields of these tables be referenced in the format, to be shown in the dropbox ? Thanks in advance. Ashraf

[web2py] cache to disk zipped files

2012-02-21 Thread james c.
My application/controller is creating a zipped folder of files specific to each use and then the user downloads the folder. I'm able to create the zipped folders OK and set up the disk caching without apparently any errors, and I see that the system is updating the files in the applications cache

Re: [web2py] can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Richard Vézina
For represent I usually do : lambda id: db.fktable1(id).represent_field # 1 table lambda id: db.fktable2(db.fktable1(id).id).represent_field_table2 # 2 table You can maybe proceding the same way, but I am not sure... I am still using old requires syntax... Please report your experiment and how

[web2py] Re: New official release, any time soon?

2012-02-21 Thread Massimo Di Pierro
probably 1.99.6 On Feb 21, 11:26 am, nick name i.like.privacy@gmail.com wrote: Is that going to be 2.0? IMO, the rocket download problem which AFAIK has not yet been fixed is a blocker for 2.0 Also, IIRC, Bruno is working on Bootstrap integration -- which is probably worthy of delaying

[web2py] new feature in trunk...

2012-02-21 Thread Massimo Di Pierro
not sure if it should stay and for sure it can be improved. I use it a lot. def index(): import os from gluon.tools import Expose return dict(expose=Expose(os.path.join(request.folder,'static')))

[web2py] web2py.com is dead

2012-02-21 Thread Richard
Hello, web2py.com not online... It just happen. Richard

[web2py] Re: new feature in trunk...

2012-02-21 Thread Anthony
Cool. Shouldn't: filename = os.path.join(base, '/'.join(current.request.args)) be: filename = os.path.join(base, os.path.sep.join(current.request.args)) or maybe just: filename = os.path.join(base, *current.request.args) Anthony On Tuesday, February 21, 2012 2:57:43 PM UTC-5, Massimo Di

Re: [web2py] web2py.com is dead

2012-02-21 Thread Vasile Ermicioi
it is down ...

[web2py] concurrency, web2py, and GAE

2012-02-21 Thread howesc
Hello all, a question about web2py and concurrent requests on GAE - I'm seeing some odd behavior and i would like to know if my theory is at all reasonable, and suggestions for testing my theory. an RTFM (read the friggen manual) response is just fine - can you point me to the manual? my

[web2py] Re: what triggers a db migration

2012-02-21 Thread Fred
[Replying to old message; I'm way behind] On Jan 15, 1:21 am, pbreit pbreitenb...@gmail.com wrote: I think web2py compares the .table files to the database to figure out what needs to be migrated. Is this correct? Everything I've seen suggests that web2py compares the .table files to the

[web2py] book says auth.archive saves old record but it actually saves the new one

2012-02-21 Thread simon
The book says that auth.archive stores a copy of the record (as it was before the update). However with SQLFORM it appears to store a copy of the record after the update unless you do workaround (from Anthony in previous post): if form.process(...onsuccess=lambda archive: auth.archive(form,

[web2py] Re: can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Ashraf Mansour
Thank you for the immediate reply. please rewrite the example using the old requires syntax. On Feb 21, 10:39 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: For represent I usually do : lambda id: db.fktable1(id).represent_field # 1 table lambda id:

[web2py] Re: Apache/mod_wsgi: Exposing individual web2py apps alongside other non-web2py services

2012-02-21 Thread Fred
I faced something similar when I wanted to run two different versions of web2py (the framework itself) on one server. It worked well to use a pattern like this: WSGIScriptAliasMatch^/(someappname) /var/local/web2py/wsgihandler.py/ $1 AliasMatch ^/(someappname)/static/(.*)

[web2py] Re: crontab sytax

2012-02-21 Thread web-dev-m
The chapter works, the link to the syntax does not. http://web2py.com/books/default/reference/29/cron On Feb 21, 4:50 am, Wikus van de Merwe dupakrop...@googlemail.com wrote: I say the book works just fine:http://web2py.com/book/default/chapter/04#Cron The syntax you want to use is: @reboot

Re: [web2py] Re: can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Richard Vézina
Old IS_IN_DB(helper_set,'table.id','%(field1)s (%(field2)s)',multiple=True) Maybe this work but not sure : IS_IN_DB(helper_set,'table.id',db.table2(db.table1.id ).fieldTable2,multiple=True) Richard On Tue, Feb 21, 2012 at 4:21 PM, Ashraf Mansour ad...@aqar-riyadh.comwrote: Thank you for

Re: [web2py] Re: can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Richard Vézina
On Tue, Feb 21, 2012 at 4:27 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Old IS_IN_DB(helper_set,'table.id','%(field1)s (%(field2)s)',multiple=True) # One table Maybe this work but not sure : IS_IN_DB(helper_set,'table.id',db.table2(db.table1.id).fieldTable2,multiple=True) # 2

[web2py] Re: can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Ashraf Mansour
I will try both and i will let you know. On Feb 22, 12:27 am, Richard Vézina ml.richard.vez...@gmail.com wrote: On Tue, Feb 21, 2012 at 4:27 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Old IS_IN_DB(helper_set,'table.id','%(field1)s (%(field2)s)',multiple=True) # One

[web2py] question about response.js

2012-02-21 Thread Richard
Hello, Why I can't get initialization jquery plugin code to be execute by view? # Controller response.js=$(.chzn-select).chosen(); I already append(pluging file and css) like this : response.files.append(URL('static','plugin_added/harvesthq- chosen-ada808d/chosen/chosen.css'))

Re: [web2py] question about response.js

2012-02-21 Thread Anthony
Is response.files being set by the component action, or by the page that contains the component? If the former, it won't work, as response.files is ignored when set in a component (response.files is used by layout.html to include CSS and JS files in the document head and so is ignored by

[web2py] Re: can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Ashraf Mansour
Unfortunately, did not work (both). Do you know of any running example? in other words, where is it explained, old style and new style? On Feb 22, 12:33 am, Ashraf Mansour ad...@aqar-riyadh.com wrote: I will try both and i will let you know. On Feb 22, 12:27 am, Richard Vézina

Re: [web2py] web2py.com is dead

2012-02-21 Thread Bruce Wade
works for me On Tue, Feb 21, 2012 at 12:36 PM, Vasile Ermicioi elff...@gmail.com wrote: it is down ... -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com http://www.fitnessfriendsfinder.com

Re: [web2py] Re: can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Richard Vézina
Ok by new style I mean this syntax : db.dog.owner.requires = IS_IN_DB(db,*db.person.id*,'%(name)s') Instead of : db.dog.owner.requires = IS_IN_DB(db,* 'person.id'*, '%(name)s') In red... So, I assume this is possible I am maybe wrong : db.dog.owner.requires = IS_IN_DB(db,db.person.id,

Re: [web2py] web2py.com is dead

2012-02-21 Thread Richard Vézina
Yeah it come back a couple of minutes ago. Richard On Tue, Feb 21, 2012 at 5:10 PM, Bruce Wade bruce.w...@gmail.com wrote: works for me On Tue, Feb 21, 2012 at 12:36 PM, Vasile Ermicioi elff...@gmail.comwrote: it is down ... -- -- Regards, Bruce Wade

[web2py] Re: web2py.com is dead

2012-02-21 Thread Massimo Di Pierro
It was not dead but slow. I think a network problem. Now seems resolved. On Feb 21, 4:22 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Yeah it come back a couple of minutes ago. Richard On Tue, Feb 21, 2012 at 5:10 PM, Bruce Wade bruce.w...@gmail.com wrote: works for me On

Re: [web2py] question about response.js

2012-02-21 Thread Richard Vézina
Ok, understand that, but is the response.js should allow me to insert this in my view : script type=text/javascript $(.chzn-select).chosen(); /script Is there a way to insert a script into a view from controller... It may be consider script injection I don't know... Richard On Tue, Feb 21,

Re: [web2py] Re: web2py.com is dead

2012-02-21 Thread Bruce Wade
Curious who are you hosting web2py with? The server seems to go down quite often. On Tue, Feb 21, 2012 at 2:24 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: It was not dead but slow. I think a network problem. Now seems resolved. On Feb 21, 4:22 pm, Richard Vézina

[web2py] Re: new feature in trunk...

2012-02-21 Thread Massimo Di Pierro
yes. :-) On Feb 21, 2:30 pm, Anthony abasta...@gmail.com wrote: Cool. Shouldn't: filename = os.path.join(base, '/'.join(current.request.args)) be: filename = os.path.join(base, os.path.sep.join(current.request.args)) or maybe just: filename = os.path.join(base, *current.request.args)

Re: [web2py] Re: can the query in IS_IN_DB have more than one table?

2012-02-21 Thread Richard Vézina
Maybe reading IS_IN_DB doc could helps... Richard On Tue, Feb 21, 2012 at 5:22 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Ok by new style I mean this syntax : db.dog.owner.requires = IS_IN_DB(db,*db.person.id*,'%(name)s') Instead of : db.dog.owner.requires = IS_IN_DB(db,*

[web2py] Re: what triggers a db migration

2012-02-21 Thread Massimo Di Pierro
You are right. No database introspection. On Feb 21, 3:11 pm, Fred fre...@gmail.com wrote: [Replying to old message; I'm way behind] On Jan 15, 1:21 am, pbreit pbreitenb...@gmail.com wrote: I think web2py compares the .table files to the database to figure out what needs to be migrated.

Re: [web2py] question about response.js

2012-02-21 Thread Richard Vézina
I am sure I can just put it into a file and use response.files(URL(tofile)) It just seems to me overkill to use a file for that... Richard On Tue, Feb 21, 2012 at 5:25 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Ok, understand that, but is the response.js should allow me to insert

[web2py] Re: book says auth.archive saves old record but it actually saves the new one

2012-02-21 Thread Massimo Di Pierro
There was an accidental change of behavior. You are the first to notice that. You have the option to do one or the other. The issue is what should be default of archive_current. what book edition are you looking at? On Feb 21, 3:14 pm, simon simo...@gmail.com wrote: The book says that

[web2py] Re: web2py.com is dead

2012-02-21 Thread Massimo Di Pierro
I use VPS.net. I really like their interface and they do respond to emails. They do have problems but not sure 100% this problem is their fault. Most of the problems I had with them were with their Atlanta data center (I would not recommend) but the Chicago one (where web2py.com is) had good

Re: [web2py] question about response.js

2012-02-21 Thread Anthony
Ok, understand that, but is the response.js should allow me to insert this in my view : script type=text/javascript $(.chzn-select).chosen(); /script response.js does not insert a script tag into the page. Instead, the javascript function that makes the ajax call to load the component

Re: [web2py] question about response.js

2012-02-21 Thread Richard Vézina
I try to bring back in controller initialization for jquery plugins because I am not using them everywhere most of the time and also because sometimes I initialize them differently in particular Datatables... Also, when I change version of the plugin I found my self to always forgot a views that

[web2py] Setting form method in web2py

2012-02-21 Thread Yarin
Is there a proper way to set the form method in web2py, or is it done by FORM( _method = POST)? Is there way to have all forms globally use POST instead of GET?

[web2py] Understanding web2py coming from a PHP background

2012-02-21 Thread Jean M.
Hello, I am a PHP developer interested in understanding the fundamentals of web2py framework and after reading the book and the documentation, I have some questions which I would very much appreciate to have answered. 1) Why (or is) a VPS is necessary to host web2py Python web-apps? Can it

[web2py] Re: book says auth.archive saves old record but it actually saves the new one

2012-02-21 Thread simon
4th edition current online version: http://web2py.com/books/default/chapter/29/7?search=archive Also there is no mention of archive_current. I found that in a post on this forum

[web2py] Automatically reload custom modules?

2012-02-21 Thread Bruce Wade
Hi, I am starting to find this situation a little annoying. I have a package at the same level as gluon, adviewerAPI. Which contains several modules that I will be using across all my applications. (Main website, customer service app etc...) Now the issue is whenever I make a change to any of

[web2py] Re: Setting form method in web2py

2012-02-21 Thread Massimo Di Pierro
al forms already default to POST. FORM(_method='POST) and/or SQLFORM(_method=POST) is default. On Feb 21, 4:51 pm, Yarin ykess...@gmail.com wrote: Is there a proper way to set the form method in web2py, or is it done by FORM( _method = POST)? Is there way to have all forms globally use POST

[web2py] Re: book says auth.archive saves old record but it actually saves the new one

2012-02-21 Thread Massimo Di Pierro
Thanks. If there is a disconnect between this and the book we can fix it in the next version. Please open a ticket about this. On Feb 21, 5:15 pm, simon simo...@gmail.com wrote: 4th edition current online version: http://web2py.com/books/default/chapter/29/7?search=archive Also there is no

[web2py] Re: Automatically reload custom modules?

2012-02-21 Thread Massimo Di Pierro
from gluon.custom_import import track_changes; track_changes(True) On Feb 21, 5:18 pm, Bruce Wade bruce.w...@gmail.com wrote: Hi, I am starting to find this situation a little annoying. I have a package at the same level as gluon, adviewerAPI. Which contains several modules that I will be

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread Massimo Di Pierro
On Feb 21, 4:33 pm, Jean M. lake...@gmail.com wrote: Hello, I am a PHP developer interested in understanding the fundamentals of web2py framework and after reading the book and the documentation, I have some questions which I would very much appreciate to have answered. 1) Why (or is) a

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread pbreit
1) Python hosting is much harder than PHP hosting. While hosts that support Python should be able to support Web2py, that is not always the case because they don't support one of the web server communication mechanisms such as mod_wsgi or fastcgi. If the host supports Django apps, it should be

Re: [web2py] Re: Automatically reload custom modules?

2012-02-21 Thread Bruce Wade
Thank you that makes live much easier. On Tue, Feb 21, 2012 at 4:14 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: from gluon.custom_import import track_changes; track_changes(True) On Feb 21, 5:18 pm, Bruce Wade bruce.w...@gmail.com wrote: Hi, I am starting to find this

[web2py] Re: How to optimize the output typography of blocks in web2py views?

2012-02-21 Thread chinakr
I get the point, it really works, thx! On 2月21日, 下午9时45分, Anthony abasta...@gmail.com wrote: In the case of blocks, I think Wikus is suggesting: {{block head}}[your block markup]{{ end}} But you can also do: {{block head}}[your block markup... ...more block markup]{{end}} Anthony

[web2py] Re: Web2Py/Google App Engine Apps - How to get ID or key after Inserting New Rec

2012-02-21 Thread howesc
bulk insert fails? or bulk insert does not return a list of IDs? i assert that bulk insert does indeed work (at least for me 1.99.4), but that it does not return a list of IDs. google provides no way to see the IDs it has assigned in a bulk insert unless you have specified the IDs yourself

[web2py] Re: BELONGS is not supported on GAE?

2012-02-21 Thread howesc
what version of web2py are you using? belongs was not supported on ID at one point, but we fixed that i believe anyhow, i would write the queries for GAE like: # Construct a query to fetch all the mootid's from the group mootGroup = db(db.moot_groups.gid==groupid).select() ###NOTE: you

[web2py] support for bound (instance) methods for represent

2012-02-21 Thread Carlos
Hi Massimo, Can we please add support for bound (instance) methods for represent?. I propose to add the following line (immediately after assigning n in represent function at sqlhtml.py): if getattr(f, 'im_self', None): n -= 1 At aprox. line # 41. Alternatively you can check n==1 (for one

[web2py] Re: support for bound (instance) methods for represent

2012-02-21 Thread Massimo Di Pierro
I believe represent cal already be methods. Can you please provide an example of what you need to do and the behavior you expect? massimo On Feb 21, 7:07 pm, Carlos carlosgali...@gmail.com wrote: Hi Massimo, Can we please add support for bound (instance) methods for represent?. I propose to

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread Jean M.
Thank you, both of you. I am really struggling to understanding the very basics of how Python Web-apps work. Your answers do help. So basically, a python app (running on web2py or not) is actually an app, and it runs on Python interpreter (just like Java apps). So they also contain, naturally,

[web2py] Re: Understanding web2py coming from a PHP background

2012-02-21 Thread Anthony
3) What is web2py approach to configuration, settings and programming? As noted, the only real configuration file is routes.py, which is optional and used for routing (URL rewrite and routes on error). In addition to the root routes.py file in the /web2py folder, you can also have

[web2py] my IE 6.0, the layout of four columns

2012-02-21 Thread web2py_lover
in my IE 6.0, the layout of http://web2py.com/examples/default/index shows ok but mine (Current (1.99.4 stable)) http://127.0.0.1:8000/examplesshows not ok, I think it is the problem of following, am I right? I can't find the definition of four columns in any css file, div class=four

[web2py] Re: Web2Py/Google App Engine Apps - How to get ID or key after Inserting New Rec

2012-02-21 Thread BrendanC
howesc, My bad - you are correct. I retested bulk insert on GAE and it does work. I made a mistake with my syntax: Instead of: imgids = db.imagetag.bulk_insert(ddlist) I was using: imgids = db.imagetag.bulk_insert(**ddlist) Complete example: #Test example - Build a list of dicts

[web2py] Re: new feature in trunk...

2012-02-21 Thread Brian M
So if my quick reading of the code is correct this will expose a directory listing? Am I close? (Some doc strings would be nice ;-) )

[web2py] request.user_agent() dumping

2012-02-21 Thread weheh
I'm trying to detect the browser being used to access my web2py app. The literature seems to recommend reading request.env.http_user_agent. But the results are a little confusing, so I'm trying request.user_agent(), which uses gluon/contrib/ user_agent_parser.py (as per the doc). This throws the

[web2py] GAE and Web2Py - Current Issues and some thoughts on Best Practices?

2012-02-21 Thread BrendanC
Just started testing a small GAE test app with Web2py. I worked with the App Engine a few years ago, but have not looked at it for a while. I know there has been some earlier discussion here re proposed DAL changes to enhance GAE support. Unfortunately the Web2Py GAE docs are a bit sparse and

[web2py] web2py - Amazon Webservices Integration

2012-02-21 Thread Osama Khan
Hi, Has anyone tried this tutorial? http://aws.amazon.com/articles/3998?_encoding=UTF8jiveRedirect=1 Is there something similar we can do with web2py? * Best, Osama *

  1   2   >