[web2py:35906] Re: Including static html pages

2009-11-24 Thread Johann Spies
2009/11/24 mr.freeze : > > You can render any view from a controller using response.render > (view,vars). Where are the pages stored? > I put them in init/static/poxy (proxy documentation). I will read up about response.render. At the moment I don't (yet) know how to handle this in a controller

[web2py:35907] Re: RSS does not escape output?

2009-11-24 Thread mdipierro
I guess the authors of RSS2 assume that there can valid HTML into the fields. Yes this is bad. I think we should form RSS2 and sanitize the fields before making the RSS. Want to send me a patch? Massimo On Nov 24, 1:18 am, Thadeus Burgess wrote: > No the escaping is not done in the RSS2 modul

[web2py:35908] javascript

2009-11-24 Thread sandy
I want to use javascript in web2py inside the python code.i.e when the form is submitted I want to confirm and then continue.How can I do it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To po

[web2py:35909] Re: Howto to make your own layouts

2009-11-24 Thread Vidul Petrov
This is great! Are there any manuals about the new plugin system? On Nov 9, 8:11 pm, mdipierro wrote: > I would love to see some layouts using it. > Could you send me some exmaples? > > On Nov 9, 12:07 pm, Vasile Ermicioi wrote: > > > > > Since web2py already have jquery included why not using

[web2py:35910] Re: Including static html pages

2009-11-24 Thread Johann Spies
2009/11/24 Thadeus Burgess : > Easiest way is to just reference the static files directly > > http://mysite.com/init/static/documentation/index.html Thanks! That is working. Regards Johann --~--~-~--~~~---~--~~ You received this message because you are subscribe

[web2py:35911] Markdown problem

2009-11-24 Thread Johann Spies
Is the markdown syntax in Web2Py compatible what is described in http://daringfireball.net/projects/markdown/syntax where I found the following: "For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’r

[web2py:35912] Re: Howto to make your own layouts

2009-11-24 Thread Thadeus Burgess
It is still not fully decided on how plug ins will work. Therefore they will not be backwards compatible, and no documentation except what is in the google posts about it. -Thadeus On Tue, Nov 24, 2009 at 2:33 AM, Vidul Petrov wrote: > > This is great! > > Are there any manuals about the new

[web2py:35913] How to multi-line session.flash

2009-11-24 Thread hamdy.a.farag
Hi How can I make response.flash display a message containing new line characters ? --~--~-~--~~~---~--~~ 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 T

[web2py:35914] Re: Using web2py with jython

2009-11-24 Thread hcvst
Hi Massimo, I ran web2py 16.7.2 on jython2.5.1/Sun java 1.6.0_11/Win XP without a problem after changing nodelay to False. Now suddenly I get this recursion error. I haven't changed anything but then again one never knows what changes the admins push to one's machine in a corporate environment. A

[web2py:35915] Re: Maximum No of users can web2py server can support

2009-11-24 Thread David
When I worked in health care we mostly used main frames for everything. But I do have an idea for a dental application once I've learned more. I am still trying to break my old habits of procedural php. :0/ On Nov 23, 4:42 pm, Thadeus Burgess wrote: > Kind of like how django went the news / b

[web2py:35916] Re: Internationalization

2009-11-24 Thread villas
I am enjoying the debate, however, I wonder whether I am alone in thinking that some points could be made more succinctly? I am reminded of this quotation: "I didn't have time to write a short letter, so I wrote a long one instead." Mark Twain. The whole thread just seems non-Pythonic. :-) On

[web2py:35917] Simple Image Browser - Error

2009-11-24 Thread David
I am trying to follow the example here: http://www.web2py.com/AlterEgo/default/show/138 But I keep getting this error: The problem is that I don't understand why there is an error on line 20 and there is no line 20 in my controller. I don't understand how that is getting appended. I thought

[web2py:35918] Re: Sphinx

