[web2py] error occurs when add upload field to auth.table_user

2010-04-26 Thread hywang
platform: python2.5 winxp web2py(1.77.3) from source auth.settings.table_user = db.define_table( auth.settings.table_user_name, Field('first_name', length=128, default='',writable=False, readable=False), Field('last_name', length=128, default=''), Field('email', length=512, default

[web2py] Re: fatal bug in 1.77.3

2010-04-26 Thread hywang
when i try it again today, everything is ok today. I don't know why :-( On 4月26日, 下午11时42分, mdipierro wrote: > I cannot reproduce this either. It is not an internationalization > issue. I suspect something else in the code is causing this. We need > to see at the entire code. > > On Apr 26, 10:37

[web2py] Re: newline character in text & string fields on GAE

2010-04-26 Thread mdipierro
What do you mean exactly "you get no new line"? 1) you cannot insert strings containing new lines 2) the new lines disapper when you extract the data (get replaced by something else?) 3) you do not see the newline when you display the field values (are you sure this is not an escaping issue '\n' v

Re: [web2py] Re: newline character in text & string fields on GAE

2010-04-26 Thread G. Clifford Williams
Had: Field('content', 'text', length=1500, requires=IS_NOT_EMPTY(), label='Gripe'), and then tried: Field('content', length=1500, requires=IS_NOT_EMPTY(), label='Gripe', type='text'), in both cases I get no 'new line' characters. (running 1.76.5) On Apr 23, 2010,

[web2py] Re: SEO

2010-04-26 Thread mdipierro
say you have: db.define_table('paper',Field('image','upload')) db.define_table('tag',Field('paper',db.paper),Field('keyword')) then you will have an action like: def index(): paper=db.paper[request.args(0)] response.meta.keywords=','.join([tag.keyword for tag in db(db.tag.paper==paper.

[web2py] Re: SEO

2010-04-26 Thread Al
Thank you for all the comments... The web site is just a few hundreds of SCANNED image of verd old medical papers which can be searched by two database fields - Title and Keywords, so essentially it is just one web page with not much to be indexed on. There is also 'comments' people can add to each

[web2py] Re: generated multilevel menu

2010-04-26 Thread mdipierro
Something like def build_menu():: root=0 # assumes the root has parent_id=0 keys={root:UL()} items=db(db.category.id>0).select(orderby=db.category.parent_id| db.category.name) for item in items: keys[item.id]=ul=UL() keys[item.parent_id].append(LI(A(item.name,_hre

[web2py] Re: Translate small words

2010-04-26 Thread mdipierro
No problem. It is always better to check. On Apr 26, 5:16 pm, Francisco Costa wrote: > I'm sorry to wast your time Massimo. > I tripled check and I found  it.. My browser was crazy. > > On Apr 24, 3:02 pm, mdipierro wrote: > > > I am very perplexed. There is not check about word length in gluon/

[web2py] Re: How do i get this working?

2010-04-26 Thread mdipierro
I will get a easier life with iframes because you completely decouple embedding page with the embedded content so you will have complete control on the latter. On Apr 26, 4:23 pm, Pystar wrote: > So Mdipierro, > What do you suggest I use? > > On Apr 26, 10:06 pm, mdipierro wrote: > > > You can d

[web2py] Re: generated multilevel menu

2010-04-26 Thread Yarko Tymciurak
... sorry - I meant models/menu.py, of course... On Apr 26, 12:31 pm, Julius Minka wrote: > I have to implement following 4-level menu in my view: > > > Level1a > Level1b > Level1c* >   >   Level2a* >         >           Level3a* >                                                       >      

[web2py] Re: generated multilevel menu

2010-04-26 Thread Yarko Tymciurak
did you look at your controller/menu.py file? You should be able to see how to generate this dynamically; On Apr 26, 12:31 pm, Julius Minka wrote: > I have to implement following 4-level menu in my view: > > > Level1a > Level1b > Level1c* >   >   Level2a* >         >           Level3a* >    

[web2py] Re: questions on example in official web2py book

2010-04-26 Thread Yarko Tymciurak
On Apr 26, 4:38 pm, frankz wrote: > Hi, > in the web2py official book, in the image blog example, Referring to http://web2py.com/book/default/section/3/6?search=image+blog > Could anyone help explain what the following line mean? > image = db(db.image.id==request.args(0)).select()[0] This examp

[web2py] questions on example in official web2py book

2010-04-26 Thread frankz
Hi, in the web2py official book, in the image blog example, Could anyone help explain what the following line mean? image = db(db.image.id==request.args(0)).select()[0] I duplicate the same code but I find URL htttp://127.0.0.1:8000/images/default/show gives me an error, "index out of range" How

[web2py] Re: Translate small words

2010-04-26 Thread Francisco Costa
I'm sorry to wast your time Massimo. I tripled check and I found it.. My browser was crazy. On Apr 24, 3:02 pm, mdipierro wrote: > I am very perplexed. There is not check about word length in gluon/ > translate.py. I tried and it works for me. Can you please try again? > > On Apr 24, 7:33 am, Fr

[web2py] Re: How do i get this working?

2010-04-26 Thread Pystar
So Mdipierro, What do you suggest I use? On Apr 26, 10:06 pm, mdipierro wrote: > You can do jsonp (http://bob.pythonmac.org/archives/2005/12/05/remote- > json-jsonp/) but I am not sure it solves the same prpblem you want to > solve. > > On Apr 26, 3:41 pm, Pystar wrote: > > > > > Hi guys, > > I

[web2py] Re: How do i get this working?

2010-04-26 Thread mdipierro
You can do jsonp (http://bob.pythonmac.org/archives/2005/12/05/remote- json-jsonp/) but I am not sure it solves the same prpblem you want to solve. On Apr 26, 3:41 pm, Pystar wrote: > Hi guys, > I am developing an sms-to-web advertising platform and I am having > some problems, here is how it wor

[web2py] How do i get this working?

2010-04-26 Thread Pystar
Hi guys, I am developing an sms-to-web advertising platform and I am having some problems, here is how it works. Interested website/blog owners register on the platform,then any visitor to that website can then text a 140 character advert to a short code, the user's prepaid account gets deducted, a

Re: [web2py] Re: r=request problem.

2010-04-26 Thread Jonathan Lundell
On Apr 26, 2010, at 9:41 AM, annet wrote: > Now I understand the problem. When I rewrite the _href: > > {{=A('View it in your browser', _href="http://127.0.0.1:8000"; + > URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijfcontactpersoon.bedrijf_id,item.contactpersoon.id]), >

[web2py] generated multilevel menu

2010-04-26 Thread Julius Minka
I have to implement following 4-level menu in my view: Level1a Level1b Level1c* Level2a* Level3a* Level4a Level4b Level4c

[web2py] Re: r=request problem.

2010-04-26 Thread annet
Now I understand the problem. When I rewrite the _href: {{=A('View it in your browser', _href="http://127.0.0.1:8000"; + URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijfcontactpersoon.bedrijf_id,item.contactpersoon.id]), _target="_blank")}} ... the problem is solved. I gu

[web2py] Re: java vs python performance on GAE

2010-04-26 Thread Yarko Tymciurak
On Apr 26, 11:00 am, mdipierro wrote: > http://distractable.net/coding/google-appengine-java-vs-python-perfor... > ... interesting; not sure you can draw any specific conclusions, but note that "Groovy" is a dynamic language implemented in jvm, dynamic "like" Ruby of Python. The follow on cha

[web2py] Re: pool_size=

2010-04-26 Thread Yarko Tymciurak
On Apr 26, 10:53 am, annet wrote: > Yarko, > > Thanks for answering my question: > > I host my application at WebFaction, so I won't at a pool_size > argument in the connection string. > > The link to the writeup is very useful. You are welcome, Annet. I'm glad you found the article enlightening

Re: [web2py] Re: SEO

2010-04-26 Thread Jonathan Lundell
On Apr 26, 2010, at 9:01 AM, mdmcginn wrote: > To add to what Massimo said, make sure each page has a unique title > and meta-description. Search engines don't like websites where every > page appears to be identical. Also, don't count on them reading > Javascript. When you view the source of the

[web2py] Re: Custom validators and SQLForm

2010-04-26 Thread Yarko Tymciurak
On Apr 26, 9:11 am, Johann Spies wrote: > The definition: > > db.define_table("navrae", >     Field("begindatum", "date", default=None), >     Field("einddatum", "date", default=None), >     Field("gebruiker", "string", length=8, notnull=True, default='NULL'), >     Field("ipadres", "string", leng

[web2py] Re: SEO

2010-04-26 Thread mdmcginn
To add to what Massimo said, make sure each page has a unique title and meta-description. Search engines don't like websites where every page appears to be identical. Also, don't count on them reading Javascript. When you view the source of the page, remember that's what the search engine crawler i

[web2py] java vs python performance on GAE

2010-04-26 Thread mdipierro
http://distractable.net/coding/google-appengine-java-vs-python-performance-comparison/ -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

[web2py] Re: r=request problem.

2010-04-26 Thread mdipierro
Yes. and the way it is rendered is correct for a web page because the browser knows the hostname already (since you typed it in to request the page). The recipient of the email does not. On Apr 26, 10:46 am, annet wrote: > Massimo, > > Isn't the view being rendered by web2py before it's send to t

[web2py] Re: pool_size=

2010-04-26 Thread annet
Yarko, Thanks for answering my question: I host my application at WebFaction, so I won't at a pool_size argument in the connection string. The link to the writeup is very useful. Regards, Annet. -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

[web2py] Re: r=request problem.

2010-04-26 Thread annet
Massimo, Isn't the view being rendered by web2py before it's send to the mail server? Regards, Annet On Apr 26, 4:27 pm, mdipierro wrote: > http://www.fitwise.nl/ > mock_crm{{=URL(r=request,c='static',f='crm/media/header.jpg')}}" > alt="Header" width="600" height="192" /> > > You know the ho

[web2py] Re: Web2py on Macbook

2010-04-26 Thread mdipierro
I think GAE uses 8080 as default and I suspect he is using dev_appserver. @Johann, can you walk us step by step in what you do and show more details about the error you get? Massimo On Apr 26, 10:37 am, Yarko Tymciurak wrote: > On Apr 26, 7:32 am, Johann Spies wrote: > > > On 24 April 2010 16:

[web2py] Re: fatal bug in 1.77.3

2010-04-26 Thread mdipierro
I cannot reproduce this either. It is not an internationalization issue. I suspect something else in the code is causing this. We need to see at the entire code. On Apr 26, 10:37 am, Timothy Farrell wrote: > My assumption that web2py is returning something other than a list comes > from the trace

[web2py] Re: Web2py on Macbook

2010-04-26 Thread Yarko Tymciurak
On Apr 26, 7:32 am, Johann Spies wrote: > On 24 April 2010 16:06, mdipierro wrote: > > > I use a Mac and I am not the only one on the list. All video tutorials > > on Vimeo are made with Mac. Including the one that explains how to > > deploy on GAE. > > I have watched the video and made some prog

Re: [web2py] Re: fatal bug in 1.77.3

2010-04-26 Thread Timothy Farrell
My assumption that web2py is returning something other than a list comes from the traceback. Why would calling: len(returned_obj) go into the cgi module if it was a string? Rocket alone does not use the cgi module at all so the returned object must be related to it somehow. We know that li

[web2py] Re: pool_size=

2010-04-26 Thread mdipierro
DAL is not doing a keepalive on connections but web2py in trunk will try 5 times to reopen closed connections. On Apr 26, 10:21 am, Yarko Tymciurak wrote: > On Apr 26, 2:17 am, annet wrote: > > > I came across this post: > > >http://groups.google.com/group/web2py/browse_thread/thread/82c1b8cdc1.

[web2py] Re: pool_size=

2010-04-26 Thread Yarko Tymciurak
On Apr 26, 2:17 am, annet wrote: > I came across this post: > > http://groups.google.com/group/web2py/browse_thread/thread/82c1b8cdc1... > > ... and read paragraph 6.1 and 6.2 of the manual. In paragraph 6.1 the > connection strings reads like: > > db = DAL('sqlite://storage.db', pool_size=0); th

[web2py] Re: r=request problem.

2010-04-26 Thread mdipierro
http://www.fitwise.nl/ mock_crm{{=URL(r=request,c='static',f='crm/media/header.jpg')}}" alt="Header" width="600" height="192" /> You know the hostname, the email program does not. On Apr 26, 9:21 am, annet wrote: > In an html e-mail view I have the following links: > > {{=A('View it in your brow

[web2py] r=request problem.

2010-04-26 Thread annet
In an html e-mail view I have the following links: {{=A('View it in your browser', _href=URL(r=request,c='clublocatormail',f='browser_version',args=[item.bedrijfcontactpersoon.bedrijf_id,item.contactpersoon.id]), _target="_blank")}} When I send the mail from within: https://admin.fitwise.nl/a

[web2py] Re: Do you know Redis?

2010-04-26 Thread knitatoms
Good tutorial on Redis from Simon Willison: http://simonwillison.net/static/2010/redis-tutorial/ interesting use of it for session data. On Mar 17, 6:05 pm, mdipierro wrote: > You can do this also with cache.disk. You can cache any primitive > python structure including lists and dicts. > I am

[web2py] Re: fatal bug in 1.77.3

2010-04-26 Thread mdipierro
I think we need some debugging. His code is def hello(): form = SQLFORM(db.easy_test) if form.accepts(request.vars, session): request.flash = 'ok' return dict(form=form) and web2py returns a list with a string in this case (the generic view that renders the dict()). I do not s

[web2py] Re: cookie.strip('""') - AttributeError: 'Morsel' object has no attribute 'strip'

2010-04-26 Thread mdipierro
I think cookie.value.strip('"')).items( On Apr 26, 3:22 am, Rohan wrote: > I am trying to fetch some information from cookie > >     cookie = cookies.get("xyz", "") >     if not cookie: return None >     args = dict((k, v[-1]) for k, v in > cgi.parse_qs(cookie.strip('"')).items()) > > but on run

[web2py] Custom validators and SQLForm

2010-04-26 Thread Johann Spies
The definition: db.define_table("navrae", Field("begindatum", "date", default=None), Field("einddatum", "date", default=None), Field("gebruiker", "string", length=8, notnull=True, default='NULL'), Field("ipadres", "string", length=15, notnull=True, default='NULL'), Field("datum

Re: [web2py] Re: fatal bug in 1.77.3

2010-04-26 Thread Timothy Farrell
Massimo, I know you sent me an email on this but I can't find it so I'll just reply to the list. Rocket is dying in this case because the object it has received from web2py is not a valid WSGI response. A valid WSGI response must be either a list or generator (Rocket is a little more tolerant and

[web2py] ToscaWidgets

2010-04-26 Thread lannick
Hi, Does anyone know and have used ToscaWidgets with web2py ? (http:// toscawidgets.org/ ) Regards, Lannick -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

Re: [web2py] Re: Web2py on Macbook

2010-04-26 Thread Johann Spies
On 24 April 2010 16:06, mdipierro wrote: > I use a Mac and I am not the only one on the list. All video tutorials > on Vimeo are made with Mac. Including the one that explains how to > deploy on GAE. I have watched the video and made some progress but both on Linux and on my Macbook I get a ticke

[web2py] Re: job

2010-04-26 Thread hamdy.a.farag
Hi Jason, you need to register there and complete an english language exam and pass before you're able to apply to jobs read the odesk help. On Apr 25, 7:27 am, Jason Brower wrote: > I tried applying for it, and it didn't do anything.  Why can't they just > give me an email. Sheesh. > Jason > >

Re: [web2py] Re: job

2010-04-26 Thread Álvaro Justen [Turicas]
On Mon, Apr 26, 2010 at 00:43, Eric Vicenti wrote: > Hi guys, > > I'm the one who posted this job. Jason, lets talk. oDesk probably wont > share an email in fear we will make a deal behind their backs, but you > have mine now. > > I would love to get some community advice and make most of this ope

[web2py] cookie.strip('""') - AttributeError: 'Morsel' object has no attribute 'strip'

2010-04-26 Thread Rohan
I am trying to fetch some information from cookie cookie = cookies.get("xyz", "") if not cookie: return None args = dict((k, v[-1]) for k, v in cgi.parse_qs(cookie.strip('"')).items()) but on running, i am getting AttributeError: 'Morsel' object has no attribute 'strip' error Can som

[web2py] Re: fatal bug in 1.77.3

2010-04-26 Thread hywang
may be it is an ooold bug, Discussion about it can be found here: http://groups.google.com/group/web2py/browse_thread/thread/bdfb9bb617488d5/641e843715eb8b11?lnk=gst&q=raise+TypeError%2C+%22not+indexable%22#641e843715eb8b11 On 4月26日, 下午3时44分, hywang wrote: > no better result if i create my own

[web2py] Re: fatal bug in 1.77.3

2010-04-26 Thread hywang
no better result if i create my own view. when i use newest version from google hg server, i can upload file correctly, but if i add a validator IS_IMAGE to 'upload' field, an error will occur also. On 4月26日, 下午2时01分, mdipierro wrote: > Do you have a view with a custom form? > > On Apr 25, 10:53

[web2py] Re: MySQL server has gone away

2010-04-26 Thread annet
Massimo, Accessing revision 1854 results in an Internal Server Error. Kind regards, Annet. -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

[web2py] pool_size=

2010-04-26 Thread annet
I came across this post: http://groups.google.com/group/web2py/browse_thread/thread/82c1b8cdc14eddee/45040c681742a3b1?lnk=gst&q=pool_size%3D#45040c681742a3b1 ... and read paragraph 6.1 and 6.2 of the manual. In paragraph 6.1 the connection strings reads like: db = DAL('sqlite://storage.db', pool