[web2py] Invalid request when url for static file contains space

2013-06-01 Thread Alastair Medford
Hey, searched around I'm having the same problem as the following topic: https://groups.google.com/d/topic/web2py/yNwOUgOeKqI/discussion I get invalid request when I try to visit the following url: http://127.0.0.1:8000/myapp/static/skillPages/fall2012/MT%20Burk/MT%20Burk_2_01-06-13_R1.pdf; The

[web2py] Re: Strange radio button behavior

2010-08-11 Thread Alastair Medford
Just touching base to see if anyone has had a chance to look into this yet. On Jul 29, 12:59 am, mdipierro mdipie...@cs.depaul.edu wrote: will look into this asap. On Jul 29, 1:54 am, Alastair Medford alastairmedf...@gmail.com wrote: After wandering around in the source, I think I've found

[web2py] Re: Strange radio button behavior

2010-07-29 Thread Alastair Medford
After wandering around in the source, I think I've found the culprit code. In html.py - Input class - _post_processing function, there's the following condition: elif t == 'radio': if str(self['value']) == str(self['_value']): self['_checked'] = 'checked' else:

[web2py] Re: Strange radio button behavior

2010-07-28 Thread Alastair Medford
On Jul 28, 6:26 am, René nachrichten.onl...@gmail.com wrote: I've experienced the same behaviour, and I noticed something that probably is the solution. I have a website that provides several quizes and questionaires, and all radio buttons created using the INPUT() method have the checked

[web2py] Strange radio button behavior

2010-07-27 Thread Alastair Medford
I was wanting to have horizontal radio buttons in my forms, so I set about making my own widget. The widget works well, except for one odd behavior. When I load the form, the first radio button is selected as desired. But after the form submits, page refreshes etc, the last radio buttons in the

[web2py] Re: Strange radio button behavior

2010-07-27 Thread Alastair Medford
So I've investigated further and this behavior happens with the built- in vertical widget as well. I've browsed the source a bit but I can't find why this would be happening. Any ideas?

[web2py] Possible addition to IS_IN_DB

2010-07-09 Thread Alastair Medford
As it stands, when one places the IS_IN_DB validator on a field, you get a select list with options of all the rows in the given table. This is great, but now I'm looking for a little more functionality. For my application I'm looking to filter the selection down to a given db requirement. For

[web2py] Re: Possible addition to IS_IN_DB

2010-07-09 Thread Alastair Medford
čnc, 08:08, Alastair Medford alastairmedf...@gmail.com wrote: As it stands, when one places the IS_IN_DB validator on a field, you get a select list with options of all the rows in the given table. This is great, but now I'm looking for a little more functionality. For my application I'm

[web2py] validators with dependencies

2010-06-27 Thread Alastair Medford
Alright, I'm burned out on trying to solve this. I'm trying to make a form that checks if two fields match, like password + verify password. I noticed in the book that there's an example of this, but I can't seem to get it working. The code given is as follows (this is with a typo correction, a

[web2py] Re: validators with dependencies

2010-06-27 Thread Alastair Medford
), Anyway, this seems to come up a lot, so I added a new validator in trunk:  IS_EQUAL_TO(request.vars.password) Please give it a try. On Jun 27, 1:52 am, Alastair Medford alastairmedf...@gmail.com wrote: Alright, I'm burned out on trying to solve this. I'm trying to make a form

[web2py:31220] Re: pre-filling non writable form value

2009-09-17 Thread Alastair Medford
Found my mistake. I put the lines after form = SQLFORM(..) instead of before. However, this method still leaves a bad taste in my mouth. Since every request is also sending a table redifinition, this seems like un-needed overhead. This also has the problem of what if the given database does not

[web2py:31177] pre-filling non writable form value

2009-09-16 Thread Alastair Medford
What I'm trying to do is preset the value of a non writable field in a form, such as a time field. Something to the effect of: form = SQLFORM(db.table) form.vars.time = getCurrentTime() #this field is set to writable false if form.accepts(...): ... The desired rendering would be that the

[web2py:30332] Odd form behavior with multiple forms

2009-09-07 Thread Alastair Medford
Currently I am displaying multiple forms on one page via iframes, each calling the same controller. When only one form is displayed on the page, the form submits properly and validates etc. When two forms are displayed however, pressing submit merely refreshes the iframe. When I hit submit a

[web2py:30355] Re: Odd form behavior with multiple forms

2009-09-07 Thread Alastair Medford
): with if form.accepts(request.vars): Massimo On Sep 7, 4:31 pm, Alastair Medford alastairmedf...@gmail.com wrote: Currently I am displaying multiple forms on one page via iframes, each calling the same controller. When only one form is displayed on the page, the form submits properly

[web2py:29594] Re: Storing SQLFORM in a session problem

2009-08-28 Thread Alastair Medford
to this thread. A session can only store primitive python types, not objects like forms. Massimo On Aug 26, 12:11 pm, Alastair Medford alastairmedf...@gmail.com wrote: I'm sorry if this appears twice anywhere, I made this post last night but I think groups lied about it being posted

[web2py:29373] Storing SQLFORM in a session error

2009-08-26 Thread Alastair Medford
After my previous question of trying to submit an SQLFORM brought in by ajax, I've done a bit of poking around and I think I've figured out the next step. What I'm trying to do is each time I generate an SQLForm, I would like to be able to store it into a list in the users session, or any sort of

[web2py:29436] Storing SQLFORM in a session problem