2009-11-24 Thread Zoom.Quiet
On Mon, Nov 23, 2009 at 23:34, Zoom.Quiet wrote: > On Mon, Nov 23, 2009 at 23:28, mdipierro wrote: >> >> We have had some discussion about moving the documentation to Sphinx. >> Months have passed and there has been no progress. I personally do not >> mind epydoc but some of you really liked Sph

[web2py:35919] Crashing on Updating to 1.72.3

2009-11-24 Thread yamandu
Before I updated to 1.72.3 it does not run. It goes to the ticket page and does not even open the ticket link. Any issue with this version? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To pos

[web2py:35920] Re: Crashing on Updating to 1.72.3

2009-11-24 Thread Timbo
Did you use your options.py file from the old installation? There were some new options added somewhere along the line where if they are not present in the options file, it will crash. Unrelated to this issue, I noticed that the default value of response.flash changed in revision 1234. I'm sure

[web2py:35921] Re: Using web2py with jython

2009-11-24 Thread Timbo
hvcst, This is an issue that we addressed recently but I don't think there has been a new release since this patch. Go here and hit the "Download File" linke: http://bazaar.launchpad.net/~mdipierro/web2py/devel/annotate/head%3A/gluon/template.py Copy that file to /web2py/gluon/template.py (ove

[web2py:35922] new version doesnt allow None types in comparisons?

2009-11-24 Thread Youngblood
i updated from 1.69 to 1.72 and my program now crashes with the following error: Traceback (most recent call last): File "/home/david/Desktop/web2py/gluon/restricted.py", line 184, in restricted exec ccode in environment File "/home/david/Desktop/web2py/applications/DavidsData/controllers

[web2py:35923] length

2009-11-24 Thread sandy
How can we modify the length of the text form in the form created using the form_factory function.?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@go

[web2py:35924] Re: Using web2py with jython

2009-11-24 Thread Dmitri Zagidulin
I don't know if this'll help you, but I've recently wrestled with SOAP/ WSDL stuff on python with SOAPpy, and also ran into problems. I ended up using SUDS, and the problems went away -- it's an excellent SOAP library for python. Hopefully you can fix the jython issue in time for your demo, but if

[web2py:35925] length

2009-11-24 Thread sandy
How can we modify the length of the text form in the form created using the form_factory function.?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@go

[web2py:35926] Help with frames

2009-11-24 Thread Lydia Manikonda
I'm very new to web2py. I want to include the HTML frames in my .html file of web2py. Can anyone kindly let me know how to use frameset and frames. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[web2py:35927] Re: javascript

2009-11-24 Thread mdipierro
I think this does what you need: http://nadiana.com/jquery-confirm-plugin On Nov 24, 2:12 am, sandy wrote: > I want to use javascript in web2py inside the python code.i.e when the > form is submitted I want to confirm and then continue.How can I do it? --~--~-~--~~~-

[web2py:35928] Re: Markdown problem

2009-11-24 Thread mdipierro
We use this http://code.google.com/p/python-markdown2/ which claims compatibility. When you do WIKI(,safe_mode='escape') is default. Try with safe_mode=None or safe_mode=True. On Nov 24, 2:49 am, Johann Spies wrote: > Is the markdown syntax in Web2Py compatible what is described > inhttp

[web2py:35929] Re: How to multi-line session.flash

2009-11-24 Thread mdipierro
response.flash = DIV("hello",BR(),"world") On Nov 24, 3:53 am, "hamdy.a.farag" wrote: > Hi > > How can I make response.flash display a message containing new line > characters ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

[web2py:35930] Re: javascript

2009-11-24 Thread mr.freeze
Or this: http://www.web2pyslices.com/main/slices/take_slice/34 On Nov 24, 10:17 am, mdipierro wrote: > I think this does what you need: > > http://nadiana.com/jquery-confirm-plugin > > On Nov 24, 2:12 am, sandy wrote: > > > I want to use javascript in web2py inside the python code.i.e when th

[web2py:35931] Re: Simple Image Browser - Error

2009-11-24 Thread mdipierro
wow that page is old (and contains some errors). It is much easier than that now. I edited the page Massimo On Nov 24, 7:03 am, David wrote: > I am trying to follow the example here: > > http://www.web2py.com/AlterEgo/default/show/138 > > But I keep getting this error: > > The problem is that I

