Hello,
I am a newbie both with web2py, python and computer and web development
in general. I am trying to digest Massimo's book which I bought from
Lulu. I just want to ask anybody if they can suggest an IDE that has
intellisense that can make learning much more easier for me?
Right now, I a
I would use jquery. Here is an untested example so may be buggy
jQuery(document).ready(function(){
jQuery('#mySelect').change(function(){
if(jQuery('#mySelect').val()=='Specify...')
jQuery('#mySelect:selected').text(prompt("Please name your
favorite fruit:",""));
});
});
On Jan 19
Thanks Stefan,
if ajax, why XMLRPC and not JSONRPC? Anyway you are you asking from
something like this?
@service.jsonrpc
@service.xmlrpc
def feed():
return db(db.yourtable.id>0).select().as_list()
Massimo
On Jan 19, 8:47 pm, Stefan wrote:
> Hi all,
>
> I'm relatively new to the Web2py frame
Hi all,
I'm relatively new to the Web2py framework and have been spending the
last week or so playing around with it. So far, I'm really impressed
at the level of usability and portability that the framework provides.
One of the proof-of-concept projects I'm working on is passing some
data back
On Jan 20, 3:12 pm, vvk wrote:
> I installed web2py with apache & mod_wsgi. My computer don't have any
> Domain Name. Another PHP project should be hosted on same machine. How
> to configure my system to run PHP and web2py at the same time?
>
> Temporarily, web2py is using http service and https
I installed web2py with apache & mod_wsgi. My computer don't have any
Domain Name. Another PHP project should be hosted on same machine. How
to configure my system to run PHP and web2py at the same time?
Temporarily, web2py is using http service and https by PHP site by
modifying httpd.conf file b
An url to remind:
http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js
El 15/01/2010 18:37, waTR escribió:
I much prefer YUI 3 over Jquery 1.4... YUI 3 is not only smaller (7k +
plugins you choose to use), but it is also a tighter package, and has
a great set of features (CUSTOME EVENT
And its Spanish!! http://es.wikipedia.org/wiki/Servidor_HTTP_Cherokee
Finally a Spanish international tool working fine :-D
by the way, it is shown as the best and fastest modern web server
http://www.cherokee-project.com/benchmarks.html
p.s: I'm Spaniard
El 18/01/2010 18:06, Ivan P escribi
Will do.
On 19 Jan 2010, at 22:16, mdipierro wrote:
> I guess it is not upgrading the file. Let us know when you find out
> the solution to the problem.
>
> On Jan 19, 12:55 pm, Carl wrote:
>> Looks like a GAE quirk!
>> I have 1.74.6 and it has the line 425. But GAE isn't playing ball.
>>
>> I
On a form generated by SQLFORM, I have a drop-down selection box, that
let's the user selects from a list of fruits. I would like allow the
user to specify a fruit not on the list. I have written the following
Javascript that would pop-up a prompt box when the user selects the
Specify... option.
Sorry for the delay in replying. I finally had a chance to test this
and it certainly works well enough. Thanks.
Regards,
Jim
On Jan 11, 11:30 pm, mdipierro wrote:
> Or better:
>
> def balloon(comment)
> return DIV('[read more]',SPAN(comment),_class='balloon')
>
> Field(,comment=balloon(
Great!! that worked.
Thanks
On Tue, Jan 19, 2010 at 3:55 PM, Thadeus Burgess wrote:
> import cStringIO
>
> mystr = cStringIO.StringIO()
>
> db.export_to_csv_file(mystr)
>
> # set content headers
>
> return mystr.getvalue()
>
> -Thadeus
>
>
>
>
>
> On Tue, Jan 19, 2010 at 5:15 PM, Miguel Goncalve
import cStringIO
mystr = cStringIO.StringIO()
db.export_to_csv_file(mystr)
# set content headers
return mystr.getvalue()
-Thadeus
On Tue, Jan 19, 2010 at 5:15 PM, Miguel Goncalves
wrote:
> Hi
>
> Since I am running on GAE I guess the open(...) will not work.
> Instead I am trying to add
Hi
Since I am running on GAE I guess the open(...) will not work.
Instead I am trying to add exportToCsvAll function to the appadmin.py of my
application.
I assume I have to iterate through all the tables, export them to csv into a
string and then return the string.
Question is how do I export e
Do you have pool_size>0? What is it set to.
On Jan 19, 3:27 pm, jonfroehlich wrote:
> Hi all,
>
> I am frequently running into this exception (the full call stack is at
> the end of this post):
>
> "psycopg2.OperationalError: FATAL: sorry, too many clients already"
>
> This obviously wreaks hav
I guess it is not upgrading the file. Let us know when you find out
the solution to the problem.
On Jan 19, 12:55 pm, Carl wrote:
> Looks like a GAE quirk!
> I have 1.74.6 and it has the line 425. But GAE isn't playing ball.
>
> I guess you can leave this one with me!
>
> thanks for all your help
Hi all,
I am frequently running into this exception (the full call stack is at
the end of this post):
"psycopg2.OperationalError: FATAL: sorry, too many clients already"
This obviously wreaks havoc on the functionality of my server. I am
using web2py version 1.74.5 with PostgresSQL 8.4.
Curren
is it.
thanks.
2010/1/19 Thadeus Burgess
> If this is the case, then take a look at web2py_ajax.html in the views
> file, and remote the jquery code that creates the calendar popup.
>
> -Thadeus
>
>
>
>
>
> On Tue, Jan 19, 2010 at 1:45 PM, Thadeus Burgess
> wrote:
> > I believe he is referri
Cant you change it to use SQLFORM.factory instead of crud??
-Thadeus
On Tue, Jan 19, 2010 at 7:42 AM, mdipierro wrote:
> The plugin sends one post after the other via ajax. The accept
> mechanism should work in this case but I how do you handle errors in
> this case? The JS in the link does
If this is the case, then take a look at web2py_ajax.html in the views
file, and remote the jquery code that creates the calendar popup.
-Thadeus
On Tue, Jan 19, 2010 at 1:45 PM, Thadeus Burgess wrote:
> I believe he is referring to the jQuery date widget and he does not
> want to use it ?
>
I believe he is referring to the jQuery date widget and he does not
want to use it ?
-Thadeus
On Tue, Jan 19, 2010 at 7:39 AM, mdipierro wrote:
> Can you explain "it does not work" What error or incorrect behavior do
> you get?
>
> On Jan 19, 5:20 am, Alexandre Andrade
> wrote:
>> Field('d
That will not work.
Take this for example.
self.settings.download_url = self.url('download')
So what is actually in self.settings.download_url ??? It's not a
function, its a string that was already generated.
If you follow the function definition at self.url() you notice it
returns self.environ
max_id= db(db.table.autonumber>1).select(db.table.autonumber, #
select all records, and only pull the autonumber column
orderby=~db.table.autonumber, #
descending sort on the autonumber, (highest first)
limitby=(0,1) # limit the que
Looks like a GAE quirk!
I have 1.74.6 and it has the line 425. But GAE isn't playing ball.
I guess you can leave this one with me!
thanks for all your help and sorry it turned out to be GAE (as we
suspected!)!
2010/1/19 mdipierro
>if isinstance(fieldtype, SQLCustomType):
>
> should be
>
>
if isinstance(fieldtype, SQLCustomType):
should be
if isinstance(fieldtype, gluon.sql.SQLCustomType):
But that bug is not in 1.74.6. I do not have line 418, have line 425:
if isinstance(fieldtype, gluon.sql.SQLCustomType):
I remember fixing that some time ago.
Massimo
On Jan 19,
>From v1.74.6 running upon GAE:
File
"/base/data/home/apps/testenvoy/basicss.339281047942238178/gluon/main.py",
line 469, in wsgibase
session._try_store_in_db(request, response)
File
"/base/data/home/apps/testenvoy/basicss.339281047942238178/gluon/globals.py",
line 346, in _try_store_in
and for my other problem
thanks for the link , but what I rellay need to do is to query
database based on a value of another field and fetch a value out of
there then compare it with the value in the current field
so I need to do something like :- db.table.field = IS_EXPR('value< db
(db.auth_user
I suggest the same as mdipierro.
Take a look at syncServer property.
On Jan 18, 9:51 am, mdipierro wrote:
> http://keith-wood.name/countdown.html
>
> On Jan 18, 12:17 am, Jason Brower wrote:
>
> > I want a countdown that works for that session that will never be
> > interupted by the refresh of
Thanks, just wanted to make sure that I wasn't screwing up.
Mike
On Jan 19, 5:07 am, mdipierro wrote:
> Yes, unless
>
> FORM(TABLE(TR(TD(INPUT(_name='visitor_name', requires=IS_NOT_EMPTY
> (,
> TR(TD(INPUT(_type='submit')
>
> On Jan 18, 9:09 pm, mikech wrote:
>
>
>
> > When I enter the
Somebody must have put some unicode string somewhere.
On Jan 19, 9:17 am, Fran wrote:
> On Jan 19, 2:46 pm, mdipierro wrote:
>
> > No app level code is executed before a call to controllers.
> > I suggest
> > cd applications
> > mkdir sahanatest
> > cp -r sahana/* sahanatest
> > rm -
There are two sources of confusion here. And it is my fault.
GWT uses GWT RPC which assumes a Java serverlet. I am not familiar
with this and it may be hard to have web2py mimic the serverlet.
I thought you were using Pyjamas, the python port of GWT. Pyjamas does
not uses GWT RPC but JSONRPC and
1.74.6 please
On Jan 19, 11:02 am, Carl wrote:
> thanks for the URL.
> I've been doing a "binary search" with versions but I've not checked every
> version. here's what I've found so far:
>
> v1.67.2 . works locally & GAE
> v1.68.2 . works locally & GAE
> v1.69.1 . works locally & GAE
> v1.70.1
thanks for the URL.
I've been doing a "binary search" with versions but I've not checked every
version. here's what I've found so far:
v1.67.2 . works locally & GAE
v1.68.2 . works locally & GAE
v1.69.1 . works locally & GAE
v1.70.1 . works locally & GAE
v1.71.1 . works locally. GAE reports 'Inter
On Jan 19, 9:21 pm, "K.R.Arun" wrote:
> All this long, I forgot one thing,With GWT we can use only javascript
> at client. There's no python there.
> So now problem is, Can we call web2py's @service.jsonrpc or
> @service.xmlrpc with JavaScipt? And How?
I suppose it's possible with plug-in of JQ
Hello,
Sorry, I need to put Web2Py Logos and try to hack it online with
GAE. I am really impressed by web2py. However, Many to many on GAE
is a bit hard. db.image.category.requires=IS_IN_DB(db,'category.id','%
(titre)s',multiple=True) save me
On 18 jan, 23:57, KMax wrote:
> Error: Not Found
>
So this's a bug ?
Is not any way to handle this ?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com.
F
All this long, I forgot one thing,With GWT we can use only javascript
at client. There's no python there.
So now problem is, Can we call web2py's @service.jsonrpc or
@service.xmlrpc with JavaScipt? And How?
--
You received this message because you are subscribed to the Google Groups
"web2py-user
Thank you for pointing me towards it.
On Jan 19, 8:19 pm, mdipierro wrote:
> Yes
>
> http://w2popenid.appspot.com/init/default/wiki/main
>
> On Jan 19, 9:14 am, "K.R.Arun" wrote:
>
>
>
> > Does web2py support openID authentication?
> > I saw the following url, which may be helpful to somebody.
>
On Jan 19, 10:25 am, "hamdy.a.farag" wrote:
> self.error_message = error_message % dict(min=self.minimum,
> max=self.maximum-1)
> TypeError: unsupported operand type(s) for %: 'lazyT' and 'dict'
The way the validator is setup it does not allow you to change the
values in the message, just the te
self.error_message = error_message % dict(min=self.minimum,
max=self.maximum-1)
TypeError: unsupported operand type(s) for %: 'lazyT' and 'dict'
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegro
Hi
@ Densel , thanks for replying but I can't get it done replacing the ,
with %
I keep having this error
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from th
Yes
http://w2popenid.appspot.com/init/default/wiki/main
On Jan 19, 9:14 am, "K.R.Arun" wrote:
> Does web2py support openID authentication?
> I saw the following url, which may be helpful to somebody.
>
> http://blog.notdot.net/2009/12/OpenID-on-App-Engine-made-easy-with-AEoid
>
> If it's worth c
I think
request.env.http_port
On Jan 19, 9:13 am, "K.R.Arun" wrote:
> Please, One more clarification;
> In my case, I want to access the jsonrpc service of an application,
> within that application itself.
> So is there any chance for me reduce the following. (Why should I give
> the complete
On Jan 19, 2:46 pm, mdipierro wrote:
> No app level code is executed before a call to controllers.
> I suggest
> cd applications
> mkdir sahanatest
> cp -r sahana/* sahanatest
> rm -r sahanatest/models
> echo 'def index(): return dict()' > sahanatest/controllers/test.py
> wgethtt
Does web2py support openID authentication?
I saw the following url, which may be helpful to somebody.
http://blog.notdot.net/2009/12/OpenID-on-App-Engine-made-easy-with-AEoid
If it's worth can't it be included in web2py???
--
You received this message because you are subscribed to the Google Gro
Please, One more clarification;
In my case, I want to access the jsonrpc service of an application,
within that application itself.
So is there any chance for me reduce the following. (Why should I give
the complete url to the server, Can't I go with relative url?)
>>> server =
>>> jsonrpclib.Ser
Hi
You can view error logs by looking at the App Engine dashboard for your
application. This contains a traceback for errors you can use to debug your
app.
To debug locally run your web2py application on the app engine runtime [1]
and insert brake points into your code as usual.
I find that test
Hi
sorry
I didn't notice that I was trying to add the validation after defining
the form
But for other problems, let me be clear about them
1 - I want to have the error message be translated, in case of
IS_INT_IN_RANGE(v1, v2, error_message=...)
So I did the following
error =
About the second problem see
http://groups.google.com/group/web2py/msg/310e60879763b431
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
It is just a syntax error, instead of:
T("...",dict(...))
use
T("..."%dict(...)) # percent instead of comma
On Jan 19, 5:17 am, "hamdy.a.farag" wrote:
> Hi
>
> I'm having 2 problems :
>
> I've a problem translating a custom error message in the :
>
> IS_INT_IN_RANGE(v1, v2, error_message=T(
No app level code is executed before a call to controllers.
I suggest
cd applications
mkdir sahanatest
cp -r sahana/* sahanatest
rm -r sahanatest/models
echo 'def index(): return dict()' > sahanatest/controllers/test.py
wget http://.../sahanatest/test/index
Do you get the error
On Jan 19, 1:11 pm, mdipierro wrote:
> I do not know. One of the models(or modules imported by the models) is
> doing something is should not do, for example:
> 1) redefined open
> 2) call chdir
> 3) alter sys.path
> 4) call a not-thread safe module
All seem like valid ideas, however the problem
I have no idea. I will take a look. Meanwhile, can you send me a
minimalist app to reproduce it?
On Jan 19, 5:18 am, Miguel Lopes wrote:
> On Mon, Jan 18, 2010 at 7:46 AM, mdipierro wrote:
> > By custom you mean {{=form.custom.widget.field}} or something else?
>
> > That's what I mean.
>
> if I
Value is always string unless filtered by IS_INT_IN_SET
db.table_name.field.requires = [IS_INT_IN_RANGE
(-10**10,10**10),IS_EXPR('%i <= value <= %i'%(5, 7))]
or
db.table_name.field.requires = IS_EXPR('%i <= int(value) <= %i'%(5,
7))
but the latter will throw an exception if value does not con
Yes. The problem is that
form.vars contains more than the fields you want.
You should change this line:
db.product.insert(**dict(form.vars))
with
db.product.insert(**db.product._filter_fields(form.vars))
On Jan 19, 7:39 am, kbochert wrote:
> Model:
> db.define_table('product',
> Field('ti
I will take a look but I stongly suggest you use mod_wsgi instead of
mod_python.
On Jan 19, 4:57 am, IRV wrote:
> Hello,
>
> I am newish to python and new to both web2py and deploying code on the
> web so I apologize in advance if this is a very basic issue that is
> solved in the documentation
http://web2py.com/examples/static//web2py_src.zip
where is a version. Only some versions are stored.
I will look at your code asap.
On Jan 19, 5:58 am, Carl wrote:
> Massimo, I've sent you a stand-alone example that is as small as
> possible. I don't have upload access to Files in thi
The plugin sends one post after the other via ajax. The accept
mechanism should work in this case but I how do you handle errors in
this case? The JS in the link does not contemplate the possibility
that the posts do not validate.
On Jan 19, 5:55 am, ionel wrote:
> No, because I create the forms
I also have this problem:
db.table_name.field.requires = IS_EXPR('%i <= value <= %i'%(5, 7))
FORM= ..
Not working
while doing print IS_EXPR('%i <= value <= %i'%(5, 7))(6) -> (6,
None)
so How can I get it work ? do I have to replace the 'value' keyword
with something ?
--
Y
Model:
db.define_table('product',
Field('title', 'string', length=64),
Field('image', 'upload'),
)
Controller:
def edit_product_0():
form = SQLFORM(db.product, _id='product_table')
if form.accepts(request.vars, session, keepvalues=True,
dbio=False):
form.vars.id = d
Can you explain "it does not work" What error or incorrect behavior do
you get?
On Jan 19, 5:20 am, Alexandre Andrade
wrote:
> Field('data_assinatura','date', requires=data,
> widget=SQLFORM.widgets.string.widget),
>
> db.convenio.data_assinatura.widget = SQLFORM.widgets.string.widget
>
> and
>
You can do:
self.settings.controller='default'
and the default URLs should change accordingly since they depend on
self.settings.controller
On Jan 19, 4:47 am, Ivan P wrote:
> This is fairly minor problem, but seems to go against the web2py
> philosophy as I see it. If after initializing the Au
I do not know. One of the models(or modules imported by the models) is
doing something is should not do, for example:
1) redefined open
2) call chdir
3) alter sys.path
4) call a not-thread safe module
On Jan 19, 2:41 am, Fran wrote:
> On Jan 19, 1:35 am, mdipierro wrote:
>
> > So your models re
+1
On Jan 18, 11:00 pm, Anand Vaidya wrote:
> +1
>
> Excellent feature to possess.
>
> -Anand
>
> On Jan 19, 12:16 pm, Jason Brower wrote:
>
> > I think it would be nifty to have an interface (app store?) to install
> > and remove pluggins from your web2py installation. I suppose that
> > featu
Yes, unless
FORM(TABLE(TR(TD(INPUT(_name='visitor_name', requires=IS_NOT_EMPTY
(,
TR(TD(INPUT(_type='submit')
On Jan 18, 9:09 pm, mikech wrote:
> When I enter the code on pg. 55:
> 1 def first():
> 2 form = FORM(INPUT(_name='visitor_name', requires=IS_NOT_EMPTY()),
> 3 INPUT(_type='submi
Hello,
I am newish to python and new to both web2py and deploying code on the
web so I apologize in advance if this is a very basic issue that is
solved in the documentation but I can't seem to find a solution.
I followed the instructions from section 11.8 in the web2py book (i.e.
the manual at h
Massimo, I've sent you a stand-alone example that is as small as
possible. I don't have upload access to Files in this group, hence the
direct email.
I was using Web2py v1.67.2 and it was only an upgrade to v1.74.5 that
produced this error.
I am willing to test the code with each version of Web2p
No, because I create the forms with crud from 3 related tables.
I found a jQuery solution at:
http://stackoverflow.com/questions/315912/posting-submitting-multiple-forms-in-jquery
but I'd like to know if web2py itself has a mechanism to do that.
Thank you.
On Jan 18, 11:16 pm, Jason Brower wr
Field('data_assinatura','date', requires=data,
widget=SQLFORM.widgets.string.widget),
db.convenio.data_assinatura.widget = SQLFORM.widgets.string.widget
and
Field('data_assinatura','date', requires=data, widget=None),
doesn't works.
change the field to string will make loose all functional
On Mon, Jan 18, 2010 at 7:46 AM, mdipierro wrote:
> By custom you mean {{=form.custom.widget.field}} or something else?
>
> That's what I mean.
if I replace the custom form with a regular form everything works fine.
Miguel
--
You received this message because you are subscribed to the Google G
This is fairly minor problem, but seems to go against the web2py
philosophy as I see it. If after initializing the Auth object you
would like to change the default controller, you must redefine a bunch
of variables:
self.settings.login_url,
self.settings.logged_url,
self.settings.download_url,
etc.
Yup...that's how it should be. Works. Thanks!
On Jan 19, 2:48 pm, tiago almeida wrote:
> In the controller which is called when you submit the form, you can do any
> database access you want.
> Use the data from the form to Select the other data you need (possibly from
> other tables) and use tha
thanks for the reply but i'm not a good web2py programmer ... i
writing my first real app
you can write the code for my request? (i can't understand the post of
your link)
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, se
Hi
I'm having 2 problems :
I've a problem translating a custom error message in the :
IS_INT_IN_RANGE(v1, v2, error_message=T("enter a value between %(min)
s and %(max)s",dict(min=str(v1), max=str(v2+1
it also fails to do :
error = T("enter a value between %(min)s and %(max)s",dict(min=st
In the controller which is called when you submit the form, you can do any
database access you want.
Use the data from the form to Select the other data you need (possibly from
other tables) and use that as values for db(resources).insert(...)
Hope it helps
Tiago Almeida
-
On Tue, Jan
On Jan 19, 1:35 am, mdipierro wrote:
> So your models read but the controller no? Is this reproducible or an
> occasional error?
100% repro :/
> Does welcome works fine?
Yes, other apps are fine...
F
--
You received this message because you are subscribed to the Google Groups
"web2py-users"
76 matches
Mail list logo