[web2py:28074] Re: connection to the database from remote client command line

2009-08-06 Thread gabriel
Thanks for the quick answer. This action will then require to have the web2py.py installed on the remote client, do I guess well ? How to specify than the shell for execution is the one of the server, where the application is installed ? Can I add arguments on yourscript.py like : -R

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

2009-08-06 Thread Richard
On Aug 6, 2:55 pm, Bottiger bottig...@gmail.com wrote: Agree 100% If you are going to rewrite, best to do it soon instead of later. A quick look at the available applications:http://www.web2py.com/ appliances There simply is not that many of them, and most are just proofs of concept. I

[web2py:28076] Re: connection to the database from remote client command line

2009-08-06 Thread Fran
On Aug 6, 7:52 am, gabriel gabriel.sco...@sagem.com wrote: This action will then require to have the web2py.py installed on the remote client, do I guess well ? How to specify than the shell for execution is the one of the server, where the application is installed ? Can I add arguments on

[web2py:28077] Re: SQL and name of SUM field in a groupby

2009-08-06 Thread Fran
On Aug 6, 6:54 am, Dutch opera dutchop...@gmail.com wrote: db().select(db.test.date,db. test.url,db.test.hits.sum(), db.test.rev.sum(), groupby= db.test.datel) What is the name of the hits field?  In SQL I would do sum(hits) as sum_hits and sum(rev) as sum_rev rows =

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

2009-08-06 Thread Fran
On Aug 6, 6:05 am, mdipierro mdipie...@cs.depaul.edu wrote: The issue with now vs utfnow, althought I dismissed because it would break backward compatibility, I should have been more extensive. The OS timestamps files using the local time, not utc time. The average developer prefers using

[web2py:28079] Re: feature request: auth email to approver

2009-08-06 Thread Alex Fanjul
Ok, thats the way I did it... El 06/08/2009 7:06, mdipierro escribió: remove the registration_key using appadmin or write your own interface. On Aug 5, 9:18 pm, Alejandro Fanjulalex.fan...@gmail.com wrote: What is the best (smart) way to approve pending users? thanks On 27 jul,

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

2009-08-06 Thread Alex Fanjul
Yea Massimo, thats the point, I don't know if there are really big issues and it seems actually there aren't. It's almost a mind question to you and big developers, is there any big issue to consider non backward? It seems is not by your comments, :-D El 06/08/2009 7:05, mdipierro escribió:

[web2py:28081] Shell...print dates from query

2009-08-06 Thread Dutch opera
Hi, my query seens to work. In the shell...I run the query and I print the results 2009-07-27,0,0,0 2009-07-28,0,0,0 2009-07-29,0,0,0 if I loop though each of the fields they work...expect the date field. My mysql its stored as a datetime. in the shell for r in records: print

[web2py:28082] Re: Upgrade web2py with one click

2009-08-06 Thread Alex Fanjul
Wow, thats would be AWESOME...!!! And a good point in web2py marketing (yea, its not exactly marketing, but say visibility, presence... :-D) I was thinking that it would be imposible using cherrypy, because how do yo stop and restart de server if its using to upgrading at the same time? how do

[web2py:28083] utf- 8 chinese characters

2009-08-06 Thread max
I am inserting parsed text from a utf-8 xml file into a mysql database. there is a little problem, where i have to clarify. In my xml file i have entries like this. style高中语文教学目标与检测(下编)/stylestyle中学语文/style when i parse the data only the second entry is correctly inserted. I use the

[web2py:28084] get the row id from form

2009-08-06 Thread max
i am inserting Form values into a postgres database. For on-the fly parsing of other data, i need the entry id of the database, which was inserted by my form. I am getting this values by calculating field values and it is so ugly. Is there any web2py way of just getting the entry id of the

[web2py:28085] Re: get the row id from form

2009-08-06 Thread Mladen Milankovic
Hi. The id of inserted records will be in form.vars.id, assuming you call the form, form. Like: if form.accepts(request.vars, session): id = form.vars.id regards mmlado On Thursday 06 August 2009 10:43:26 max wrote: i am inserting Form values into a postgres database. For on-the fly

[web2py:28086] Re: Shell...print dates from query

2009-08-06 Thread Dutch opera
H..I figured it but it was not clearI get a group by clause and the date was a group was nested in the results On Aug 5, 10:12 pm, Dutch opera dutchop...@gmail.com wrote: Hi, my  query seens to work.  In the shell...I run the query and I print the results

[web2py:28087] Re: Google App Engine and get_by_key_name

