[web2py:28134] Re: Images page 60 list index out of range

2009-08-07 Thread Yarko Tymciurak
did you create an image with the admin interface, as shown on p. 56? If you did not, then the select on line 6 would return NO records, and therefore select()[0] would create an index out of range. You can check / change this by re-writing the select in the show() procedure to something like

[web2py:28135] Re: IS_EMAIL validator problem

2009-08-07 Thread Jonathan Lundell
On Aug 6, 2009, at 9:32 PM, DenesL wrote: IS_EMAIL does not follow the RFC specs for valid email addresses (see http://en.wikipedia.org/wiki/E-mail_address) even a simple a...@b.com fails it is kinda late to work on the regex now, maybe tomorrow. The RFC is fairly hard to validate. If

[web2py:28136] Re: Web2py Plug-in system

2009-08-07 Thread mdipierro
We talk about this over and over but no progress. It is not an issue of coding. We define a plugin as a piece of an application stored in: models/plugin_[name].py controllers/plugin_[name].py views/plugin_[name]/*.html modules/plugin_[name]/* static/plugin_[name]/* We also need a convention for

[web2py:28137] Re: Left Join Failures

2009-08-07 Thread mdipierro
Please try a new version of web2py (I remember addressing a bug about this in the past). if you still have a problem, try print the _select and let us see the generate sql. This should definitively be possible. Massimo On Aug 6, 6:15 pm, howesc how...@umich.edu wrote: Hi all, I'm writing

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

2009-08-07 Thread mdipierro
This is the source of the web2py ajax function: function ajax(u,s,t) { var query=; for(i=0; is.length; i++) { if(i0) query=query +; query=query+encodeURIComponent(s[i])+=+encodeURIComponent (document.getElementById(s[i]).value); } jQuery.ajax({type: POST, url: u, data: query,

[web2py:28139] Re: Where'd table_newfilename go ?

2009-08-07 Thread mdipierro
Sorry. This is a bug. I will fix it later today. On Aug 6, 8:11 pm, AchipA attila.cs...@gmail.com wrote: I might have missed a few classes, but where did the newfilename field go from SQLFORM's accepts/vars and why ? I know I can query it back from the DB but it's kind of awkward, having it

[web2py:28140] Re: session forgetMeNot

2009-08-07 Thread rb
Thx. But where'd you get this info from? On Aug 6, 10:31 pm, Richard richar...@gmail.com wrote: try auth.settings.expiration = X On Aug 7, 2:35 pm, rb rbspg...@gmail.com wrote: Section 4.8 from the Web2py Manual states that session data remains until/unless the user deletes the session

[web2py:28141] Re: Bizzare Auth Bug. Could Fix But Need Massimo's Ok

2009-08-07 Thread mdipierro
Hi Bottiger, When Auth was first developed was that if username is defined in a custom auth_user table then it would be used. I do not think we should modify the auth_user table in order to allow an extension (openid) to work. I would prefer to create a mechanism of hooks by which the extension

[web2py:28142] Re: View Pagination Help

2009-08-07 Thread mdipierro
That code was very old so I cleaned it up a big. Anyway, your example below should work and should have worked. What problems do you have? On Aug 6, 9:20 pm, FERNANDO VILLARROEL fvillarr...@yahoo.com wrote: Hello. I am trying to implementing the example pagination:

[web2py:28143] ldap authentification

2009-08-07 Thread max
How can i configure the Active directory authentification using CAS? should i have to uncomment and edit the auth.settings.login_methods.append(ldap_auth (mode='ad',server='my.domain.controller',base_dn=ou=Users,dc=domain,dc=com,bind_dn=cn=Administrator,ou=Users,d

[web2py:28144] Re: session forgetMeNot

2009-08-07 Thread mdipierro
Let me clarify here: The session object never expires. The Auth(entication) information stored inside a session object does expire. This has to do with login/login not with session data. Basically session contains session.auth and if Auth expires, session.auth is deleted. This should be better

[web2py:28145] Re: IS_EMAIL validator problem

2009-08-07 Thread mdipierro
I will take a patch for this. Massimo On Aug 7, 1:33 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 6, 2009, at 9:32 PM, DenesL wrote: IS_EMAIL does not follow the RFC specs for valid email addresses (seehttp://en.wikipedia.org/wiki/E-mail_address) even a simple a...@b.com fails

[web2py:28146] Re: IS_EMAIL validator problem

2009-08-07 Thread Jonathan Lundell
On Aug 7, 2009, at 12:22 AM, mdipierro wrote: I will take a patch for this. If nobody else gets to it first, I'll work up a patch over the weekend. Massimo On Aug 7, 1:33 am, Jonathan Lundell jlund...@pobox.com wrote: On Aug 6, 2009, at 9:32 PM, DenesL wrote: IS_EMAIL does not follow

[web2py:28147] Re: breadcrumb design

2009-08-07 Thread Richard
hi Alex, I am now using this automatic breadcrumb function: def breadcrumbs(): Create breadcrumb links for current request # make links pretty by capitalizing and using 'home' instead of 'default' pretty = lambda s: s.replace('default', 'home').replace('_', ' ').capitalize()

[web2py:28148] Re: db - stored procedure

2009-08-07 Thread Sebastian E. Ovide
consider also to change logic... instead of calculating 50k age range every time that you need to see that view, you could add an extra field containing the range... you could do add an extra field telling when it will change range... then you could calculate new range only on a fraction of the

[web2py:28149] Re: db - stored procedure

2009-08-07 Thread 陶艺夫
Thank you! I'll try the last method, it's more rational I think. 2009/8/7 Sebastian E. Ovide sebastianov...@gmail.com consider also to change logic... instead of calculating 50k age range every time that you need to see that view, you could add an extra field containing the range... you

[web2py:28150] Form_factory on Google Appengine

2009-08-07 Thread Delaney Burke
Hi, i am using a form_factory on GAE and i keep getting this error. In FILE: /base/data/home/apps/thewallapp/1.335448138740622861/ applications/init/controllers/account.py Traceback (most recent call last): File /base/data/home/apps/thewallapp/1.335448138740622861/gluon/ restricted.py, line

[web2py:28151] Re: Form_factory on Google Appengine

2009-08-07 Thread mdipierro
If you only use this on GAE there is no problem. The problem is that somehow you are not uploading the yourapp/databases folder on GAE. It should be there althought it should be empty. On Aug 7, 6:05 am, Delaney Burke delaney.bu...@gmail.com wrote: Hi, i am using a form_factory on GAE and i

[web2py:28152] Re: ldap authentification

2009-08-07 Thread Fran
On Aug 7, 8:19 am, max dulip.withan...@gmail.com wrote: How can i configure the Active directory authentification using CAS? should i have to uncomment and edit the auth.settings.login_methods.append(ldap_auth

[web2py:28153] Re: LDAP Authentication notes

2009-08-07 Thread Fran
On Aug 6, 11:42 am, Ahmed Soliman ah...@farghal.com wrote:    1. Change password still checks the password against the database, it    should check binding to the LDAP instead.    2. We should add method to hook on change profile and change password to    update the LDAP as well. Definitely

[web2py:28155] Re: ldap authentification

2009-08-07 Thread max
thanks, fran On 7 Aug., 14:10, Fran francisb...@googlemail.com wrote: On Aug 7, 8:19 am, max dulip.withan...@gmail.com wrote: How can i configure the Active directory authentification using CAS? should i have to uncomment and edit the auth.settings.login_methods.append(ldap_auth

[web2py:28154] Re: How to a static file as logo

2009-08-07 Thread Johann Spies
2009/8/6 Yarko Tymciurak yark...@gmail.com: On Thu, Aug 6, 2009 at 9:49 AM, Mladen Milankovic mml...@gmail.com wrote: {{=IMG(_src=URL(r=request, c='static', f='Tux.jpg'))}} Everything you want to write out in the view, from python code needs = like: {{=variable}} Yes ... this will make

[web2py:28156] Question about where various things belong.

2009-08-07 Thread __future__
I realize that there are many place you *can* put things but I was wondering if there is a best-practice or web2py convention I should follow for where certain things belong. In the controller, I am sure most people rely on custom functions for various things. Where should these functions live?

[web2py:28157] Re: Question about where various things belong.

2009-08-07 Thread Fran
On Aug 7, 3:03 pm, __future__ wrigh...@gmail.com wrote: In the controller, I am sure most people rely on custom functions for various things.  Where should these functions live?  They don't seem like they belong in the controller.  Should they go in a module? If the function only applies to

[web2py:28158] Re: Images page 60 list index out of range

2009-08-07 Thread jayvandal
I have two image records and two comment records I will try your code Thanks , Jim On Aug 6, 11:54 pm, jayvandal jayvan...@gmail.com wrote: Error ticket for images Ticket 127.0.0.1.2009-08-06.23-39-06.cf3dcbd3-ce73-4175-8d61- ff5aca00c066 Hello, I am reworking the tutorials in the web2py

[web2py:28159] Re: IS_EMAIL validator problem

2009-08-07 Thread Carl
This is an excellent article on the traps to beware of when regex'ing email address formats http://www.regular-expressions.info/email.html This may ignite a debate though :) I favour this variation... [a-z0-9!#$%'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%'*+/=?^_`{|}~-]+)*@(?:[a-

[web2py:28160] Re: IS_EMAIL validator problem

2009-08-07 Thread Jonathan Lundell
On Aug 7, 2009, at 8:13 AM, Carl wrote: This is an excellent article on the traps to beware of when regex'ing email address formats http://www.regular-expressions.info/email.html This may ignite a debate though :) A discussion, maybe. In the abstract, I like the idea of verifying the

[web2py:28161] Re: IS_EMAIL validator problem

2009-08-07 Thread Carl
You've convinced me that staying close to RFC is a best choice even though we lose the opportunity for users to correct addresses at the point of data entry. nb the suggested regex in my last posting doesn't work well enough! e.g., a...@domain.co.uk isn't matched C On Aug 7, 4:48 pm,

[web2py:28162] Re: Fwd: My thoughts on web2py

2009-08-07 Thread Fran
On Aug 6, 10:12 pm, mdipierro mdipie...@cs.depaul.edu wrote: you can do it in your model? import datetime request.utcnow=datetime.datetime.utcnow() Perfect, thanks :) I'd suggest putting this into scaffolding app myself, but entirely your call... F

[web2py:28163] Re: Fwd: My thoughts on web2py

2009-08-07 Thread Fran
On Aug 6, 10:12 pm, mdipierro mdipie...@cs.depaul.edu wrote: Why should I add when you can do it in your model? So that it can be included in Auth without needing to subclass. Seems like a good enough reason to me... F --~--~-~--~~~---~--~~ You received this

[web2py:28164] Re: db - stored procedure

2009-08-07 Thread Donald Hughes
Are you trying to write 50,000 rows to a single webpage without paging? If so, you might find the bottleneck is in the browser trying to render a table that large. I ran the query below on a similar set of data, albeit in MS SQL Server 2005 so I'm sure the SQL will vary from that of

[web2py:28165] problem with (supose) yaml file

2009-08-07 Thread Carlos Aboim
Hi folks, I am developing on Mac Platform 10.4.11 With the GAE Laucher, but when I try to deploy my app to GAE it seems the Laucher don't find the yaml Here is the log error: *** Running dev_appserver with the following flags: --admin_console_server= --port=8081 Python command:

[web2py:28166] Re: Bizzare Auth Bug. Could Fix But Need Massimo's Ok

2009-08-07 Thread Yarko Tymciurak
Massimo - There is nonetheless the issue Bottiger points out that if username is passed in a form to this function, it will fail - there should be some reasonable behavior (as per the discussions here). I think this is a separate issue from what extensions may want to do. I think we should

[web2py:28167] Re: IS_EMAIL validator problem

2009-08-07 Thread Yarko Tymciurak
Whoever makes up this patch, since this is complicated enough, can I ask you follow the commented regex style (re.X) which is now used to validate paths; see example starting on line 74 of main.py: http://bazaar.launchpad.net/~mdipierro/web2py/devel/annotate/head%3A/gluon/main.py Thanks, - Yarko

[web2py:28168] Re: Fwd: My thoughts on web2py

2009-08-07 Thread Yarko Tymciurak
even a commented out version of this in the scaffold, showing what you can uncomment if you need utc might be useful. On Fri, Aug 7, 2009 at 11:11 AM, Fran francisb...@googlemail.com wrote: On Aug 6, 10:12 pm, mdipierro mdipie...@cs.depaul.edu wrote: Why should I add when you can do it in

[web2py:28169] web2py ajax spreadsheet

2009-08-07 Thread mikech
New video on vimeo by mdpierro http://www.vimeo.com/5432441. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this

[web2py:28170] Re: db - stored procedure

2009-08-07 Thread 陶艺夫
Thank you for you help! I fetch all 5 records from database not for displaying in the browser. I found the bottleneck was using python's 'for .. in ..' loops. I wrote a record to a row of an Excel file(using xlwt) within every loop. And I found it was unavoidable. Now for 5+ records,

[web2py:28171] Re: Images page 60 list index out of range

2009-08-07 Thread jayvandal
Hi, I tried your code an I got the same error. It pointed to the first line of your code gave the same error , I guess the first record is 0 so the code is pointing to the first record? Thanks for your help Jim Error ticket for images Ticket

[web2py:28172] Re: Images page 60 list index out of range

2009-08-07 Thread Yarko Tymciurak
that seems to be saying request.args[0] is the problem - make sure you don't have a typo in your views/default/index.html; be sure you have the brackets properly balanced in the , args=[image.id] part of the 5th line. On Fri, Aug 7, 2009 at 1:54 PM, jayvandal jayvan...@gmail.com wrote:

[web2py:28173] Re: IS_EMAIL validator problem

2009-08-07 Thread Jonathan Lundell
On Aug 7, 2009, at 10:04 AM, Yarko Tymciurak wrote: Whoever makes up this patch, since this is complicated enough, can I ask you follow the commented regex style (re.X) which is now used to validate paths; see example starting on line 74 of main.py:

[web2py:28174] strftime problem

2009-08-07 Thread 陶艺夫
Hi, my app got an error in db(db.person.birth_date=_date) , when the _date had a value '1900-01-01'. That's for python's strftime constraint. I found chaging _date to _date.isoformat() would work, and I had to search whole my app to make the change. Or is there a better solution? Thanks.

[web2py:28175] Re: IS_EMAIL validator problem

2009-08-07 Thread Yarko Tymciurak
On Fri, Aug 7, 2009 at 2:14 PM, Jonathan Lundell jlund...@pobox.com wrote: On Aug 7, 2009, at 10:04 AM, Yarko Tymciurak wrote: Whoever makes up this patch, since this is complicated enough, can I ask you follow the commented regex style (re.X) which is now used to validate paths; see

[web2py:28176] Re: strftime problem

2009-08-07 Thread Yarko Tymciurak
Wow! You're preparing for dealing with some of the oldest living people on earth here! On Fri, Aug 7, 2009 at 2:22 PM, 陶艺夫 artman...@gmail.com wrote: Hi, my app got an error in db(db.person.birth_date=_date) , when the _date had a value '1900-01-01'. That's for python's strftime constraint.

[web2py:28177] Re: problem with (supose) yaml file

2009-08-07 Thread mdipierro
You need the source version to deploy on GAE. The binary versions do not include the app.yaml file. Even if we did you would still need the source version to run the google development server, something you must do in order to build the index.yaml file. Moreover the binary version only include

[web2py:28178] filtering values offered in selectbox

2009-08-07 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello! Is it possible to restrict or filter choices listed in a select box generated by SQLFORM for a field referring to other table? E.g. I have a field person_id with reference to person.id. I wish to allow only persons, who meet some criteria

[web2py:28179] Re: strftime problem

2009-08-07 Thread 陶艺夫
It's just a try, means nothing :) But what if the date is not birth_date and really means something 2009/8/8, Yarko Tymciurak yark...@gmail.com: Wow! You're preparing for dealing with some of the oldest living people on earth here! On Fri, Aug 7, 2009 at 2:22 PM, 陶艺夫

[web2py:28180] Bug: rows.response is no longer a list

2009-08-07 Thread rfx_labs
Hi, rows.response is now SQLite3.row but shut be list: Manual Page 146: Notice that an SQLRows object is a container for: 1 rows.colnames 2 rows.response colnames is a list of the column names returned by the raw select. response is a list of tuples which containes the raw response of select,

[web2py:28181] Moving Questions to Stackoverflow

2009-08-07 Thread Bottiger
We should direct people to http://stackoverflow.com to answer questions in order to boost traffic. There is a bigger audience there and people regularly seeing Web2Py being asked may stumble upon it. Google Groups is not a very convenient way to find questions and answers.

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

2009-08-07 Thread Alastair Medford
I was thinking it would take me a long time to figure out how to use jquery for this application, but I guess it's been a while since I've looked at the source because I think I can already spot what I need to do. I should just be able to copy the function but change .value to whatever tag

[web2py:28183] Re: filtering values offered in selectbox

2009-08-07 Thread DenesL
Hi David, use any query in combination with widget e.g.: q=db.person.name.like('A%') r=db(q).select(db.person.id,db.person.name) db.table2.person_id.widget= lambda self,value: SELECT (_name='person_id',*[OPTION(e.name,_value=e.id) for e in r]) you can also build the validator:

[web2py:28185] Vista a problem for web2py?

2009-08-07 Thread jayvandal
Could I have problems with Vista and web2py? I am having trouble in WIKI in web2py manual with the index as I had in IMAGES?? JIM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this

[web2py:28186] Re: Images page 60 list index out of range

2009-08-07 Thread Yarko Tymciurak
I'm not sure how you deleted the database, but you could have a confused web2py - it keeps track of the state of migrations / creations of the tables in the databases directory of your application; you wiill want to remocve the *.table and *.log files from there; If you are using sqlite - the

[web2py:28187] Re: Web2py Plug-in system

2009-08-07 Thread waTR
What about starting a wiki on this? Just post everything that has been achieved to-date re: specification ideas. On Aug 6, 11:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: We talk about this over and over but no progress. It is not an issue of coding. We define a plugin as a piece of an

[web2py:28188] Web2py.com down

2009-08-07 Thread b00m_chef
Just tried to access web2py.com and was not up. Tried using a proxy (guardster), same result. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

[web2py:28189] Re: Web2py.com down

2009-08-07 Thread Yarko Tymciurak
try www.web2py.com On Fri, Aug 7, 2009 at 11:33 PM, b00m_chef r...@devshell.org wrote: Just tried to access web2py.com and was not up. Tried using a proxy (guardster), same result. --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:28191] Login, Auth and Fields and Custom

2009-08-07 Thread Dutch opera
Hi, If I add the below I can login. #Controller def login: return dict(form=auth.login()) #View {{=form}} I need to style the submit button and the email and username fields. From the controller..how to I add email and password as separate fields and to custom submit button while keeping