[web2py:35932] Re: Crashing on Updating to 1.72.3

2009-11-24 Thread mdipierro
Can you tell us more? What does not work? On Nov 24, 7:30 am, yamandu wrote: > Before I updated to 1.72.3 it does not run. > It goes to the ticket page and does not even open the ticket link. > > Any issue with this version? --~--~-~--~~~---~--~~ You received this

[web2py:35933] Re: new version doesnt allow None types in comparisons?

2009-11-24 Thread mdipierro
This is a bug. It is already fixed in trunk. I guess it is time to post 1.73.1 On Nov 24, 9:09 am, Youngblood wrote: > i updated from 1.69 to 1.72 and my program now crashes with the > following error: > > Traceback (most recent call last): >   File "/home/david/Desktop/web2py/gluon/restricted.p

[web2py:35934] Re: length

2009-11-24 Thread mdipierro
You can change the length of the field form=SQLFORM.factory(Field('name',length=256)) of the size of the from the view: jQuery(document).ready(function(){jQuery('#no_table_name').attr('size', 80);}); On Nov 24, 9:34 am, sandy wrote: > How can we modify the length of the text form in the fo

[web2py:35935] Re: Help with frames

2009-11-24 Thread mdipierro
Something like this? http://google.com";> On Nov 24, 9:50 am, Lydia Manikonda wrote: > I'm very new to web2py. I want to include the HTML frames in my .html > file of web2py. Can anyone kindly let me know how to use frameset and > frames. > > Thanks in advance. --~--~-~--~~-

[web2py:35936] Re: javascript

2009-11-24 Thread mdipierro
Indeed the slice is better and simpler. On Nov 24, 10:23 am, "mr.freeze" wrote: > Or this: > > http://www.web2pyslices.com/main/slices/take_slice/34 > > On Nov 24, 10:17 am, mdipierro wrote: > > > I think this does what you need: > > >http://nadiana.com/jquery-confirm-plugin > > > On Nov 24, 2:

[web2py:35937] Re: Simple Image Browser - Error

2009-11-24 Thread Pynthon Pynthon
Sorry for hijackthis your mail but does the like operator still not work? 2009/11/24 mdipierro > > wow that page is old (and contains some errors). It is much easier > than that now. > I edited the page > > Massimo > > On Nov 24, 7:03 am, David wrote: > > I am trying to follow the example here:

[web2py:35938] Re: Simple Image Browser - Error

2009-11-24 Thread mdipierro
Google still does not support them. web2py provides a workaround to execute the filtering at the Python level: http://www.web2py.com/AlterEgo/default/show/248 Not as good as if the back-end could do it but useful for small data sets. Massimo On Nov 24, 10:41 am, Pynthon Pynthon wrote: > Sorry

[web2py:35939] Re: Simple Image Browser - Error

2009-11-24 Thread Pynthon
Ah, OK thanks for the info Massimo. You know last week I was thinking about web2py. Well not about web2py but about a web-framework in python for GAE. I know w2p supports GAE but I mean a framework that only runs on GAE. A framework build on top of the GAE framework. I think it could be really pop

[web2py:35940] Re: new version doesnt allow None types in comparisons?

2009-11-24 Thread Youngblood
Thanks for the quick reply. I appreciate everyone's hard work on this program, it has made working with websites much easier. On Nov 24, 11:32 am, mdipierro wrote: > This is a bug. It is already fixed in trunk. I guess it is time to > post 1.73.1 > > On Nov 24, 9:09 am, Youngblood wrote: > > >

[web2py:35941] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
On Tue, Nov 24, 2009 at 6:57 AM, villas wrote: > > I am enjoying the debate, however, I wonder whether I am alone in > thinking that some points could be made more succinctly? I am > reminded of this quotation: "I didn't have time to write a short > letter, so I wrote a long one instead." Mark

