Hi,
sql_represent() in sql.py (around line 461) contains:
elif isinstance(obj, (Row, Reference)):
return obj['id']
Shouldn't this be rather:
elif isinstance(obj, (Row, Reference)):
return str(obj['id'])
?
This would avoid a TypeError in _insert().
Kind regards,
Dominic
--~--~--
Yes, I would like to hear the answer of that too, what if I want to
prepare a SQLFORM variables to be passed during doctest, how can
possible this happen as we don't know the key that is generated during
form creation?
On Oct 28, 10:44 am, Hamadaaway wrote:
> Supposing I've a method like :
>
>
Sorry skimmed the first person's question my wrong.
On Nov 9, 1:17 pm, mdipierro wrote:
> That is now what I meant. You can bytecode with any layout. You cannot
> bytecode if the layout filename is stored in a variable instead of a
> contact because the layout is unknown until runtime.
>
> for e
I changed it in trunk so that it is automatic and now (again) web2py
works with Jython out of the box. I have email the author of
wsgiserver hoping this is fixed in the official distribution.
On Nov 8, 1:56 pm, mdipierro wrote:
> jython does not seem to support socket option no_delay. In gluon/
That is now what I meant. You can bytecode with any layout. You cannot
bytecode if the layout filename is stored in a variable instead of a
contact because the layout is unknown until runtime.
for example {{extend 'mylayout.html'}} you can bytecode
{{extend x}} you cannot bytecode compile becaus
I didn't know that you can't bytecode compile with your own layout.
Isn't it a limitation if you want to use your own layout?
What is the solution if you'd want to compile your app with a custom
layout?
Ranjeev
On Nov 8, 5:53 am, mdipierro wrote:
> You can do
>
> {{extend mylayout}}
>
> where
Testing nested sets on GAE got an error
BadFilterError: BadFilterError: invalid filter: Only one property per
query may have inequality filters (<=, >=, <, >)
Just don't know what to do at the moment to make it work...
On Mon, Nov 9, 2009 at 1:51 AM, mdipierro wrote:
>
> It would be nice to i
It would be nice to implement in a general way so that once can do:
db.define_table('mytabletree',Field('data_at_node'),Tree
('mytabletree'))
where
class Tree:
def __call__(self,tablename):
return sql.Table(...)
other methods
Hope it makes sense. Not sure how doable.
massimo
Wow what timing, I was just about to post a similar thing :)
http://pastebin.com/f4fc602d7
-Thadeus
On Sun, Nov 8, 2009 at 5:28 PM, Vasile Ermicioi wrote:
> - for using in some queries like direct children (just too lazy to think
> how to use lft and rgt :) )
> - cascade delete (if is suppo
second one is not a good argument, cascade delete will remove all
descendants, but we will have a broken tree, since on delete there are 2
updates to change lft and rgt,
so I have only to fight with myself not to be lazy :) and to remove
parent_id
On Mon, Nov 9, 2009 at 1:28 AM, Vasile Ermicioi w
Make sure you run web2py source (not binary) and use the same Python
version that you installed psycopg2 for.
On Nov 8, 5:14 pm, Steve wrote:
> After some initial success with Web2py on a PC, I set it up on a
> Macbook Pro. It worked but had problems with the database being
> locked when multip
I just tried using T2 by adding the plugin as an application tarball
and I got a minor, but very odd problem. I have instantiated T2 but
not even used it yet. In the db.py, I copied the following code from
the T2 manual:
from applications.plugin_t2.modules.t2 import T2
t2=T2(request,response,sess
After some initial success with Web2py on a PC, I set it up on a
Macbook Pro. It worked but had problems with the database being
locked when multiple web requests came in and compute times were long
(running student game agents online). So I installed Postgresql and
psycopg2. However, I am havi
- for using in some queries like direct children (just too lazy to think how
to use lft and rgt :) )
- cascade delete (if is supported by the database)
On Mon, Nov 9, 2009 at 1:18 AM, mdipierro wrote:
>
> what do you need parent_id for when you have lgt and rgt?
>
>
>
> On Nov 8, 5:10 pm, elffik
what do you need parent_id for when you have lgt and rgt?
On Nov 8, 5:10 pm, elffikk wrote:
> Hi,
>
> I started a nested sets implementation
> Just sharing the code. I welcome any thoughts you have
>
> 2 files - nstree_controller (just quick and dirty tests of the model),
> and nstree_model
>
On Nov 8, 4:43 pm, jensk_dk wrote:
> I just tried using T2 by adding the plugin as an application tarball
> and I got a minor, but very odd problem. I have instantiated T2 but
> not even used it yet. In the db.py, I copied the following code from
> the T2 manual:
>
> from applications.plugin_t2
Hi,
I started a nested sets implementation
Just sharing the code. I welcome any thoughts you have
2 files - nstree_controller (just quick and dirty tests of the model),
and nstree_model
[nstree_controller :]
t1 = nstree(db, db.tree1)
def index():
return dict(message="Version " + nstree.ve
Hi Richard,
in fact you can write at
http://wavedirectory.appspot.com/init/default/wave/676f6f676c65776176652e636f6d21772b4450734a6167675941
too. Unfortunately you need to be logged into wave (to read or write).
The embed mechanism (an iframe) requires
that.
HC
On Nov 8, 11:41 pm, Richard wr
You have been busy! This is great Denes. We have to think of a good
way to advertise this.
On Nov 8, 10:00 am, DenesL wrote:
> Chapter 1 from 2nd edition web2py book in Spanish
> Capítulo 1 del manual web2py 2da edición en Español
>
> http://drop.io/web2py_DenesL/asset/web2py-libro2-cap1-pdf
>
I do not know but could it be you have a
meta http-equiv
in the html head?
On Nov 8, 4:07 pm, Benigno wrote:
> hmmm,
>
> But why does it interpret it differently when the text is in an
> include than when the text is in the layout.html? If I copy and paste
> the texts into the layout they
This is (was) a bug. It is now fixed in trunk. Thanks for reporting
it.
Massimo
On Nov 6, 2:50 pm, Benigno wrote:
> Ok,
>
> Problem still there without routes.py.
>
> Removed routes.py, but left on db.py the following:
>
> # Rerouting of language
> if request.vars._language: T.force(reque
hmmm,
But why does it interpret it differently when the text is in an
include than when the text is in the layout.html? If I copy and paste
the texts into the layout they appear correctly, whereas if they are
in the index.html (which is the one that extends layout), then the
don't.
On Nov
there is already a web2py wave - see if this link works:
https://wave.google.com/wave/#restored:wave:googlewave.com%2521w%252BDPsJaggYA
And if you don't have your invite yet there is a readonly version
here:
http://wavedirectory.appspot.com/init/default/wave/676f6f676c65776176652e636f6d21772b4450
yeah! - can invite again.
Have invited:
denes1...@yahoo.ca
roger.gicq...@gmail.com
mbelle...@gmail.com
whalb...@gmail.com
debe...@yahoo.com
digitalcry...@gmail.com
maxu...@gmail.com
On Nov 9, 2:35 am, Marat Maksumov wrote:
> I am very interested in receiving an invitation to Google Wave...
>
http://web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml.SQLTABLE-class.html
or the source itself.
On 8 nov, 15:24, leone wrote:
> Where can I find documentation about SQLTABLE?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Where can I find documentation about SQLTABLE?
--~--~-~--~~~---~--~~
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 group, send em
Thanks Massim. This week and next I am focusing on RPC in different
flavors
for the work I am doing
On Nov 8, 2:33 pm, mdipierro wrote:
> there are two parts of Pyjamas.
>
> 1) the script that takes Python code and generates JS. web2py does not
> include it but if you have it installed you can
jython does not seem to support socket option no_delay. In gluon/
wsgiserver.py replace
nodelay = True
with
nodelay = False
Massimo
On Nov 8, 1:48 pm, Nik wrote:
> Hi folks,
>
> For testing web2py with jython I have started it
> by executing "jython web2py.py" and got the following
> er
Hi folks,
For testing web2py with jython I have started it
by executing "jython web2py.py" and got the following
error message:
==
saturn:web2py_1.71.2 nik$ jython web2py.py
WARNING:root:no file locking
WARNING:root:unable to impor
there are two parts of Pyjamas.
1) the script that takes Python code and generates JS. web2py does not
include it but if you have it installed you can use it. You can also
call it from web2py as you would call any other module but most
likely you would generate js outside of web2py.
2) the abil
Nice!
On Nov 8, 12:47 pm, Thadeus Burgess wrote:
> Thanks for the suggestions.
>
> I do like replacing the SQLFORM widgets because now it allows me to replace
> them with some of Freeze's widgets :)
>
> Now I can have input boxes that look themed along side my jquery ui css.
>
> jqueryui_content
sorry I men pyjamas not pjamas
On Nov 8, 12:57 pm, dbb wrote:
> Do we have the ability to call pjamas from web2py (or incorporated in
> gluon) or do we have a similar function in web2py; the functions I am
> looking is to get data remotely and to post data remotely and the
> remote side to have
Thanks for the suggestions.
I do like replacing the SQLFORM widgets because now it allows me to replace
them with some of Freeze's widgets :)
Now I can have input boxes that look themed along side my jquery ui css.
jqueryui_content = "ui-widget ui-widget-content ui-corner-all"
class UIStringWidg
Do we have the ability to call pjamas from web2py (or incorporated in
gluon) or do we have a similar function in web2py; the functions I am
looking is to get data remotely and to post data remotely and the
remote side to have intelligence( to know) to update the data when the
data is accessed and
why not?
On Nov 8, 10:35 am, Thadeus Burgess wrote:
> What about just replacing SQLFORM.widgets with my own in db.py?
>
> -Thadeus
>
> On Sun, Nov 8, 2009 at 8:47 AM, mr.freeze wrote:
>
> > Doh! He did say "every web2py form helper" though :)
>
> > On Nov 8, 8:45 am, mdipierro wrote:
> > > Do
You should also see this:
http://www.extjs.com/deploy/dev/examples/desktop/desktop.html
Robin
On Nov 8, 1:02 am, mdipierro wrote:
> Really nice.
>
> On Nov 7, 11:01 pm, Wes James wrote:
>
> > Massimo,
>
> > I thought I'd try some web2py with that site below:
>
> >http://db.nr.usu.edu/qpacn
>
I am starting to get the impression that it is raining candy here...
; )
On Nov 8, 10:23 am, Johann Spies wrote:
> 2009/11/8 mdipierro :
>
>
>
> > you must run web2py with --upgrade=yes this will upgrade admin/welcome/
> > examples
>
> > or manually
>
> > cd applications/admin
> > tar zxvf ..
What about just replacing SQLFORM.widgets with my own in db.py?
-Thadeus
On Sun, Nov 8, 2009 at 8:47 AM, mr.freeze wrote:
>
> Doh! He did say "every web2py form helper" though :)
>
> On Nov 8, 8:45 am, mdipierro wrote:
> > Do not do this:
> >
> > gluon.sqlhtml.FormWidget._attributes = _attr
On Nov 8, 2009, at 7:33 AM, Benigno wrote:
>
> I didnt explain myself correctly. I am setting the equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> dinamically when in spanish. However, the accented words still show
> badly.
The character set specified by the http header takes p
Chapter 1 from 2nd edition web2py book in Spanish
Capítulo 1 del manual web2py 2da edición en Español
http://drop.io/web2py_DenesL/asset/web2py-libro2-cap1-pdf
Want to help in translating other chapters?
¿Quiere ayudar con la traducción de otros capítulos?
Contact me.
Contácteme.
Denes.
--~--~
I am very interested in receiving an invitation to Google Wave...
On Nov 7, 10:44 am, Nicolás de la Torre wrote:
> i have sent invites to:
>
> vinc...@vincentdavis.com
> thade...@thadeusb.com
> szims...@gmail.com
> boris.manojlo...@gmail.com
> richard_gor...@verizon.net
> chris.st...@gmail.com
>
The problem can be in database. Tables of your database are
set in UT8 and when you try to change the charset in your
html it can't convert correctly accented words.
2009/11/8 Benigno
>
> I didnt explain myself correctly. I am setting the equiv="Content-Type" content="text/html; charset=iso-885
I didnt explain myself correctly. I am setting the
dinamically when in spanish. However, the accented words still show
badly.
Massimo:
I dont understand exactly what you mean, whats the correct way to
do this then?.
On Nov 8, 4:06 pm, salingrosso wrote:
> 2009/11/8 mdipierro
>
>
>
> > You
2009/11/8 mdipierro :
>
> you must run web2py with --upgrade=yes this will upgrade admin/welcome/
> examples
>
> or manually
>
> cd applications/admin
> tar zxvf ../../admin.w2p
>
Thanks. I missed that somehow in my reading of the manual/documentation.
Regards
Johann
--~--~-~--~~---
2009/11/8 mdipierro
>
> You do not have the option of using latin1. utf8 is set by web2py in
> the http header.
>
>
But in layout.html I see:
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
I'll take an invite as well. :0)
--~--~-~--~~~---~--~~
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 group, send email to
web2py
Doh! He did say "every web2py form helper" though :)
On Nov 8, 8:45 am, mdipierro wrote:
> Do not do this:
>
> gluon.sqlhtml.FormWidget._attributes = _attributes
>
> It would change the widget for all applications called concurrently.
>
> Instead do
>
> db.table.field.widget = lambda field: Form
Denese. You did a fanstatic job. This was needed for some time.
On Nov 8, 7:38 am, DenesL wrote:
> A) What are they?
>
> Keyed tables are usually legacy tables that don't follow the
> traditional hidden 'id' field construct of web2py tables.
> Instead they define one or more fields as primary ke
Seems like you could do the same to DIV.xml (which most helpers derive
from I believe):
def xml(self):
(fa, co) = self._xml()
if 'class="' in fa:
fa = fa.replace('class="','class="myclass ')
if not self.tag:
return co
if self.tag[-1:] == '/':
return '<%s%s
Do not do this:
gluon.sqlhtml.FormWidget._attributes = _attributes
It would change the widget for all applications called concurrently.
Instead do
db.table.field.widget = lambda field: FormWidget(field,_attributes =
_attributes)
On Nov 8, 8:18 am, "mr.freeze" wrote:
> If you want to append a
You do not have the option of using latin1. utf8 is set by web2py in
the http header.
On Nov 8, 7:30 am, Doxaliber wrote:
> You could try to change tha charset dinamically.
> Use iso-8859-1 for Spanish
> and utf8 for english.
>
> On 8 Nov, 12:13, Benigno wrote:
>
> > Salingrosso: Yes to both
Two words: freakin sweet. This opens up a whole new range of
applications that I can use web2py for at work. Thanks!
On Nov 8, 7:38 am, DenesL wrote:
> A) What are they?
>
> Keyed tables are usually legacy tables that don't follow the
> traditional hidden 'id' field construct of web2py tables.
If you want to append a class to every widget, you can replace the
_attributes static method of sqlhtml.FormWidget. Try this in your
model:
...
@staticmethod
def _attributes(field, widget_attributes, **attributes):
attr = dict(
_id = '%s_%s' % (field._tablename, field.name),
_c
Primary source of help: web2py groups
-
http://groups.google.com/group/web2py/topics
http://groups.google.com/group/web2py-developers/topics
http://groups.google.com/group/web2py-users-brazil/topics
Tips on searching the users group
I am in
On Nov 7, 7:00 pm, Thadeus Burgess wrote:
> I think we should all start a public web2py wave! :)
>
> -Thadeus
>
>
>
> On Sat, Nov 7, 2009 at 3:54 PM, mdipierro wrote:
>
> > I have account. I just have not figured out what I am supposed to do
> > with it.
>
> > On Nov 7, 3:08 pm, Nicolás
A) What are they?
Keyed tables are usually legacy tables that don't follow the
traditional hidden 'id' field construct of web2py tables.
Instead they define one or more fields as primary key.
Currently web2py supports keyed tables on DB2, MS SQL, Ingres (thanks
Chris Clark) and Informix (after pe
You could try to change tha charset dinamically.
Use iso-8859-1 for Spanish
and utf8 for english.
On 8 Nov, 12:13, Benigno wrote:
> Salingrosso: Yes to both of your questions.
>
> I had not had this issue before, as translated text with T('') gets
> translated taking this into account. So I u
I'll see what I can do. Any specific tips?
On Nov 8, 4:54 am, Mengu wrote:
> Not related but a suggestion for the web site. web2pyslices is one of
> the best resources on web2py and I think when people search for
> web2py, you should come in the first page. So, why don't you make
> things more
Salingrosso:Yes to both of your questions.
I had not had this issue before, as translated text with T('') gets
translated taking this into account. So I ussually wrote the program
in english, and translated to spanish using the translation files.
In this occasion, I am writing in spanish and
{{ = post.body[:156] }}
On Nov 8, 12:15 pm, annet wrote:
> In order to not mess up my layout, I would like to limit the number of
> lines displayed from a textarea to three, measured in characters that
> is: 156 characters. The last word should be followed bij three dots.
> Is there a way to cod
Not related but a suggestion for the web site. web2pyslices is one of
the best resources on web2py and I think when people search for
web2py, you should come in the first page. So, why don't you make
things more seo'd?
On Nov 8, 12:22 am, "mr.freeze" wrote:
> I put this together to let non-devel
Count me for that too. I have a wave account but don't know how it
works. I joined to web2py wave by the way.
On Nov 7, 11:54 pm, mdipierro wrote:
> I have account. I just have not figured out what I am supposed to do
> with it.
>
> On Nov 7, 3:08 pm, Nicolás de la Torre wrote:
>
> > Invited:
>
I would love to receive an invite
Thank you
Massimiliano
On Sun, Nov 8, 2009 at 7:15 AM, Roger Gicquel wrote:
>
> +1 pls.
>
> On Nov 8, 4:37 am, DenesL wrote:
> > I will take one. Thank you.
> >
> > On 7 nov, 16:08, Nicolás de la Torre wrote:
> >
> > > Invited:
> >
> > > debe...@yahoo.com
In order to not mess up my layout, I would like to limit the number of
lines displayed from a textarea to three, measured in characters that
is: 156 characters. The last word should be followed bij three dots.
Is there a way to code this in the view, or am I better off putting a
length validator o
these things are welcome.
-
On 8 Nov, 08:58, mdipierro wrote:
> you must run web2py with --upgrade=yes this will upgrade admin/welcome/
> examples
>
> or manually
>
> cd applications/admin
> tar zxvf ../../admin.w2p
>
> A lot of people seem to complain about this process. It is t
If you see the source code of index.html generated by
the server do you see:
?
Do you use this syntax to insert layout.html in your index.html?
{{extend 'layout.html'}}
2009/11/8 Benigno
>
> Hello,
>
>There may be some very easy solution to this or something I am
> doing wrong that I am no
Hello,
There may be some very easy solution to this or something I am
doing wrong that I am not aware of, but when I have a layout.html with
the tag:
And then I have an include, like index.html, when I write accented
words on the included file, they do not get correctly "parsed" an
> A lot of people seem to complain about this process. It is there
> because I always thought people were going to modify admin. This never
> happened. Should we make admin upgrade by default?
>
>
No, I think the manual method is better. Perhaps we could
insert an advise similar to the one used on
68 matches
Mail list logo