2009-08-06 Thread Jim
Sure. Full details are on http://code.google.com/appengine/docs/python/datastore/modelclass.html hit on /confirm/account/(?Paccount.*)$ key_name = 'account:' + account acc = Account.get_by_key_name(key_name) if not acc: template_values = {'account' :

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

2009-08-06 Thread Timbo
It's been a while since I've been around but this seems to be an important discussion that I'd like to weigh in on. Massimo is right. Most of Armin's critiques are thought-out design decisions. The perceived problems from just looking at the code don't play out in reality due to being either a

[web2py:28089] How to a static file as logo

2009-08-06 Thread Johann Spies
I am trying my first web2py page and I am wasting hours even after watching several tutorial video's, reading the manual and the latest version of cookbook2.pdf. After createing a new application, I want to to customize the menu and put an image where the menu.py specifies: response.title =

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

2009-08-06 Thread Mladen Milankovic
Hi. Try: {{=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}} regards mmlado On Thursday 06 August 2009 16:36:11 Johann Spies wrote: I am trying my first web2py page and I am wasting hours even

[web2py:28091] LDAP Authentication notes

2009-08-06 Thread Ahmed Soliman
Hello everybody, I'm starting to dig more into web2py and I started playing with LDAP authentication which lacks documentation on the website, I managed to get it working but I have to following notes: 1. Change password still checks the password against the database, it should check

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

2009-08-06 Thread waTR
Re-writing a framework after 2-3 years is suicide. First, and foremost, we do not have enough developers to take-on such a huge task. Even if we did, it is still too early because they are not organized for such a task (look at Perl 6...and how long it is taking them to release a new version).

[web2py:28093] Re: connection to the database from remote client command line

2009-08-06 Thread Yarko Tymciurak
it sounds as if setting up a webservice on your server might be a more appropriate approach for what you want. See, for example, http://www.web2py.com/examples/default/examples#xmlrpc_examples http://www.web2py.com/examples/default/tools#services on the slides at http://www.web2py.com, making

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