[web2py:35942] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
On Mon, Nov 23, 2009 at 2:25 PM, mdipierro wrote: > > Yarko's patch is tentatively in trunk since nobody seems to complain > about this change in behavior. > You made an error with the change you made in this patch: you added 3 languages, 'en', 'en-us', and 'en-gr'; This should only be either

[web2py:35943] Re: Crashing on Updating to 1.72.3

2009-11-24 Thread Yarko Tymciurak
what is it that I remember about this sort of thing?: clear sessions files? sqlite migration issues (table files, but no tables - as could happen is you install new web2py, but manually move your app)? Look at some obvious things, then tell more of what is going on, how you set this up... On

[web2py:35944] Re: Internationalization

2009-11-24 Thread mdipierro
I put en-uk not en-gr. You see, this is a big can of worms. How do you know that the default application is in en-us and not en-uk? This is way it was not specified before. This is why I am still not completely convinced it is a good idea not to let the users be explicit. On Nov 24, 12:14 pm, Yar

[web2py:35945] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
On Tue, Nov 24, 2009 at 12:37 PM, mdipierro wrote: > > I put en-uk not en-gr. right, en-uk; from a software analysis perspective, only one language should be in the initialization (addition of a non-country specific version of said language should also be acceptable). You see, this is a big c

[web2py:35946] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
a short version of this (context: U.N. type of meeting): you (in effect) changed the translator initialization code to say "The default language [string] I will present you is TWO lanugages", Massimo, it is _as if_ you said something like: "I'm speaking Itailan, or another way for you to think of

[web2py:35947] Re: Internationalization

2009-11-24 Thread Thadeus Burgess
Why can't it just be 'en'? -Thadeus On Tue, Nov 24, 2009 at 1:01 PM, Yarko Tymciurak < resultsinsoftw...@gmail.com> wrote: > a short version of this (context: U.N. type of meeting): > > you (in effect) changed the translator initialization code to say "The > default language [string] I will p

[web2py:35948] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
On Tue, Nov 24, 2009 at 2:10 PM, Thadeus Burgess wrote: > Why can't it just be 'en'? > It probably could I just checked the request environment in a "new install" browser I've never used ("Konquerer on Ubuntu) and web2py is picking up http_accept_language=['en-US', 'en'] So if a client had

[web2py:35949] Re: Internationalization

2009-11-24 Thread Thadeus Burgess
new install on ubuntu is [en-us, en]. I think it should just default to 'en', if you want uk english or us english, then these are different languages, and should be forced. -Thadeus On Tue, Nov 24, 2009 at 2:25 PM, Yarko Tymciurak < resultsinsoftw...@gmail.com> wrote: > On Tue, Nov 24, 2009

[web2py:35950] Re: Internationalization

2009-11-24 Thread mdipierro
I agree with you. Besides most of the current messages have been written by Fran and Jonathan who are both in Europe. How are we to decide what is en-us and what is en-uk? On Nov 24, 2:28 pm, Thadeus Burgess wrote: > new install on ubuntu is [en-us, en]. > > I think it should just default to 'en

[web2py:35951] Re: Internationalization

2009-11-24 Thread Thadeus Burgess
Maybe it's just me, but I can read the same sentence in en-us, en-uk, and en-gr, and I understand exactly what they mean just the same. Can't it just default all to en, and then any new messages that are written get added with this in mind? -Thadeus On Tue, Nov 24, 2009 at 2:31 PM, mdipierro

[web2py:35952] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
'en' is less specific. color or colour might be in it (depending on who wrote the string); it is ambiguous. Removing ambiguity, so that - if some application appropriately needs to be picky about spellings, idioms, grammatical subteties, I think is important. 'en' is "generic"; However, it is a

[web2py:35953] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
On Tue, Nov 24, 2009 at 2:31 PM, mdipierro wrote: > > I agree with you. Besides most of the current messages have been > written by Fran and Jonathan who are both in Europe. How are we to > decide what is en-us and what is en-uk? > as I think about this statement, I think that 'en' _is_ the cor

[web2py:35954] Re: Internationalization

2009-11-24 Thread Thadeus Burgess
since 'en' is generic that is good and since when did color vs colour become that big of an issue ? If parts of web2py have color, and other parts have colour, then using 'en' is what we need to use, since it is generic. -Thadeus On Tue, Nov 24, 2009 at 3:45 PM, Yarko Tymciurak < resultsi

[web2py:35955] Re: Internationalization

2009-11-24 Thread Thadeus Burgess
Yarko, I can always imagine you talking with tone fluctuations and everything since you are so expressive on your emails! :) -Thadeus On Tue, Nov 24, 2009 at 4:11 PM, Thadeus Burgess wrote: > since 'en' is generic that is good and since when did color vs colour > become that big of an i

