[web2py] uploadwidget bug

2010-04-27 Thread hywang
db.define_table('test_pic', Field('picture', 'upload') ) def reupload_pic(): form = SQLFORM(db.test_pic, 1, upload=URL(r=request, f='download')) if form.accepts(request.vars, session): response.flash = 'ok' return dict(form=form) I specify parameter 'upload' to show subm

[web2py] how can customize auth.table_user, I want to add avatar

2010-04-27 Thread hywang
avatar is commonly used when user registers. But auth.table_user dosen't has this field. Maybe I can add a Field('avatar', 'upload') to auth.table_user. I did do it, but failed: an error occured. ERROR:Rocket.Errors.Thread-7:Traceback (most recent call last): File "E:\web2py\gluon\rocket.py", l

[web2py] error occurs when use upload field + is_image()

2010-04-27 Thread hywang
web2py Ver 1.77.3 db.define_table('test_pic', Field('picture', 'upload') ) def hello(): form = SQLFORM(db.test_pic) if form.accepts(request.vars, session): response.flash = 'ok' return dict(form=form) it works well. when add validator IS_IMAGE db.define_table('test_pic'

Re: [web2py] Re: fatal bug in 1.77.3

2010-04-27 Thread Timothy Farrell
Let us know if it comes up again. -tim On 4/27/2010 1:30 AM, hywang wrote: 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

[web2py] Re: how can customize auth.table_user, I want to add avatar

2010-04-27 Thread mdipierro
which os? On Apr 27, 2:43 am, hywang wrote: > avatar is  commonly used when user registers. But auth.table_user > dosen't has this field. > > Maybe I can add a Field('avatar', 'upload') to auth.table_user. I did > do it, but failed: an error occured. > ERROR:Rocket.Errors.Thread-7:Traceback (most

[web2py] Re: error occurs when use upload field + is_image()

2010-04-27 Thread mdipierro
Do you get the error only with IS_IMAGE? On Apr 27, 2:52 am, hywang wrote: > web2py  Ver 1.77.3 > > db.define_table('test_pic', >     Field('picture', 'upload') > ) > > def hello(): >     form = SQLFORM(db.test_pic) >     if form.accepts(request.vars, session): >         response.flash = 'ok' >  

[web2py] ASP vs Rails 3 (vs web2py?)

2010-04-27 Thread mdipierro
Who is brave enough to rewrite this and add web2py? http://anders.janmyr.com/2010/04/aspnet-mvc-vs-rails3.html -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

[web2py] Re: fatal bug in 1.77.3

2010-04-27 Thread mdipierro
Tim, did you try with the IS_IMAGE validator? On Apr 27, 7:56 am, Timothy Farrell wrote: > Let us know if it comes up again. > > -tim > > On 4/27/2010 1:30 AM, hywang wrote: > > > when i try it again today, everything is ok today. > > I don't know why :-( > > > On 4月26日, 下午11时42分, mdipierro  wrot

[web2py] Re: Webfaction rocks

2010-04-27 Thread aure
Hello Annet, As I had started to do it your way before you even mentioned it (created 2 websites...), I decided to try your solution. Unfortunately, when I try to access the admin website I get this in Firefox: -- Secure Connection Failed admin.aurerua.webfactional.com uses an invalid securi

[web2py] Decimal

2010-04-27 Thread greenpoise
I see a few threads on decimal values. What is the final status of this? Is the field name type Numeric or Integer decimal? such as : Field('totalsale', 'integer')) db.document.totalsale.requires=IS_DECIMAL() I am using sqlite. -- Subscription settings: http://groups.google.com/group/web2py/

[web2py] Re: Webfaction rocks

2010-04-27 Thread aure
Hello Thadeus, After trying Annet's solution, I tried yours. Now if I try to access my site I get a webfaction message: "Site not configured..." This seems to be because I have enables HTTPS. Is normal that I cannot access the website using HTTP now? I am a bit confused. Now if try to access the

[web2py] Re: Decimal

2010-04-27 Thread mdipierro
Field('totalsale', 'decimal(10,8)')) # this is not required, it is automatic db.document.totalsale.requires=IS_DECIMAL() sqlite does not support decimal so this behaves as a double with sqlitle. I am using sqlite. On Apr 27, 9:42 am, greenpoise wrote: > I see a few threads on decimal values. W