2009-08-06 Thread Yarko Tymciurak
On Thu, Aug 6, 2009 at 9:49 AM, Mladen Milankovic mml...@gmail.com wrote: Hi. Try: {{=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 more sense for example if you want

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

2009-08-06 Thread Yarko Tymciurak
I think Massimo has already spoken to all these concerns / issues; Closing files explicitly is stylistic - saying what you mean (and not counting on side-effects of the system); it makes for more readable code in general (although some will complain about an extra line of typing, it is explicit

[web2py:28096] db - stored procedure

2009-08-06 Thread 陶艺夫
Hi, I'm using PostgreSQL, I need to use stored procedure to calculate on more than 5 records -- according to every people's birthday, figure out how much subsidy (s)he will get. Is this a rational idea? I have done calculating by a controller, but it has taken more than 50 seconds to get the

[web2py:28097] Re: Auth based on UUID

2009-08-06 Thread Alex Fanjul
Hello Vihang, I'm very curious and It would be very interesting to know how to build a distributed node app. Any short tutorial? guidelines? Thanks, Alex F El 04/08/2009 9:30, vihang escribió: Hello, I am currently working on an app which is distributed between different nodes. The issue

[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:28099] Re: Two tables that link to each other

2009-08-06 Thread JoshuaJ
Thanks for the info, this is exactly what I wanted! This seems to violate one of the basic principles of python programming philosophy: There should be one--and preferably only one-- obvious way to do it. In fact, this particular example demonstrates precisely why that rule of thumb is a good

[web2py:28100] Re: Auth based on UUID

2009-08-06 Thread vihang
Hello Alex, I am in the stage of 'figuring things out'. Frankly, I am as clueless as the next person. Just reading up on things and trying to put it together. But if I get something working, I would definitely put something up, atleast the good practice. Meanwhile I am struggling with

[web2py:28101] Re: Upgrade web2py with one click

2009-08-06 Thread mdipierro
After upgrate one may have to restart web2py. On Aug 6, 3:21 am, Alex Fanjul alex.fan...@gmail.com wrote: Wow, thats would be AWESOME...!!! And a good point in web2py marketing (yea, its not exactly marketing, but say visibility, presence... :-D) I was thinking that it would be imposible

[web2py:28102] Re: LDAP Authentication notes

2009-08-06 Thread mdipierro
On Aug 6, 5:42 am, Ahmed Soliman ah...@farghal.com wrote: Hello everybody, I'm starting to dig more into web2py and I started playing with LDAP authentication which lacks documentation on the website, I managed to get it working but I have to following notes:    1. Change password still

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

2009-08-06 Thread mdipierro
Why should I add when you can do it in your model? import datetime request.utcnow=datetime.datetime.utcnow() Massimo On Aug 6, 2:26 am, Fran francisb...@googlemail.com wrote: On Aug 6, 6:05 am, mdipierro mdipie...@cs.depaul.edu wrote: The issue with now vs utfnow, althought I dismissed

[web2py:28104] Re: db - stored procedure

2009-08-06 Thread mdipierro
You can do db.executesql('') and pass any sql you want. If you show us what you need to do specifically perhaps we can suggest a better way. Massimo On Aug 6, 1:13 pm, 陶艺夫 artman...@gmail.com wrote: Hi, I'm using PostgreSQL, I need to use stored procedure to calculate on more than

[web2py:28105] Web2py Plug-in system

2009-08-06 Thread b00m_chef
Is this being worked on? Who is involved? Is there a specification somewhere? --~--~-~--~~~---~--~~ 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

[web2py:28106] Left Join Failures

2009-08-06 Thread howesc
Hi all, I'm writing several queries with multiple tables, and left joins, and the generated SQL is not working with postgres: ProgrammingError: invalid reference to FROM-clause entry for table concert LINE 1: ..., artist LEFT JOIN audiofile ON audiofile.concert=concert.id...

[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:28108] How does db.table.field.represent work in the view?

2009-08-06 Thread __future__
I am sure this is something simple that I am missing here when you do something like: #model db.define_table('event', Field('description','text'), Field('creation_date','datetime', default=request.now), Field('start_date','datetime'), Field('creator',

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

2009-08-06 Thread Bottiger
I am trying to incorporate OpenID into Auth. In my attempt to implement a CAS style plugin into auth, I stumbled upon a bizzare error. On line 628 of gluon.tools, there is the following line: users = self.db(table_user[username] == keys[username]).select() username is defined to be username

[web2py:28110] Re: db - stored procedure

2009-08-06 Thread 陶艺夫
Thank you for reply. It's a charity project. The city goverment here decided to help old people who aged 70 above financially every month. There are aid standards here: age range : 70-7980-8990-9495-99100+ aid money: 30 80 150 300 500 You know, every

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

2009-08-06 Thread Yarko Tymciurak
Which version of web2py are you looking at? First - in the most current version, I think you are talking about line 653, in get_or_create_user(); You will note at the beginning of that function: if 'username' in keys: username = 'username' elif 'email' in keys:

[web2py:28112] Re: db - stored procedure

2009-08-06 Thread Yarko Tymciurak
can you calculate this as you process payment per person? Or is this something that is calculated once a month? The idea is that stored procedures work on the database engine, and can sometimes be more efficient, but you can do the same as you describe on the selected data. I think perhaps a

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

2009-08-06 Thread Bottiger
I am using the latest version. I know there is a check, but the check is useless. If you specify a username in the dictionary that comes with the argument, then it will automatically assume that your auth_users table has a username column, which isn't the case. On Aug 6, 5:58 pm, Yarko

[web2py:28114] Where'd table_newfilename go ?

2009-08-06 Thread AchipA
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 returned by sqlform.accepts() was far more natural, especially considering transactions...

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

2009-08-06 Thread Yarko Tymciurak
On Thu, Aug 6, 2009 at 8:09 PM, Bottiger bottig...@gmail.com wrote: I am using the latest version. By latest version do you mean revision 1062 from Launchpad, or do you mean I know there is a check, but the check is useless. If you specify a username in the dictionary that comes with the

[web2py:28116] Total Records

2009-08-06 Thread FERNANDO VILLARROEL
Hello All. If i have a query as the follow: rows=db(db.pagos.id_clientes==session.cliente_id).select(db.pagos.id,db.pagos.fecha,db.pagos.monto,db.pagos.comments,orderby=db.pagos.id) How i can know the total of records of the object rows? Fernando.

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

2009-08-06 Thread Yarko Tymciurak
On Thu, Aug 6, 2009 at 8:16 PM, Yarko Tymciurak yark...@gmail.com wrote: On Thu, Aug 6, 2009 at 8:09 PM, Bottiger bottig...@gmail.com wrote: I am using the latest version. By latest version do you mean revision 1062 from Launchpad, or do you mean Sorry - I meant Launchpad version 1062,

[web2py:28118] Re: Total Records

2009-08-06 Thread Yarko Tymciurak
len(rows) On Thu, Aug 6, 2009 at 8:17 PM, FERNANDO VILLARROEL fvillarr...@yahoo.comwrote: Hello All. If i have a query as the follow: rows=db(db.pagos.id_clientes==session.cliente_id).select(db.pagos.id ,db.pagos.fecha,db.pagos.monto,db.pagos.comments,orderby=db.pagos.id) How i can

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

2009-08-06 Thread Bottiger
The function takes a dictionary where if the username key is defined, then it assumes that your database has a username column which is incorrect behavior. On Aug 6, 6:16 pm, Yarko Tymciurak yark...@gmail.com wrote: On Thu, Aug 6, 2009 at 8:09 PM, Bottiger bottig...@gmail.com wrote: I am

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

2009-08-06 Thread Yarko Tymciurak
I see - so you would want an exception to be raised? What do you propose? On Thu, Aug 6, 2009 at 8:26 PM, Bottiger bottig...@gmail.com wrote: The function takes a dictionary where if the username key is defined, then it assumes that your database has a username column which is incorrect

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

2009-08-06 Thread Bottiger
Well you see, unlike the username column, the email column is actually defined. So there are 3 possible solutions. 1. Define a username column in the auth_user table by default. 2. Change username to a column that is actually defined, such as first_name 3. Remove the username check and usage

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

2009-08-06 Thread Yarko Tymciurak
yes, I think you are correct - since username is not in the default table definition, table access should be in a try / except, with some reasonable behavior... there are at least 3 places this exists... What woiuld be reasonable? if username doesn't exist in your tables, try 'email' next, and

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

2009-08-06 Thread Yarko Tymciurak
On Thu, Aug 6, 2009 at 8:42 PM, Bottiger bottig...@gmail.com wrote: Well you see, unlike the username column, the email column is actually defined. So there are 3 possible solutions. 1. Define a username column in the auth_user table by default. well, the problem then is that if you WANT

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

2009-08-06 Thread Bottiger
well, the problem then is that if you WANT to use email as username, you have duplicate fields; Actually as I am implementing OpenID, I am finding a need for a separate field. In websites where you need to publicly display the person's username, such as with comments etc... your users might

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

2009-08-06 Thread Yarko Tymciurak
That's fine - then if you are building an OpenID application, you can either: manually have a separate field, or - have the OpenID solution modify what the default auth fields are. This way, other apps still have choice. On Thu, Aug 6, 2009 at 8:54 PM, Bottiger bottig...@gmail.com wrote:

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

2009-08-06 Thread Yarko Tymciurak
maybe a fifth option is to make the username a settable item, much like auth_table_name is, have a username_name item, and thus the tables can be defined this way? The advantage is it would simplify the tools code (instead of adding try/except), and I think would serve the need you point out.

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

2009-08-06 Thread Bottiger
At this point I think it would just be easier to let Massimo decide. Anyway, OpenID integration with Auth is coming along. It is usable but has some security concerns because people can change their OID in their profile. http://bitbucket.org/bottiger/web2py-openid-cas/overview/ On Aug 6, 7:05 

[web2py:28128] View Pagination Help

2009-08-06 Thread FERNANDO VILLARROEL
Hello. I am trying to implementing the example pagination: http://www.web2py.com/AlterEgo/default/show/95 How i use backward and forward in the view: {{extend 'layout.html'}} h2Pagos Cliente/h2 table {{for row in rows:}} ..

[web2py:28129] Re: How does db.table.field.represent work in the view?

2009-08-06 Thread DenesL
event.creator in the view is not a field, it is just an element in a row besides represent is only used by SQLFORM and SQLTABLE (the later explains why BEAUTIFY works). If you want to use represent in the view you would have to do so explicitly: {{ for e in events: }}         li{{

[web2py:28130] IS_EMAIL validator problem

2009-08-06 Thread DenesL
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. --~--~-~--~~~---~--~~ You received this message because

[web2py:28131] session forgetMeNot

2009-08-06 Thread rb
Section 4.8 from the Web2py Manual states that session data remains until/unless the user deletes the session cookie or else the session expires. When does a session expire - or what causes a session to expire? Do I have any control over maintaining the life of a session ? I guess I can delete a

[web2py:28132] Re: session forgetMeNot

2009-08-06 Thread Richard
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 cookie or else the session expires. When does a session expire - or what causes a session to expire?

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

2009-08-06 Thread jayvandal
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 manual. In this Images 3.6 , I am following the code and I am lost atthis point. Thanks for any help Jim Error traceback 1.2.3.4.5.6.7.