[web2py:35956] Re: Internationalization

2009-11-24 Thread Yarko Tymciurak
On Tue, Nov 24, 2009 at 4:40 PM, Thadeus Burgess wrote: > Yarko, I can always imagine you talking with tone fluctuations and > everything since you are so expressive on your emails! :) > > Thadeus - Thank you! I take that as a great compliment! WIshing you and yours (and everyone on list) a Ha

[web2py:35957] Re: validity of file

2009-11-24 Thread Richard
no not a guarantee, but would it be worth adding anyway? On Nov 24, 4:10 pm, mdipierro wrote: > Unfortunately checking the mime type is no guarantee that the file > format is conform to specs. > > On Nov 23, 7:49 pm, Richard wrote: > > > could a new validator be added to check the mime type fr

[web2py:35958] Re: SQLFORM upload field, absolute filepath

2009-11-24 Thread Richard
instead of using is_tarfile() you could use the TarFile class (which can take a file object) to check whether the data can be interpreted as a tar file: from tarfile import TarFile, TarError from StringIO import StringIO try: TarFile(fileobj=StringIO(data)) except TarError: print "Not a

[web2py:35959] Re: SQLFORM upload field, absolute filepath

2009-11-24 Thread mdipierro
basically we do that now for w2p files. On Nov 24, 6:03 pm, Richard wrote: > instead of using is_tarfile() you could use the TarFile class (which > can take a file object) to check whether the data can be interpreted > as a tar file: > > from tarfile import TarFile, TarError > from StringIO impo

[web2py:35960] Re: validity of file

2009-11-24 Thread Thadeus Burgess
I wish there was a python equivalent to the linux "file" command. That thing rocks. Since my web2py runs on a linux server, I just fork the process over to the command line to verify the files, and then parse the output, and life is good. -Thadeus On Tue, Nov 24, 2009 at 5:53 PM, Richard wro

[web2py:35961] Re: SQLFORM upload field, absolute filepath

2009-11-24 Thread Thadeus Burgess
I have tried this, and it throws a read error exception on even valid tar files. -Thadeus On Tue, Nov 24, 2009 at 6:37 PM, mdipierro wrote: > > basically we do that now for w2p files. > > On Nov 24, 6:03 pm, Richard wrote: > > instead of using is_tarfile() you could use the TarFile class (w

[web2py:35962] Text box does not scale in custom form

2009-11-24 Thread Gary
I expected the custom widget for strings to scale to the size of the length specified in the ORM, but they all come out the same size - and they're big. Is there another place I should be entering something that helps me with this? I've constructed a custom form using CRUD and the field names ar

[web2py:35963] Re: Text box does not scale in custom form

2009-11-24 Thread Gary
Sorry, missed the posting two down titled 'Length'. That solved the problem, but is there a more eloquent way not using JQuery? On Nov 24, 9:44 pm, Gary wrote: > I expected the custom widget for strings to scale to the size of the > length specified in the ORM, but they all come out the same

[web2py:35964] Re: Text box does not scale in custom form

2009-11-24 Thread Thadeus Burgess
Use CSS. You will have to edit web2py_ajax.html and remove the javascripts that alter field lengths. In css input { width: 150px; height: 25px; font-size: 1.5em; ...etc etc } OR reference by class name or ID -Thadeus On Tue, Nov 24, 2009 at 9:00 PM, Gary wrote: > > Sorry,

[web2py:35965] Re: Text box does not scale in custom form

2009-11-24 Thread mr.freeze
I personally don't agree with using javascript to set properties like that. I remove these lines from web2py_ajax.html: jQuery('input.string').attr('size',50); jQuery('textarea.text').attr('cols',50).attr('rows',10); Then use custom widgets or just set the properties if the form elements dir

[web2py:35966] Re: Text box does not scale in custom form

2009-11-24 Thread Thadeus Burgess
CSS will always be the best route for this, since you are "designing" your forms. Leave the styling of your site to CSS, and the programming to web2py :) The other benefit of this is, if you want to update the way your site looks, instead of having to edit lines of code, you just replace your CSS

