On Aug 6, 6:54 am, Dutch opera 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 = db().select(db.test.date,db.test.url,
On Aug 6, 6:05 am, mdipierro 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 localtime vs utc time.
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 Fanjul wrote:
>
>> What is the best (smart) way to approve pending users?
>> thanks
>>
>> On 27 jul, 17:25, Hans
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ó:
>
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 r
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
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.
高中语文教学目标与检测(下编)<ä¸å¦è¯æ–‡
when i parse the data only the second entry is correctly inserted.
I use the myDatabase.executesql()
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 curre
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
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 wrote:
> 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,
Sure. Full details are on
http://code.google.com/appengine/docs/python/datastore/modelclass.html
hit on /confirm/account/(?P.*)$
key_name = 'account:' + account
acc = Account.get_by_key_name(key_name)
if not acc:
template_values = {'account' : account}
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
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 = req
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 afte
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 bindin
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).
Ba
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 con
On Thu, Aug 6, 2009 at 9:49 AM, Mladen Milankovic 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 to do m
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 to
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 re
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 iss
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 3
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
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 distributed
After upgrate one may have to restart web2py.
On Aug 6, 3:21 am, Alex Fanjul 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 using cherrypy, becau
On Aug 6, 5:42 am, Ahmed Soliman 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 checks the pa
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 wrote:
> On Aug 6, 6:05 am, mdipierro wrote:
>
> > The issue with now vs utfnow, althought I dismissed because it would
> > break backward compatibility
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, 陶艺夫 wrote:
> Hi,
> I'm using PostgreSQL, I need to use stored procedure to calculate on more
> than 5 records -- acco
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 unsub
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...
What I'm trying to do is place information into a nornal link,
which will be sent along with an onclick ajax call. I know how to do
this when the information is from an tag just fine. But in
this case I would like the information, like an id, to be contained
somewhere in the tag itself.
The re
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', db.auth_user,default=auth.use
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
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 mon
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:
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 nic
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 Tymciurak
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...
--~--~-~--~-
On Thu, Aug 6, 2009 at 8:09 PM, Bottiger 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 argument, t
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.
--~--~-~--~~---
On Thu, Aug 6, 2009 at 8:16 PM, Yarko Tymciurak wrote:
> On Thu, Aug 6, 2009 at 8:09 PM, Bottiger 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, or Released Version 1.6
len(rows)
On Thu, Aug 6, 2009 at 8:17 PM, FERNANDO VILLARROEL
wrote:
>
>
> 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
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 wrote:
> On Thu, Aug 6, 2009 at 8:09 PM, Bottiger wrote:
>
> > I am using the latest version.
>
> By "
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 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 behavior.
>
> On
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
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, an
On Thu, Aug 6, 2009 at 8:42 PM, Bottiger 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 to u
> 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 n
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 wrote:
>
> > well, the problem th
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. Wha
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 p
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'}}
Pagos Cliente
{{for row in rows:}}
..
.
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: }}
{{ =db.event.creato
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 yo
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 s
try auth.settings.expiration = X
On Aug 7, 2:35 pm, rb 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? Do I have any
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. Traceb
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 this
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. I
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
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 wrote:
> Hi all,
>
> I'm writing several queries
61 matches
Mail list logo