On Thu, Sep 1, 2011 at 2:26 AM, Roberto Perdomo roberto...@gmail.comwrote:
Bruno, please add #refreshLabel = 'Refresh' to you example of powergrid, or
the best solution: why not use T('label') as example
self.attributes['refreshLabel'] = T('Refresh') in powergrid.py for
translate support?
Janrain has new widgets
**
Dear Janrain Customer,
I have some exciting news to share. We have been hard at work for the past
several months building the next generation Janrain Engage social login
widget and are happy to announce that after several weeks of closed beta, we
will be rolling
I've become addicted to shortcuts, and I'm surprised to get an off by
one error when using my favorite:
db().select(db.table.ALL)[id] where id is the row you want to
retrieve.
In my case, the row data is for the id+1 row, not the id row. I'm
using the latest released version (1.98.2) on Mac
@Bruno,
are you creating the form object before or after this?
You need to specify attributes before the creation of the form object.
Thanks for your reply, you were right, I had to put the lines of code
before form=
This works:
def user():
if request.args(0)=='profile':
Not equivalent. The square brackets are specifying the id'th item in the result
set (which begins counting at 0).
Here's a better shortcut for grabbing one record:
row = db.table(id)
You are correct in that your explanation describes exactly how web2py
currently works. But the online manual (and all previous editions)
have shown the two methods to be equivalent. It's the first example
in the shortcuts section of the Database Abstraction Layer
chapter...
dear Joe
rows = db().select(db.table.ALL) is a list of records
and rows[0] is first record, rows[1] is second ...
as pbreit mentioned this works
row = db.table(id)
and this
row = db.table[id]
the shortcut works on tables not on result sets or lists
Of course!
You have hit it on the head. That is exactly my mistake. The book is
correct, and the error is all mine.
Warm regards,
-- Joe
On Sep 1, 1:42 am, Vasile Ermicioi elff...@gmail.com wrote:
from the book
myrecord = db.mytable[id]
del db.mytable[id]
db.mytable - is the table
Hi Richard,
thank you for your feedback.
It works great except that it seems to conflict with jQuery UI tabs and
dialog...
I fixed it (tested Chrome, FF, IE).
See: http://dev.s-cubism.com/plugin_anytime_widget/test/with_jquery_ui
(The anytime css should precede the jquery ui css)
It no show up
Something like this, perhaps: i m a g e s h a c k . u s / f / 5 3 4 /
s c r e e n s h o t i b . p n g /
Henri.
On Aug 31, 2:57 pm, Henri Heinonen henri.heino...@gmail.com wrote:
Is it possible to set a timeout limit for applications that seem to
run forever and forever?
Something like this, perhaps: h t t p : / / i m a g e s h a c k . u
s / f / 5 3 4 / s c r e e n s h o t i b . p n g /
Henri.
On Aug 31, 2:33 pm, Henri Heinonen henri.heino...@gmail.com wrote:
Hi!
Is it possible to set priorities for web2py applications?
I am running a web2py server with
web2py is a framework, setting priorities seems more a job for a webserver
same answer, what you try to achieve is a job for a webserver,
the webserver is the one to execute applications using threads, processes or
coroutines,
and setting priorities and timeouts for threads, processes and coroutines
is the job of the webserver
Hi everyone, this is my first message on the googlegroup.
In the web2py book, computed fileds are described with this
explanation :
When a new record is modified, including both insertions and updates, if
a value for the field is not provided, web2py tries to compute from the
other field values
I just try again to Upload a packed web2py application on FluxFlex but I get
the same Error500 of a week ago.
Can anybody have a solution or work-around suggestions for that issue ?
Thanks.
- Valter
Isn't that pretty much what we're supposed to be seeing? Every few
heartbeats it recognizes a task that needs running, starts it and reports
back when complete?
C:\Users\Brian\Documents\development\web2py\google hg repopython
trunk/gluon/me
ta_scheduler.py
thumnew task
starting task
task
I add that inserting :
db.article.prix_net.readable=True
does not help displaying the field in the admin form.
Are you trying to initialize the plugin in db.py? If so, then the problem is
that db.py is being read before plugin_ckeditor.py (web2py loads models in
alphabetical order). So what I usually do is make a tables.py model where I
define my tables. You can initialize the plugin in this file, as it
Great!
It nice that you take care of feedback... Don't worry about IE ;-)
For moving, I think it a most have feature since the actual datepicker has
it...
What has to be done to make it available?
Maybe the actual datepicker could be of some help to figure out how to make
it moves...
Thank
Let me think about that and figure out by where we should start...
For now what I see is :
- We should build a little app at first then we can latter transform it
into a plugin app...
- I have the model of agenda and calendar of the Android calendar db... I
have to check if it is
sorry to disturb but cant get it to work.
now this error
Traceback (most recent call last):
File gluon/restricted.py, line 192, in restricted
File D:/web2py198_2/web2py/applications/Demo1/models/table.py, line 83, in
module
File gluon/custom_import.py, line 276, in __call__
File
On Aug 31, 2011, at 4:33 AM, Henri Heinonen wrote:
Is it possible to set priorities for web2py applications?
I am running a web2py server with some simulation applications. When I
run them, the welcome application works very sluggishly so it seems to
a visitor of my web2py server that the
You must be using Python 2.5. I think tomt was the first to report this
problem. The problem is coming from this code:
self.settings.table_upload = self.db.define_table(upload_name,
Field('title', length=255),
Field('filename', length=255),
Pardon me for resurrecting a dead thread, but can any of the
participants elaborate on the solution to this issue? I'm trying to
accomplish the same goal of eliminating identical repeated error
messages under each radio button in an SQLform using the radio
widget. I still want an error message
Hello everyone,
given the case, I have these 2 tables:
db.define_table('artist',
Field('name'))
db.define_table('album',
Field('artist_id', db.artist),
Field('name'))
How would I add a field in the album table, (e.g. artist_name), that
references
Thanks for the solution. Sorry for the slow reply - I wanted to try it out,
but haven't since I had already fixed the problem by explicitly converting
from strings to datetimes, and moved on with my work.
One question: Why isn't the use of PARSE_COLTYPES the default behavior? It
seems
I have an application where I desperately need to track state while
users navigate through the site. For a variety of reasons it is not
appropriate to force them to sign up, so Auth is turned off. What I
am finding is that the variable response.session_id takes on a
unique value with every mouse
Is there any way to use the IS_IN_SET validator zero option with a db field
that is tied to a lookup table? For example, if I have
db.define_table('plan',
Field('id','id'),
Field('option',type='string',label=T('Subscription Options')),
How i can build my own openid server for my w2p app? thank you!!!
I see now that the zero option is available in the IS_IN_DB validator.
Apologies to the group for missing that in the manual.
Thanks for this. I'm glad to hear they're working on their loading
time. I was set to use Janrain for an upcoming project but abandoned
it in favor of rolling my own OpenID because the Janrain widget was so
slow to load. Painfully slow. I'm interested in finding out if it's
actually four-times
Add this below your album model...
db.album.artist_id.requires=IS_IN_DB(db,db.artist.id,'%(name)s')
You will have a dropbox instead of a empty field for artist_id field of
table album.
Richard
On Thu, Sep 1, 2011 at 1:19 PM, Christian hff...@googlemail.com wrote:
Hello everyone,
given the
Please tell me where in the source code I can find out how web2py
renames files to prevent directory traversal attacks.
I want to emulate upload field behaviour of renaming the file and
saving it to uploads dir with a reference to it in a currently
unsupported DB.
Thank you
-David
As far as I know it should remain constant for the session. I
added {{=response.session_id}} to the layout.html of a fresh welcome app
and the id remained the same on all pages.
Update --
This problem is variable. After logging into the admin session,
logging out, closing the browser, and then opening it again the
website seems to add sessions for me even as an unauthenticated user.
Even after opening up a different browser it continued to work. But
when someone else
Computed fields can't be edited because they are computed.
Maybe just set a default:
db.article.price_with_taxes.default = lambda r: r.price*(1+r.taxes)/100)
I would typically not advise creating a field in the database that is simply
a computation of another field. I would probably use a
On Sep 1, 2011, at 11:25 AM, Joe Barnhart wrote:
Update --
This problem is variable. After logging into the admin session,
logging out, closing the browser, and then opening it again the
website seems to add sessions for me even as an unauthenticated user.
Even after opening up a
I can believe this. I too have seen it behave perfectly if I have EVER
been logged in to the app (or admin i/f) from a computer. But if I go
to a computer where it has NEVER seen the admin i/f or logged in, the
app fails to give me a consistent session id. It's very weird.
On Sep 1, 11:29 am,
Is this it?
http://code.google.com/p/web2py/source/browse/gluon/dal.py#5329
Hi Richard,
thanks for your quick reply. After adding that to my db.py i still get
something like this as JSON reply
{content: [{name: the album name, artist_id: 1, year: null, id:
1}]}
So still no name for artist_id in JSON and not in default.html
I tested something like this:
Yes that is precisely what I was searching for.
Thank you for your turbo reply pbreit.
On Sep 1, 2:44 pm, pbreit pbreitenb...@gmail.com wrote:
Is this it?http://code.google.com/p/web2py/source/browse/gluon/dal.py#5329
Cookies and session ids are a bit of black magic to me. I assume
that web2py handles the setting of the session cookie with the
associated session id when the page is rendered. But I have no idea
if this is right or not. It certainly is acting as though web2py is
being contacted without the
class MyVirtualFields(object):
def artist_name(self):
artistName = db.artist(self.album.artist_id).name
return artistName
db.album.virtualfields.append(MyVirtualFields())
This did the trick… but is this considered good practice?
2011/9/1 Christian Hoffmann
On Sep 1, 2011, at 11:49 AM, Joe Barnhart wrote:
Cookies and session ids are a bit of black magic to me. I assume
that web2py handles the setting of the session cookie with the
associated session id when the page is rendered. But I have no idea
if this is right or not. It certainly is
I am not sure of me with JSON and represent, I don't see why it not works
since this seems OK :
db.album.artist_id.represent = lambda id: db.artist(id).name
For the best pratice... I am not the ritgh guy...
But at least I think that you could get in trouble with .append() if your DB
get
Wouldn't it need to be something like:
db.album.artist_id.represent = lambda r: db.artist(r.id).name
I checked, using the 'WelcomeAPP' on Version 1.98.2 of web2py, the first
example of 'ajax' function as descrived on web2py book *'**The ajaxFunction',
Chapter 10
*.
The returned value is always None instead of the expected echo of the typed
characters in the input field.
Anybody experienced
Hi,
thanks for the replies.
@pbreit: Tested that too, but same result, means: does not work
@Richard: Thanks, will look at that links! Problem is, that I use
@request.restful()
which gives me the results
Regards,
Christian
P.S.: A little bit off topic: When I send a gluon Set a json() I get
http://blog.jquery.com/2011/09/01/jquery-1-6-3-released/
Brian:
You're the man...said the right thing. I didn't know pyodbc did not
ship with web2py.
Download and dropped it in the same folder as web2py (don't know if
this was mentioned in doc.)
Works like a beauty. Thanks all again.
On Aug 31, 7:36 pm, Brian M bmere...@gmail.com wrote:
What
There is noting in the book about restful, I only find a video talking about
experimental API...
What you try to do is maybe not well tested and buggy I don't know...
Try with the @json decorator first you will have a idea if it comes from the
json or the restful...
Richard
On Thu, Sep 1, 2011
Glad you got it working! :)
If I understand correctly, Massimo was unaware of this option when he
originally implemented the DAL for sqlite, and making it default now is not
backward compatible.
Can you show us the relevant code?
I'm curious if this is proper behavior and, if so, what is the
proper way to deal with it. I've put in my own little error trap to
prevent it, but I'm wondering if my whole approach is wrong.
I have a form that includes both password and password verification
(type the second time to match)
db.define_table('plan',
Field('id','id'),
Field('option',type='string',label=T('Subscription Options')),
format='%(option)s',
migrate=settings.migrate)
db.define_table('subscription',
I'm having my share of session issues these days. This hour, my
problem is that the variable response.session_id does not seem to be
set at the point the model files are executed.
I am storing sessions in the database (sqlite) to help work around a
problem that manifests as a new session_id for
I've just opened issue
#404http://code.google.com/p/web2py/issues/detail?id=404: datetime gets
downgraded to 1-sec resolution when inserting to database -
example and full details there. And just 90 minutes before that, someone
else submitted issue
These seem like unexpected problems. I wonder if it might make sense to
start over from scratch? And leave the session behavior in its default
state.
What does your code look for setting session_id in the table record?
Is there a reason you aren't using web2py's login?
If you want to customize the login page, you can do this in
views/default/user.html:
{{if request.args(0)=='login':}}
h2Login/h2
div id=user_form
{{=form.custom.begin}}
plabel for=emailEmail/labelbr
On Sep 1, 2011, at 5:47 PM, Joe Barnhart wrote:
I'm having my share of session issues these days. This hour, my
problem is that the variable response.session_id does not seem to be
set at the point the model files are executed.
I am storing sessions in the database (sqlite) to help work
More work on this is in progress. I hope to have a new scheduler ready
in 1-2 days with more features.
On Sep 1, 7:52 am, Brian M bmere...@gmail.com wrote:
Isn't that pretty much what we're supposed to be seeing? Every few
heartbeats it recognizes a task that needs running, starts it and
The web application should not run expensive tasks like simulations.
It should queue them and execute them in background. We are working a
new scheduler that will make this easier. There is no way for web2py
to control priority of threads. In fact there is no way to prioritize
threads.
massimo
If you have multiple {{=INTPUT(_name='')}} with the same name you
want to set {{=INPUT(_name='',hideerror=True)}} for some of them.
On Sep 1, 12:06 pm, Eric hu5...@gmail.com wrote:
Pardon me for resurrecting a dead thread, but can any of the
participants elaborate on the solution to
it is in trunk
On Sep 1, 4:08 pm, Bruno Rocha rochacbr...@gmail.com wrote:
http://blog.jquery.com/2011/09/01/jquery-1-6-3-released/
can you host it on google code and I will simply link it? Make sure
you list yourself as author.
On Sep 1, 4:17 pm, Ivica Kralj ivicakr...@gmail.com wrote:
Not sure if somebody already addopted this app, but enclosed you will find
new version for appointment_manager app
Want to try send me a patch?
On Sep 1, 6:27 pm, nick name i.like.privacy@gmail.com wrote:
If I understand correctly, Massimo was unaware of this option when he
originally implemented the DAL for sqlite, and making it default now is not
backward compatible.
Did you check the online book. there may be a typo in the printed
book.
On Sep 1, 3:27 pm, Valter Foresto valter.fore...@gmail.com wrote:
I checked, using the 'WelcomeAPP' on Version 1.98.2 of web2py, the first
example of 'ajax' function as descrived on web2py book *'**The ajaxFunction',
Hello,
Coordinating with the foundation come BIKA (http://www.bikalabs.com/)
to carry BIKA web2py Labs, in fact for the next week my company will
get a test concept.
We will make some references provided by the project
http://code.google.com/p/web2pyhl7/ Massimo, and add a new interface
in a
To follow up the discussion on the issue...
At some point a choice was made in web2py whether the role of escaping
of strings relies in web2py or in the database driver. We decided this
was a job for web2py because we would have more control over it. This
allows the code to be simpler and allows
P.S.
Nick, I want to clarify that you bringing this up is very important
for us and I really appreciate. Security is a priority so if this
turns out to be a different issue than the one I suspect we will fix
it promptly.
Even if this is not a new issue and it is the problem I suspect, we
should
(Sorry for the horrible redaction of my previous mail)
My company has coordinated with the BIKA foundation (http://www.bikalabs.com/)
port BIKA Labs to web2py, in fact for the next week we will
get a proof of concept.
We will take some references provided by the project
Looks like Nick is on 9.0.1 and pgsql is ignoring
SET standard_conforming_strings=on;
Has anybody seen this behavior before? If you are on postgresql and
want to help with this security issue please try from web2py shell
python web2py.py -S welcome -N
db=DAL('postgresql://')
74 matches
Mail list logo