Re: [web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
No dia 27 de Mar de 2012 17:46, Derek sp1d...@gmail.com escreveu: Check the meta tag - if it's UTF-8, that's most likely the issue. You can try ISO-8859-1 and see if that works for you. Txs. Will also check that.

Re: [web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
Find it. titles = '+titles.replace('|', ',')+' with: SCRIPT( ... jQuery.prettyPhoto.open(**images=%(images)s,titles=[%(** titles)s]);}) % dict(images=images, titles=titles), _language='javascript') works! Tested on Firefox and Safari. Though I've failed to find any references on this (there

Re: [web2py] form in loop view

2011-05-23 Thread Miguel Lopes
On Sun, May 22, 2011 at 9:02 AM, 黄祥 steve.van.chris...@gmail.com wrote: hi, is it possible to use form in loop view? e.g. {{for i, row in enumerate(rows):}} {{if i == items_per_page: break}} {{db.blog_comment.blog_id.default = row.id}} {{form = crud.create(db.blog_comment,

Re: [web2py] form in loop view

2011-05-23 Thread Miguel Lopes
On Mon, May 23, 2011 at 10:50 AM, Stifan Kristi steve.van.chris...@gmail.com wrote: ... === controller === def blog_index(): for i, row in enumerate(rows): if i == items_per_page: break db.blog_comment.blog_id.default = row.id form = crud.create(db.blog_comment,

Re: [web2py] web2py 1.96.1 is OUT

2011-06-02 Thread Miguel Lopes
On Wed, Jun 1, 2011 at 7:40 PM, Jason Brower encomp...@gmail.com wrote: Me does a dance. Thanks! And yes it makes rain :-)

Re: [web2py] Re: Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
, 2011 at 1:57 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Can you explain the goal? On Jul 6, 3:23 am, Miguel Lopes mig.e.lo...@gmail.com wrote: I'm experimenting with dynamically generating functions, aka 'actions' in controllers. However, I've been unsuccessful. I can use exec

Re: [web2py] Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
Thanks. In conjunction with routes could supply a solution (shortening the urls). I think I should rethink the payoff (see my reply to Massimo regarding my goals). Thanks, Miguel On Wed, Jul 6, 2011 at 3:12 PM, Jonathan Lundell jlund...@pobox.com wrote: On Jul 6, 2011, at 1:23 AM, Miguel Lopes

Re: [web2py] Re: Metaprogramming in controller

2011-07-06 Thread Miguel Lopes
what you want without necessarily meta- programming. On Jul 6, 9:35 am, Miguel Lopes mig.e.lo...@gmail.com wrote: Thanks. In conjunction with routes could supply a solution (shortening the urls). I think I should rethink the payoff (see my reply to Massimo regarding my goals). Thanks

[web2py] Movie not loaded... problem with flash

2011-07-06 Thread Miguel Lopes
It is unlikely that this is web2py related, but I'm about to go crazy with this one. But I guess it's such a general thing someone must know what is going on. I'm using different uploaded media, such as files, images and flash files (.swf files). I can display images without problem, but not

Re: [web2py] know if a form have pass every validators

2011-07-06 Thread Miguel Lopes
You can also use form.errors if form.accepts(...): ... elif form.errors: ... HTH, Miguel On Wed, Jul 6, 2011 at 5:08 PM, Anthony abasta...@gmail.com wrote: form.accepts(...) returns True if all validators pass and False otherwise -- is that what you're looking for? Anthony On

Re: [web2py] Re: Metaprogramming in controller

2011-07-07 Thread Miguel Lopes
I see closures are not even necessary. The solution is using routes. For the interested routes is ok for production (the embargo was old-news). Here's some info: https://mail.google.com/mail/?shva=1#search/routes+production/12a53a18e7f6b2d5 Miguel On Wed, Jul 6, 2011 at 4:03 PM, Miguel Lopes

[web2py] A catchall action per controller - would be proposal

2011-07-07 Thread Miguel Lopes
Yesterday I posted about implementing dynamic actions (functions) in a controller. This is interesting because one can achieve clean urls, instead of passing the names of the dynamic pages in args or vars. In a system with a cms this has the benefit of user defined pages being indistinguishable

Re: [web2py] Re: Metaprogramming in controller

2011-07-08 Thread Miguel Lopes
:-) On Fri, Jul 8, 2011 at 2:25 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: yes. even better use router (vs routes) On Jul 6, 10:03 am, Miguel Lopes mig.e.lo...@gmail.com wrote: Humm, Nice. Yes, closures are enough, and cleaner too. Is routes OK for production mode? Txs

Re: [web2py] Re: A catchall action per controller - would be proposal

2011-07-08 Thread Miguel Lopes
Yes. That's what I meant. Thank you for making it much clearer. Like you mention the benefit is unclear. This makes it unnecessary to toy with routes or router, which I believe is in the spirit of web2py and benefits beginners with one less location to edit, thing to learn (routes rules vs.

Re: [web2py] Re: Python newbie: is knowledge of network programming must for web development stuff ?

2011-07-12 Thread Miguel Lopes
Yes. In my opinion basic Python is the only almost requisite. The book does a very good job at hand holding, it really helps to know a little Python (which the book also caters for). My advice is follow along with the book. If you get stuck by any Python stuff. Take a minute out of web2py and just

Re: [web2py] web2py - Best Practice

2011-07-13 Thread Miguel Lopes
Let me add the advantage that the initiative stimulates focuses contribution and supplies a platform for learning. Some people may not wish, have the time or expertise to get involved with the development of the web2py framework. This sort of initiative supplies a narrower ground for contribution

[web2py] Limitation in template system

2011-07-13 Thread Miguel Lopes
I think this behavior I've just found is worth sharing. Templates don't honor the if statement that conditionally try to include or exclude template blocks. I've just detected this (in 1.96.4 I think) and upgrade to 1.97.1 and the issue/behavior remains. {{rsd=None}} {{if rsd!=None:}} {{block

Re: [web2py] Re: Limitation in template system

2011-07-19 Thread Miguel Lopes
I missed that comments feature. Great you added one! Miguel On Tue, Jul 19, 2011 at 12:48 PM, Nico de Groot ndegr...@chello.nl wrote: Good point, was just going to post this myself, you beat me to it. A hint should be added to the web2py book in chapter 5

Re: [web2py] Re: Limitation in template system

2011-07-21 Thread Miguel Lopes
No problem be as criticl as you wish. Please do not take my critique in a bad way, but be very careful when adding blocks of code in your views, I understand the example above is just a code sample to illustrate a perceived deficiency in the view templating system, but unless you are a PHP

Re: [web2py] Re: Limitation in template system

2011-07-21 Thread Miguel Lopes
Actually I began by using functions too. But had some problems (can't remember exactly what), and view functions, even if comprised exclusively of view code didn't really tick my fancy. I much rather extract those snippets of HTML to a module or model file exclusively dedicated to html snippets.

Re: [web2py] Web2py Certification Program ?

2011-07-22 Thread Miguel Lopes
There is some private offering, which I think should be listed in web2py.com : * a program at DePaul University: http://www.cdm.depaul.edu/ipd/Programs/Pages/WebDevelopmentwithPython.aspx * a program in Brasil: http://www.cursodepython.com.br/ And free courses (structured content, besides the

Re: [web2py] web2py videos on the internet

2011-07-23 Thread Miguel Lopes
Cool! On Fri, Jul 22, 2011 at 3:24 PM, Bruno Rocha rochacbr...@gmail.com wrote: I have some (in portuguese) web2py + Ipython ( IDE for what?) http://vimeo.com/26387038 Comet http://vimeo.com/18399381 PowerTable http://vimeo.com/18447603 Uploadify http://vimeo.com/20107460 I am

Re: [web2py] The web2py grid/crud plugin you've always dreamed about!

2011-07-24 Thread Miguel Lopes
Great work, it will be/is very useful for many of us! Thanks, Miguel On Fri, Jul 22, 2011 at 11:35 PM, Bruno Rocha rochacbr...@gmail.com wrote: Hi, I present you PowerGrid Plugin (now in beta 0.1) [ http://labs.blouweb.com/PowerGrid/] What is it? A plugin to show, manage and paginate

Re: [web2py] web2py for freelance work

2011-07-26 Thread Miguel Lopes
1. web2py is especially good for freelancers and single developers because it is such a tight package. Everything works really well together and right out of the box. 2. From the forum I get the impression that there is a lot of intranet work. But if you look for sites built with web2py I think

Re: [web2py] Re: DAL db(db.table.id1).select() diferent from db.select(db.table.id1)

2011-07-28 Thread Miguel Lopes
The correct syntax is: db(query).select( fields_to_include ) You can find the details at: http://web2py.com/book/default/chapter/06#Query,-Set,-Rows as for db.select(db.table.id1) I would expect it to create a ticket due to a KeyError since db as no select method. 2011/7/28 António Ramos

Re: [web2py] return record from a query only shows field from one table

2011-07-28 Thread Miguel Lopes
The DAL is not SQL, it has a diferent logic. What are you trying to achieve? 2011/7/28 António Ramos ramstei...@gmail.com this db(db.requests.product==*db.products.id*==3).select() returns all field from *product* table only this db(db.products.id==*db.requests.product*==3).select()

Re: [web2py] return record from a query only shows field from one table

2011-07-28 Thread Miguel Lopes
thank you 2011/7/28 Miguel Lopes mig.e.lo...@gmail.com The DAL is not SQL, it has a diferent logic. What are you trying to achieve? 2011/7/28 António Ramos ramstei...@gmail.com this db(db.requests.product==*db.products.id*==3).select() returns all field from *product* table only

Re: [web2py] Re: web2ruby possible?

2011-10-13 Thread Miguel Lopes
what about D? On Thu, Oct 13, 2011 at 4:49 AM, wwwgong wen.g.g...@gmail.com wrote: Vote for node.js On Sep 11, 5:40 pm, dustin.b dustin.bens...@googlemail.com wrote: 1+ vote for node.js ;) On 11 Sep., 21:14, David Marko dma...@tiscali.cz wrote: Or to node.js :-)

Re: [web2py] new web site

2011-11-09 Thread Miguel Lopes
Looks great! It should be clear what the Awarded the best... is. Perhaps using http://www.infoworld.com/sites/infoworld.com/files/imagecache/slideshow_slide/media/image/36SS-bossies-2011-web2py.jpg or linking to InfoWorld. Miguel

[web2py] how to update a digitally signed component via response.js

2012-07-02 Thread Miguel Lopes
I have a view index.html with two components - myform and namelist. The index action requires_login() and both myform and namelist actions requires_signature() This works as expected. The problem is that the update of namelist via response.js set in the myform action fails. I figure that since

Re: [web2py] DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread Miguel Lopes
On Mon, Jul 2, 2012 at 2:08 PM, Santiago santiagogilab...@gmail.com wrote: Hello, I have a field defined as below : Field('id_indra', length=5, label=T('ID Indra'), notnull=False, requires=[REQUIRED, MAX_5, IS_MATCH(r'^[a-zA-Z0-9]{5}$')]) Is it is possible to intercept all inserts /

[web2py] Re: how to update a digitally signed component via response.js?

2012-07-03 Thread Miguel Lopes
('inter_component', 'myform', ajax=True, target=cmy_form)}} {{=LOAD('inter_component', 'name_list', ajax=True, target='cname_list', user_signature=HKEY)}} Miguel On Mon, Jul 2, 2012 at 11:41 AM, Miguel Lopes mig.e.lo...@gmail.com wrote: I have a view index.html with two components - myform and namelist

Re: [web2py] Re: how to update a digitally signed component via response.js?

2012-07-03 Thread Miguel Lopes
('inter_component', 'myform', ajax=True, target=cmy_form)}} {{=LOAD('inter_component', 'name_list', ajax=True, target='cname_list', user_signature=HKEY)}} Miguel On Mon, Jul 2, 2012 at 11:41 AM, Miguel Lopes mig.e.lo...@gmail.comwrote: I have a view index.html with two components - myform and namelist

Re: [web2py] row.update_record()

2017-05-22 Thread Miguel Lopes
On Mon, May 22, 2017 at 4:35 PM, 'Annet' via web2py-users < web2py@googlegroups.com> wrote: > I have the following query and form: > > user = db.auth_user(vertexID=vertexID) > > form = SQLFORM.factory(db.auth_user, db.auth_dummy, > extra_fields=extra_fields) > > If the form validates I want to

<    1   2