[web2py:35967] Re: Text box does not scale in custom form

2009-11-24 Thread mr.freeze
Agreed. If you can achieve the desired effect with CSS it should be the first choice. My examples should only be used if you need to modify attributes. On Nov 24, 9:33 pm, Thadeus Burgess wrote: > CSS will always be the best route for this, since you are "designing" your > forms. Leave the styl

[web2py:35968] The same controller method for ajax and nonajax call

2009-11-24 Thread Alex
Hello, I have "get_workout" action in controler and this action could be called either directly using GET method, or could be called using AJAX. If it's called using GET it should return (render) whole page. If it's called using AJAX it should return (render) only a part of the page It's not cl

[web2py:35969] Re: The same controller method for ajax and nonajax call

2009-11-24 Thread Thadeus Burgess
On your ajax calls use the .json so http://mysite.com/init/default/index/ for normal pages http://mysite.com/init/default/index.json/ to get the dict converted to json or index.xml to get it in xml format.. -Thadeus On Tue, Nov 24, 2009 at 10:06 PM, Alex wrote: > > Hello, > > I have "ge

[web2py:35970] Re: The same controller method for ajax and nonajax call

2009-11-24 Thread Alex
But how can controller method know if current request is POST / GET or AJAX? Sometimes it's needed to generate very different part of HTML page and return it to update some DIV on the page. On Nov 25, 6:09 am, Thadeus Burgess wrote: > On your ajax calls use the .json > > so > > http://mysite.co

[web2py:35971] Complex SQL Query - Left Out Join With A Third table...

2009-11-24 Thread Yannick
Hello mate, Let's said for example I have the following: rows = db().select(db.table_A.first_name, db.table_B.email, db.table_B.ID, left=db.table_B.on ( db.table_A.ID = db.table_B.FK) ) NOW I want to do another left OUTER JOIN of the table from

[web2py:35972] Re: The same controller method for ajax and nonajax call

2009-11-24 Thread mr.freeze
Send a var back with the ajax request: {{=a.title}} if request.vars.is_ajax: On Nov 24, 10:14 pm, Alex wrote: > But how can controller method know if current request is POST / GET or > AJAX? > > Sometimes it's needed to generate very different part of HTML page and > return it to upda

[web2py:35973] different password reset process

2009-11-24 Thread Wes James
Massimo, I've been working on an app that has this type of password reset: 1. click on password reset 2. user types in email address 3. the user gets an email that has a link that takes them back to the web2py site 4. a new password is typed in and this resets the password. This allows for a mo

[web2py:35974] Re: Simple Image Browser - Error

2009-11-24 Thread Richard
if you want something simple for GAE just use the built in webapp framework from Google: http://code.google.com/appengine/docs/python/tools/webapp/ On Nov 25, 4:17 am, Pynthon wrote: > Ah, OK thanks for the info Massimo. You know last week I was thinking > about web2py. Well not about web2py b

[web2py:35975] Re: different password reset process

2009-11-24 Thread Jonathan Lundell
On Nov 24, 2009, at 9:14 PM, Wes James wrote: > I've been working on an app that has this type of password reset: > > 1. click on password reset > 2. user types in email address > 3. the user gets an email that has a link that takes them back to the > web2py site > 4. a new password is typed in