Re: [web2py] Re: Webfaction rocks

2010-04-27 Thread Jonathan Lundell
On Apr 27, 2010, at 7:32 AM, aure wrote: > As I had started to do it your way before you even mentioned it > (created 2 websites...), I decided to try your solution. > Unfortunately, when I try to access the admin website I get this in > Firefox: > > -- > Secure Connection Failed > > admin.a

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

2010-04-27 Thread frankz
Thanks Yarko. Note I have no issues run the examples in the book. For example it works if I open http://127.0.0.1/images/default/show/1 it works great. the problem is the example seems not quite robust, if I point the browser to htttp://127.0.0.1:8000/images/default/show It gives me an error. T

Re: [web2py] Re: Webfaction rocks

2010-04-27 Thread Thadeus Burgess
You should be able to tell your browser (if firefox) to accept the SSL certificate anyways. At least, you have to do that with self-signed certificates as well. As far as publishing SSH, sometimes I just fire up a program called gFTP (for Ubuntu Linux), and SFTP (ssh-ftp) into my account, and jus

[web2py] Re: Application logging

2010-04-27 Thread knitatoms
I'd be interested in a step by step guide to setting up this kind of logging. I'm new to web2py and python and I think it would help my learning. I already get some good info by monitoring the http log file with the free Kiwi log viewer (on Windows) which tails the file. Could someone explain ste

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

2010-04-27 Thread mdipierro
You are right. That happens in a few places. The problem is that dangling errors requires redirection to a different action therefore it makes the example more complex and shift the focus from the goal of the example. On Apr 27, 10:27 am, frankz wrote: > Thanks Yarko. > > Note I have no issues r

[web2py] Re: Webfaction rocks

2010-04-27 Thread annet
Aurelien, Don't you have a domain name? I asked my domain registrar to point my domain name to WebFaction's domain name servers: ns1.webfaction.com ns2.webfaction.com ns3.webfaction.com ns4.webfaction.com Comment: Your domain name registrar may not require all four domain name servers; enter as

[web2py] Re: Application logging

