[web2py] using radio widget can't receive the empty submit

2012-02-01 Thread Dan
Hello, I'm testing empty submit with the following two forms, one is dropdown list and the other one is the checkradio box with v1.99.4. The dropdown list with empty select can successfully submit and got the expected responses. But using checkradio widget, empty submit doesn't work and no

Re: [web2py] Re: Chunked downloads and corrupt files with Internet Explorer 8 (IE8)

2012-02-01 Thread Phyo Arkar
have you guys test on upload too? i have corrupted files on upload too. mostly on slow connection (well my internet connection only have 10 - 20K/s upload speed. On Wed, Feb 1, 2012 at 4:20 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I agree with the fact that there are two

[web2py] Re: 'Morsel' object has no attribute 'split' ?

2012-02-01 Thread Ben Tammetta
It seemed that version of facebook.py that I was using is just incompatible and/or outdated get_user_from_cookie() was trying to parse a cookie variable out that did not exist from facebook. I ended up passing the correct cookie variable directly in and changing a couple lines to prove that

[web2py] Simple edit form example

2012-02-01 Thread Mark Kirkwood
I have just started looking at using web2py to build a web application, as it seems like the right balance between capability and simplicity for me. While I have found the example apps and docs good, there is one glaring omission - how to do updates/edits in forms. For example I worked

[web2py] Re: Redbean-like ORM in web2py

2012-02-01 Thread Cliff
insert prompts the creation of the 'name' column in the 'person' table (type is inferred based on the data, and altered if necessary based on subsequent inserts) Wow. I would not be comfortable with this. On Jan 30, 10:13 am, Anthony abasta...@gmail.com wrote: On Monday, January 30, 2012

[web2py] Re: Simple edit form example

2012-02-01 Thread Anthony
While I have found the example apps and docs good, there is one glaring omission - how to do updates/edits in forms. For example I worked through the 'dogs' example app - nice and clearbut what I'd like to see is a section detailing how to: - search for a dog (say by name) The

[web2py] Re: Redbean-like ORM in web2py

2012-02-01 Thread Anthony
On Wednesday, February 1, 2012 9:02:01 AM UTC-5, Cliff wrote: insert prompts the creation of the 'name' column in the 'person' table (type is inferred based on the data, and altered if necessary based on subsequent inserts) Wow. I would not be comfortable with this. My

[web2py] Re: ticket with book example under 7.2.6 Links to Referencing Records

2012-02-01 Thread DenesL
^bump^

[web2py] Re: Error thrown using sample code from SQLFORM chapter of web2py book

2012-02-01 Thread monotasker
OK, in that case maybe the book example should be changed since the code doesn't quite work as given on p. 331.

[web2py] Form in component submits (blank) when component first loads

2012-02-01 Thread monotasker
In a few different places I'm finding that a SQLFORM form loaded in a component is submitted automatically when the component first loads. It doesn't pass the if form.process() test, and it doesn't throw errors, so I get whatever the else condition is in the form submission process. Does

[web2py] Re: Form in component submits (blank) when component first loads

2012-02-01 Thread Anthony
Can you show some code? On Wednesday, February 1, 2012 10:53:03 AM UTC-5, monotasker wrote: In a few different places I'm finding that a SQLFORM form loaded in a component is submitted automatically when the component first loads. It doesn't pass the if form.process() test, and it doesn't

[web2py] Re: using radio widget can't receive the empty submit

2012-02-01 Thread DenesL
You don't say what is that you were expecting. Empty elements do not submit values. Add the following to the end of your view so you can see what is being sent/received each time: {{=request.args}}br/{{=request.vars}} On Feb 1, 5:29 am, Dan ideall...@googlemail.com wrote: Hello, I'm testing

[web2py] Re: Form in component submits (blank) when component first loads

2012-02-01 Thread monotasker
I include a comments plugin in my main view: {{=plugin_comments()}} That plugin calls this controller: #checks to see whether hidden 'honeypot' field has any text in it (presumably placed there by a bot) def checkfilter(form): form.vars.filter = request.vars.filter if form.vars.filter

[web2py] How to change the Not Authorized Page

2012-02-01 Thread Francisco
Hi, I have search in the documentation and in this group older entries but I have not found a simple way to personalize the Not Authorized that is displayed when a user tries to access a controller function which requires a group he doesn't belong to. Hope someone can point me into the right

[web2py] Re: Form in component submits (blank) when component first loads

2012-02-01 Thread Anthony
Not sure I understand -- why do you need the else condition at all -- it doesn't do anything? Can't you just remove it? On Wednesday, February 1, 2012 11:14:36 AM UTC-5, monotasker wrote: I include a comments plugin in my main view: {{=plugin_comments()}} That plugin calls this controller:

[web2py] Re: How to change the Not Authorized Page

2012-02-01 Thread Anthony
It should redirect to whatever URL you put in auth.settings.on_failed_authorization. By default, it goes to /default/user/not_authorized (assuming /default/user is your user function that calls auth), so you can either redirect to a different URL, or edit the user() function to look for

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-01 Thread Bruce Wade
This is how I originally thought to do it. (Would have posted this last night but code was at the office) class User(BaseAuth): def set_properties(self): tablename = self.auth.settings.table_user_name T = current.T # take a look in basemodel to see the options

[web2py] Re: How to change the Not Authorized Page

2012-02-01 Thread Francisco
Thank you Anthony, got it working, and now my app looks much better. On 1 feb, 10:56, Anthony abasta...@gmail.com wrote: It should redirect to whatever URL you put in auth.settings.on_failed_authorization. By default, it goes to /default/user/not_authorized (assuming /default/user is your user

[web2py] Re: ticket with book example under 7.2.6 Links to Referencing Records

2012-02-01 Thread Massimo Di Pierro
This: db(query).select(db[table]) should be db(query).select(db[table].ALL) On Feb 1, 9:07 am, DenesL denes1...@yahoo.ca wrote: ^bump^

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-01 Thread Bruno Rocha
You can set visibility and other options, but you cant use self.auth.settings.table_user_ name because at this point self.auth does not exist and it is a circular reference given the fact that User class is the base for the creation of Auth object in that example. But, in most cases you will name

[web2py] Re: Default controller function

2012-02-01 Thread nick name
Working with unsanitized input like this might be dangerous. http://localhost/content/../../../etc/passwd

[web2py] Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
Hi, I'm using the lates Version of Web2py and getting a invalid request if I'm using any special chars like %21 (!) or umlauts. Web2py is running with the fcgihandler and Lighttpd. All special chars are encoded by using urllib.quote(). Please help! Thanks a lot.

[web2py] Re: Redbean-like ORM in web2py

2012-02-01 Thread Cliff
I experience too many unexpected changes during development as it is. :) Having an ORM create more would not be good. During development I might inadvertently attempt to insert a string into a decimal field. I do dumb stuff like that sometimes, as I think most of us do. Would the schema then

Re: [web2py] Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Bruno Rocha
in your routes.py #specify a list of apps that bypass args-checking and use request.raw_args # #routes_apps_raw=['myapp'] #routes_apps_raw=['myapp', 'myotherapp'] On Wed, Feb 1, 2012 at 3:52 PM, Dan kor...@ironshark.de wrote: Hi, I'm using the lates Version of Web2py and getting a invalid

Re: [web2py] Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Jonathan Lundell
On Feb 1, 2012, at 9:52 AM, Dan wrote: I'm using the lates Version of Web2py and getting a invalid request if I'm using any special chars like %21 (!) or umlauts. Web2py is running with the fcgihandler and Lighttpd. All special chars are encoded by using urllib.quote(). Post an example,

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-01 Thread Bruce Wade
Ok thanks that makes things clear. I am having another issue: from gluon.dal import Field from basemodel import BaseModel from gluon.validators import IS_NOT_EMPTY, IS_NOT_IN_DB from gluon import current class Language(BaseModel): tablename = languages def set_properties(self):

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-01 Thread Bruce Wade
Actually just tested the same problem happens with all datamodels I created and try to save from using appadmin. appadmin.py: from myapp import MyApp app = MyApp() auth = app.auth #from datamodel.post import Post as PostModel from datamodel.user import UserAccount from datamodel.dist import

Re: [web2py] bootstrap 2

2012-02-01 Thread Martín Mulone
jquery ui bootstrap is very nice! 2012/2/1 Bruno Rocha rochacbr...@gmail.com Bootstrap 2 released, full responsible layout! I am working on porting scaffold app to bootstrap with jquery ui support! http://twitter.github.com/bootstrap/download.html

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
Thanks for your reply. If I'm adding my app to the raw args, my other code will not work anymore: if len(request.args) == 2: TypeError: object of type 'NoneType' has no len() On Feb 1, 6:57 pm, Bruno Rocha rochacbr...@gmail.com wrote: in your routes.py #specify a list of apps that bypass

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
A request would look like: http://domain.tld/page/show/sample%21/some/more/args It just says invalid request. Firebug gives me this: Content-Length 573 Content-Typetext/html; charset=UTF-8 DateWed, 01 Feb 2012 18:24:57 GMT Server lighttpd/1.4.28 web2py_errorinvalid path (args)

Re: [web2py] bootstrap 2

2012-02-01 Thread Bruno Rocha
I am working to port web2py grid layout to use it. and a I have a new feature to grid (sub grids/details forms) experimental I hope to contribute with it very soon On Wed, Feb 1, 2012 at 4:18 PM, Martín Mulone mulone.mar...@gmail.comwrote: jquery ui bootstrap is very nice! 2012/2/1 Bruno

Re: [web2py] Re: [w2py-dev] model less apps (a blog example)

2012-02-01 Thread Bruno Rocha
can you send me your app? .w2p or only your datamodels? May be we can work to improve the approach! On Wed, Feb 1, 2012 at 4:12 PM, Bruce Wade bruce.w...@gmail.com wrote: Actually just tested the same problem happens with all datamodels I created and try to save from using appadmin.

Re: [web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Bruno Rocha
if you map you should use request.raw_args may be including in models request.args = request.raw_args But I am not sure about this, Jonathan is the only one who knows how routes works :) On Wed, Feb 1, 2012 at 4:25 PM, Dan kor...@ironshark.de wrote: A request would look like:

Re: [web2py] bootstrap 2

2012-02-01 Thread Martín Mulone
tell me if you need help 2012/2/1 Bruno Rocha rochacbr...@gmail.com I am working to port web2py grid layout to use it. and a I have a new feature to grid (sub grids/details forms) experimental I hope to contribute with it very soon On Wed, Feb 1, 2012 at 4:18 PM, Martín Mulone

[web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Dan
Thanks again. I just found this article: http://stackoverflow.com/questions/7279198/allow-20-in-web2py-requests-args But to be honest, it does not make any sense. Why is the percent sign forbidden? Why is request.args set to None if raw args are enabled? Why do we have to enable raw args

Re: [web2py] Re: Invalid request if the URL contains a special char or umlaut

2012-02-01 Thread Bruno Rocha
On Wed, Feb 1, 2012 at 4:39 PM, Dan kor...@ironshark.de wrote: Could this be fixed in the next update? It is not a bug that needs to be fixed, certainly it is a security decision! -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] TYPE Error with SQLFORM.factory

2012-02-01 Thread CalBR
I´m a newbie trying to learn how to use SQLFORM.factory. I´ve created the followiing controller: @auth.requires_login() def teste(): form =

[web2py] Create a drop-down menu from a database

2012-02-01 Thread shartha
So the problem is two folds. I have defined a simple table as in: db = DAL(sqlite://storage.sqlite) db.define_table('cities', Field('name'), Field('state'), ) Now I'd like to have a drop-down list in my view that reads from the name filed of the database cities. How can I achieve this?

[web2py] Re: TYPE Error with SQLFORM.factory

2012-02-01 Thread Massimo Di Pierro
IS_IN_SET['mpconsumida':'mpconsumida.csv','produtovendido':'produtovendid o.csv'] should be IS_IN_SET({'mpconsumida':'mpconsumida.csv','produtovendido':'produtovendid o.csv'}) On Feb 1, 1:21 pm, CalBR calb...@gmail.com wrote: I´m a newbie trying to learn how to use SQLFORM.factory. I´ve

[web2py] Re: ticket with book example under 7.2.6 Links to Referencing Records

2012-02-01 Thread DenesL
Thanks Massimo, I did not see that. On Feb 1, 12:32 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: This: db(query).select(db[table]) should be db(query).select(db[table].ALL)

[web2py] Re: Create a drop-down menu from a database

2012-02-01 Thread Massimo Di Pierro
Something like this? db.define_table('cities',     Field('name'),     Field('state'), format = '%(name)s' ) form = SQLFORM.factory(Field('choose_city','reference cities')) On Feb 1, 2:25 pm, shartha m.mirghorb...@gmail.com wrote: So the problem is two folds. I have defined a simple table

[web2py] Re: Create a drop-down menu from a database

2012-02-01 Thread Anthony
What is the context? Is the drop-down list part of a form based on a table with a reference to the cities table? In general, you can use the IS_IN_DB validator on a field to automatically generate a drop-down list: SQLFORM.factory(Field('city', requires=IS_IN_DB(db, 'cities.id', '%(name)s')))

[web2py] Re: Create a drop-down menu from a database

2012-02-01 Thread Anthony
Massimo's way is even easier. Note, behind the scenes, this is still using the IS_IN_DB validator to generate the drop-down. Anthony On Wednesday, February 1, 2012 3:35:38 PM UTC-5, Massimo Di Pierro wrote: Something like this? db.define_table('cities', Field('name'),

[web2py] Webfaction account with multiple apps under 1 web2py install

2012-02-01 Thread Jim Steil
Hi I've got a couple different apps I want to deploy under my web2py instance on webfaction. Unfortunately, I'm well versed in routing and knowing how to route different requests to different apps. I have different urls that I'd like mapped to different apps. www.application1.com I would

Re: [web2py] Re: TYPE Error with SQLFORM.factory

2012-02-01 Thread Gmail
Massimo Thanks for the fast answer. It worked as expected. What shoud I do for the radio widget to display labels instead of the returned value. For instance, I would like the form display 'Material consumido' and, when submited, the post_vars return 'mpconsumida.csv'. Obrigado Ciro P.S.: Is

[web2py] Re: Create a drop-down menu from a database

2012-02-01 Thread shartha
Thanks for the responses. I could not implement the method Dr. Massimo offered because I didn't know what to use instead of 'reference city' in his method. I am sorry. I am a total beginner. Also, I have 2 more questions. The first one is: How can I remove the first item from the drop-down menu,

[web2py] Re: Create a drop-down menu from a database

2012-02-01 Thread shartha
Thanks for the responses. I couldn't use the method Dr. Massimo offered. What should I use instead of 'reference cities'? The second method solved my problem though. Also how can I remove the first option (which is blank) from the available options? S.

[web2py] Help with views

2012-02-01 Thread CalBR
Hi I´m trying put a few buttons on the top of a page and, depending on the button clicked, display specific information about the choosen database. Basically, what I want to do is quite similar by what is done by response.toolbar(). Where do I ca see the toolbar() code? Thanks

[web2py] Re: Help with views

2012-02-01 Thread Anthony
It's in /web2py/gluon/globals.py -- toolbar() is a method of the Response class: http://code.google.com/p/web2py/source/browse/gluon/globals.py#365 Anthony On Wednesday, February 1, 2012 5:39:45 PM UTC-5, CalBR wrote: Hi I´m trying put a few buttons on the top of a page and, depending on

[web2py] Re: Create a drop-down menu from a database

2012-02-01 Thread Anthony
On Wednesday, February 1, 2012 5:43:58 PM UTC-5, shartha wrote: Thanks for the responses. I could not implement the method Dr. Massimo offered because I didn't know what to use instead of 'reference city' in his method. I am sorry. I am a total beginner. Also, I have 2 more questions. The

[web2py] Re: Background process scheduler and GAE

2012-02-01 Thread howesc
use the GAE taskqueues for background processes. i also recommend looking at GAE backend instances for background tasks.

[web2py] Re: using radio widget can't receive the empty submit

2012-02-01 Thread Dan
Hi Denesl, Thanks for the hints. I got the sumbit info from the xform. Storage {'_formkey': 'cbaea79f-4524-4fa8-b5e6-dbae7e2b2a71', '_formname': 'xform'} But what I want is the flash response Form X Response shows up like the dropdown select form behaviors and other form.vars during the

[web2py] Anybody want to join me

2012-02-01 Thread chawk
I am looking for a web2py/google app engine partner. All good websites have them. I have completely created noobmusic.com myself. I am burried in things to do and don't have time to do some of the added features the site desperately needs. Basically I just want to ask the community if anybody

[web2py] Re: Simple edit form example

2012-02-01 Thread Mark Kirkwood
Anthony abastardi@... writes: The only built-in methods for searching (via the user interface) are crud.search and SQLFORM.grid (and .smartgrid). def search_dogs():     form, records = crud.search(db.dog)     return dict(form=form, records=records) or def search_dogs():     return

[web2py] Any bored developers want to help?

2012-02-01 Thread Bruce Wade
Hi, I am currently using web2py to build a fitness portal, that allows members to: 1. track their food consumption 2. calculate the calories/fat/protein etc.., 3. build and track their workout programs 4. track fitness progress IE: Weight changes, muscle gained etc... 5. trainers

[web2py] Routes.py and janrain login

2012-02-01 Thread Rene Dohmen
Hi List, I've installed mod_wsgi on our server and added a vhost so that each application is accessible via www.examples.com/app_name One of the apps is ready; so I created another vhost and started an separate instance of web2py. The second instance uses a routes.py to remove the appname from

[web2py] WHERE equivalent in query?

2012-02-01 Thread shartha
I have two databases as follows: db.define_table('city', Field('name'), Field('state'), format = '%(name)s' ) db.define_table('users', Field('name'), Field('city',db.city), Field('phone'), Field('email') ) What query will list all the users that are from a particular

Re: [web2py] WHERE equivalent in query?

2012-02-01 Thread Johann Spies
On 2 February 2012 07:40, shartha m.mirghorb...@gmail.com wrote: I have two databases as follows: db.define_table('city', Field('name'), Field('state'), format = '%(name)s' ) db.define_table('users', Field('name'), Field('city',db.city), Field('phone'),