2009-08-26 Thread Alastair Medford
I'm sorry if this appears twice anywhere, I made this post last night but I think groups lied about it being posted, as I can find no trace of it. After thinking some things through I think I understand the problem behind my previous question and am now trying a new route. As I generate forms, I

[web2py:29435] Re: Troubles fwith SQLFORM returned from ajax call

2009-08-26 Thread Alastair Medford
on. Since this is not the page that created the form, there`s nothing in it to handle the form data. I`m currently seeking an alternative route in a new thread. On Aug 26, 8:36 am, DenesL denes1...@yahoo.ca wrote: Hard to tell without the code that does the ajaxing. On Aug 23, 7:11 pm, Alastair

[web2py:29171] Re: Troubles fwith SQLFORM returned from ajax call

2009-08-23 Thread Alastair Medford
and there's no documentation of it other than in the post itself. Is there any way to refresh a portion of the page without using jdivs? On Aug 22, 11:28 am, Alastair Medford alastairmedf...@gmail.com wrote: Wel, I figured out how to make the calendar widget work on the form at least. I re-called

[web2py:29175] Re: Troubles fwith SQLFORM returned from ajax call

2009-08-23 Thread Alastair Medford
://www.sitepoint.com/article/ajax-jquery/ On Sun, Aug 23, 2009 at 5:06 PM, Alastair Medford alastairmedf...@gmail.com wrote: I haven't been able to find anything on google about submitting forms that have been brought it by ajax. I did notice deep in mailing list archives a mention about

[web2py:28987] Troubles fwith SQLFORM returned from ajax call

2009-08-20 Thread Alastair Medford
What I am trying to do is create a controller function that can be called via ajax and returns some html content along with an SQLFORM. I've got the content and form to appear on the page, but the SQLFORM doesn't work as it should. When I submit information from the view that the generated

[web2py:29031] Re: Troubles fwith SQLFORM returned from ajax call

2009-08-20 Thread Alastair Medford
still doesn't work, and the form doesn't appear to do anything other than refreshing the entire page. Any ideas? On Aug 20, 10:22 am, DenesL denes1...@yahoo.ca wrote: On Aug 20, 4:18 am, Alastair Medford alastairmedf...@gmail.com wrote: What I am trying to do is create a controller function

[web2py:28694] Re: Using SQLFORM with gererated tables

2009-08-15 Thread Alastair Medford
On Aug 15, 12:17 am, Alastair Medford alastairmedf...@gmail.com wrote: I am having a problem using SQLFORM with tables that have been generated from an xml file. The error I'm getting is a key error, from trying to SQLFORM(getattr(db, tablename)). I'm pretty sure this is because the tables

[web2py:28670] Using SQLFORM with gererated tables

2009-08-14 Thread Alastair Medford
I am having a problem using SQLFORM with tables that have been generated from an xml file. The error I'm getting is a key error, from trying to SQLFORM(getattr(db, tablename)). I'm pretty sure this is because the tables being generated in the model have not been 'finalized' so to speak when the

[web2py:28182] Re: How to POST information from link?

2009-08-07 Thread Alastair Medford
and you can pass data it. I think you can do what you need using the jQuery.ajax. On Aug 6, 6:55 pm, Alastair Medford alastairmedf...@gmail.com wrote: What I'm trying to do is place information into a nornal a link, which will be sent along with an onclick ajax call. I know how to do

[web2py:28098] Re: How to change how IS_IN_DB() is rendered?

2009-08-06 Thread Alastair Medford
So then I would do something like form.accepts(..., onvalidation=lambda form: myvalidator(form)) ? I suppose if I use my validator to verify the value is in the other table, then I wouldn't need to use IS_IN_DB, and could render it however I want. Thanks, and sorry for the slow response. On Aug

[web2py:28107] How to POST information from link?

2009-08-06 Thread Alastair Medford
What I'm trying to do is place information into a nornal a link, which will be sent along with an onclick ajax call. I know how to do this when the information is from an input tag just fine. But in this case I would like the information, like an id, to be contained somewhere in the a tag itself.

[web2py:27814] Re: Table reference question

2009-08-02 Thread Alastair Medford
:32 am, Alastair Medford alastairmedf...@gmail.com wrote: db.student.student_id.requires=IS_NOT_IN_DB(db,'student.student_id') db.tasks.student.requires=IS_IN_DB(db,'student.id','%(student_id)s') db.tasks.student.represent=lambda id: db.student[id].student_id This seems to accomplish

[web2py:27872] How to change how IS_IN_DB() is rendered?

2009-08-02 Thread Alastair Medford
Alright, this quetion seems like it should have an easy answer and I'm just missing something. Currently IS_IN_DB is rendered as a drop down box. What I would like to do is have the user be able to type in an identification number (which as you can guess is not very easy to find in a dropdown or

[web2py:27740] Re: Table reference question

2009-07-31 Thread Alastair Medford
Thanks for the responses. db.student.student_id.requires=IS_NOT_IN_DB(db,'student.student_id') db.tasks.student.requires=IS_IN_DB(db,'student.id','%(student_id)s') db.tasks.student.represent=lambda id: db.student[id].student_id This seems to accomplish what I was trying to do, thanks.

[web2py:27480] Table reference question

2009-07-27 Thread Alastair Medford
I've been looking into creating a table reference (or foreign key) in web2py and have only found db.Field('name', db.otherTable). Now as I understand it, this creates an integer field in the table that contains the hidden web2py integer id of the entry in the other table. Is this the case? If