2010-04-27 Thread omicron
In 'models' folder, i create the file named '0.py' like this : def _init_log(): import os, logging, logging.handlers logger = logging.getLogger(request.application) logger.setLevel(logging.DEBUG) handler = logging.handlers.RotatingFileHandler(os.path.join(request.folder,'static','a

Re: [web2py] Re: Application logging

2010-04-27 Thread Keith Edmunds
On Tue, 27 Apr 2010 09:31:50 -0700 (PDT), minkto...@gmail.com said: > I'd be interested in a step by step guide to setting up this kind of > logging. I found some older posts that helped in the end. I now have a modules/logging.py file that looks like: def _init_log(): """ From http://ar

Re: [web2py] Re: fatal bug in 1.77.3

2010-04-27 Thread Timothy Farrell
I didn't originally, but did after you mentioned it. It worked both ways for me. On 4/27/2010 8:56 AM, mdipierro wrote: Tim, did you try with the IS_IMAGE validator? On Apr 27, 7:56 am, Timothy Farrell wrote: Let us know if it comes up again. -tim On 4/27/2010 1:30 AM, hywang wrote:

[web2py] LOAD function and web2py_trap_form proposal

2010-04-27 Thread Skiros
I am using LOAD function and I have some problems with forms that do not use a submit button in order to send the data. This is because web2py_trap_form only catch that type of "INPUT". The problem is when a form uses other ways to send the data. For example "A" or "IMG" tags, and especially when

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

2010-04-27 Thread Pystar
Hi mdipierro, So you would advise me to go along the lines of iframes? that means that the new ads would not appear on the website without the visitor refreshing the page? For example, how do I develop a widget like does 3rd party twitter widgets that display realtime tweets? On Apr 27, 12:57 am,

[web2py] Re: LOAD function and web2py_trap_form proposal

2010-04-27 Thread mdipierro
I like your proposal. I will try it tonight and include in trunk. On Apr 27, 2:09 pm, Skiros wrote: > I am using LOAD function and I have some problems with forms that do > not use a submit button in order to send the data. This is because > web2py_trap_form only catch that type of "INPUT". > > T

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

2010-04-27 Thread mdipierro
It depends on what you put in the iframe. You can put in there js code that reload the add. Exactly how you would do without the iframe. If you do it without the iframe your JS may conflict with the JS of the page and the content of the add may conflict with the CSS. With iframe you have more contr

[web2py] Re: fatal bug in 1.77.3

2010-04-27 Thread mdipierro
On Apr 25, 10:53 pm, hywang wrote: > I run web2py from source on centos 5.3. > When upload a file, an error occurs. > -db.py--- > db.define_table('easy_test', >     Field('picture', 'upload') > ) > > -controller file--- > def hello(): >     form = SQLFORM(db.easy_

[web2py] Re: fatal bug in 1.77.3

2010-04-27 Thread mdipierro
To help us debug this.. before line 1162 in gluon/rocket.py if hasattr(output, '__len__'): sections = len(output) please add if hasattr(output, '__len__'): print 'CHECK:',type(output), repr(output)[:100]+'...' sections = le

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

2010-04-27 Thread Pystar
Thanks Massimo, Then I guess I would be doing this with an iFrame and some JSONP magic with jQuery On Apr 27, 8:51 pm, mdipierro wrote: > It depends on what you put in the iframe. You can put in there js code > that reload the add. Exactly how you would do without the iframe. If > you do it witho

[web2py] Silent errors

2010-04-27 Thread Keith Edmunds
I've just found a stupid programming error of mine. Code: task_rows = db(db.tasks.ref==request.vars.number).select() if len(task_rows): rows[0].update_record(status = request.vars.new)

[web2py] Re: SEO

2010-04-27 Thread howesc
another trick that web2py makes real easy, is make sure that each page has a unique URL by using request.args. your url might look like: http://www.foo.com/default/index/43576/Image-title-here/another-thing where 43576 in the above URL is the ID (like in massimo's example), but the other parts a

[web2py] Re: SEO

2010-04-27 Thread Yarko Tymciurak
On Apr 27, 6:07 pm, howesc wrote: > another trick that web2py makes real easy, is make sure that each page > has a unique URL by using request.args.  your url might look like: > > http://www.foo.com/default/index/43576/Image-title-here/another-thing > > where 43576 in the above URL is the ID (like

[web2py] Re: Silent errors

2010-04-27 Thread mdipierro
If I understand the objection Python is a dynamic language. The line returns an error only if it is executed. There is nothing web2py can do about this. On Apr 27, 4:05 pm, Keith Edmunds wrote: > I've just found a stupid programming error of mine. Code: > > ---

Re:[web2py] Re: fatal bug in 1.77.3

2010-04-27 Thread 王怀玉
the output: CHECK: ['http://www.w3.org/TR/xhtml1/DTD/xh... I try the bug in some platforms. python version is 2.5.4, web2py 1.77.3 winxp, bug appears sometimes win7, bug appears everytime centos5.3, bug appears sometimes 在2010-04-28 03:55:11,mdipierro 写道: >To help us debug this.. > >befor

[web2py] Re: fatal bug in 1.77.3

2010-04-27 Thread mdipierro
I am short of ideas. You tell us that the variable output is a list but len(output) calls the __len__ method in the cgi.py module. Can anybody reproduce this behavior? Massimo On Apr 27, 8:09 pm, 王怀玉 wrote: > the output: > CHECK: [' Transitional > //EN" "http://www.w3.org/TR/xhtml1/DTD/xh...

[web2py] Pypi

2010-04-27 Thread mdipierro
Does this work for you? http://pypi.python.org/pypi?:action=display&name=web2py&version=1.77.3 I posted 1.54 long ago but I forgot to uncheck the "hide" checkbox. Massimo

Re: [web2py] Pypi

2010-04-27 Thread Thadeus Burgess
Are we supposed to be able to easy_install this? -- Thadeus On Tue, Apr 27, 2010 at 11:48 PM, mdipierro wrote: > Does this work for you? > > http://pypi.python.org/pypi?:action=display&name=web2py&version=1.77.3 > > I posted 1.54 long ago but I forgot to uncheck the "hide" checkbox. > > Mass

[web2py] Re: Pypi

2010-04-27 Thread mdipierro
No because web2py is not a python module. On Apr 28, 12:12 am, Thadeus Burgess wrote: > Are we supposed to be able to easy_install this? > > -- > Thadeus > > On Tue, Apr 27, 2010 at 11:48 PM, mdipierro wrote: > > Does this work for you? > > >http://pypi.python.org/pypi?:action=display&name=web2p