[web2py] Re: Whoosh
I run some tests and I cannot reproduce the problem but I pointed you to the wrong function. This works for me and does what you asked: db = DAL() db.define_table('a',Field('b')) db.a.insert(b=xxx) query = SQLFORM.build_query([db.a.b],'xxx') print db(query).select() Does it work for you? On Mar 6, 2015, at 6:40 PM, Ron Chatterjee achatterjee...@gmail.com wrote: In my db.py I have from gluon.tools import*. Thats the issue? On Mar 6, 2015 7:31 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: Do you have any from …. import Field in your code? On Mar 6, 2015, at 6:20 PM, Ron Chatterjee achatterjee...@gmail.com wrote: I think the issue is with the line isinstance (field, Field). When I pass the field.it is a gluon.dal.objects.Field n u r comparing that with pydal.object.Field. I m not sure but its failing both if and else. So it goes to raise. Lol On Mar 6, 2015 6:59 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: What is wrong with smart_query? On Fri, Mar 6, 2015 at 5:56 PM, Ron Chatterjee achatterjee...@gmail.com wrote: Can u fix smart_query for me? Lol On Mar 6, 2015 6:53 PM, Massimo DiPierro massimo.dipie...@gmail.com wrote: there should be instructions in the file. You need to install whoosh On Mar 6, 2015, at 5:50 PM, Ron Chatterjee achatterjee...@gmail.com wrote: Does anyone know how to install haystack? I see a python file with .py extension. I need to install whoosk and sunburnt first? Thought may be give haystack a try. On Friday, March 6, 2015 at 1:08:28 PM UTC-5, Massimo Di Pierro wrote: It may need some love. Very few people have used this. It should work fine. It works for me. On Friday, 6 March 2015 11:40:25 UTC-6, Ron Chatterjee wrote: Omg, this is exactly what I was looking for. Sooo spooky On Mar 6, 2015 12:35 PM, Massimo DiPierro massimo@gmail.com wrote: https://github.com/mdipierro/web2py-haystack On Mar 6, 2015, at 11:29 AM, Ron Chatterjee achatte...@gmail.com wrote: Is whoosh is supported in DAL. Any example? Or have a js that create SQLFORM.search like SQLFOrM.smartgrid? Searching is important -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Whoosh
web2py lived up to its promise again and delivered!!! works like a champ. Once line put all the search results in your finger tip and that without wring one single line of JS like php will make you do. The magic of python. How cool is that!:-)? On Saturday, March 7, 2015 at 12:07:35 PM UTC-5, Massimo Di Pierro wrote: I run some tests and I cannot reproduce the problem but I pointed you to the wrong function. This works for me and does what you asked: db = DAL() db.define_table('a',Field('b')) db.a.insert(b=xxx) query = SQLFORM.build_query([db.a.b],'xxx') print db(query).select() Does it work for you? On Mar 6, 2015, at 6:40 PM, Ron Chatterjee achatte...@gmail.com javascript: wrote: In my db.py I have from gluon.tools import*. Thats the issue? On Mar 6, 2015 7:31 PM, Massimo DiPierro massimo@gmail.com javascript: wrote: Do you have any from …. import Field in your code? On Mar 6, 2015, at 6:20 PM, Ron Chatterjee achatte...@gmail.com javascript: wrote: I think the issue is with the line isinstance (field, Field). When I pass the field.it is a gluon.dal.objects.Field n u r comparing that with pydal.object.Field. I m not sure but its failing both if and else. So it goes to raise. Lol On Mar 6, 2015 6:59 PM, Massimo DiPierro massimo@gmail.com javascript: wrote: What is wrong with smart_query? On Fri, Mar 6, 2015 at 5:56 PM, Ron Chatterjee achatte...@gmail.com javascript: wrote: Can u fix smart_query for me? Lol On Mar 6, 2015 6:53 PM, Massimo DiPierro massimo@gmail.com javascript: wrote: there should be instructions in the file. You need to install whoosh On Mar 6, 2015, at 5:50 PM, Ron Chatterjee achatte...@gmail.com javascript: wrote: Does anyone know how to install haystack? I see a python file with .py extension. I need to install whoosk and sunburnt first? Thought may be give haystack a try. On Friday, March 6, 2015 at 1:08:28 PM UTC-5, Massimo Di Pierro wrote: It may need some love. Very few people have used this. It should work fine. It works for me. On Friday, 6 March 2015 11:40:25 UTC-6, Ron Chatterjee wrote: Omg, this is exactly what I was looking for. Sooo spooky On Mar 6, 2015 12:35 PM, Massimo DiPierro massimo@gmail.com wrote: https://github.com/mdipierro/web2py-haystack On Mar 6, 2015, at 11:29 AM, Ron Chatterjee achatte...@gmail.com wrote: Is whoosh is supported in DAL. Any example? Or have a js that create SQLFORM.search like SQLFOrM.smartgrid? Searching is important -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] IMPORTANT - DROPPING SUPPORT FOR PYTHON 2.5?
Who is opposed? Why? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] translate without translating interface--Firefox
I set my Firefox to prefer Italian but then instead of just translating the one word I have marked T(word), Web2Py's interface is translated into Italian. The instructions for Chrome in the video referenced below seemed to say that I should add Italian but not make it first priority, and that seemed to work for Maximo in Chrome in the video. If I don't make Italian my first choice in Firefox, then T(word) doesn't get translated either. I know the T markup is working because, without my word marked up, it stayed in English. But I don't want the Web2Py interface translated into another language. I assume that the people who use my web app will not see the Web2Py interface, and that the only part of my app that will be translated is the part I markup with T. https://www.youtube.com/watch?v=dHu8O1gZOl0 Web development with Python and web2py Part1 ~39:30 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How to create a searchbox for my web page
I would say, go through this link. Massimo and Leonel explained everything. https://groups.google.com/forum/#!topic/web2py/poJDzhYa-d0 On Saturday, March 7, 2015 at 7:33:33 AM UTC-5, zimani wrote: hello people, So i have created my web pages. However i need a searchbox for my users, based on all my pages/database. How can i easily include a search box to my pages. Is there a plugin for search boxes? Thanks for the help -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: OT: I'm stunned how bad MySql is after using Postgres
Nice one. Evidently we're developing very different types of apps. I rarely hit table sizes greater than 1M records. MySQL performs really well for me. Yes, I've had to code around some performance issues (the IN clause specifically), but that is trivial. I've only ever worked with Postgres once and didn't like it. As I recall (it was quite a few years ago) there was more management of the db that had to be done. MySQL is pretty much hands-off, create it and let it be. But, like I said, I have very little experience with Postgres. To each their own I guess. Best of luck with the new app! -Jim On Fri, Mar 6, 2015 at 10:38 PM, Joe Barnhart joe.barnh...@gmail.com wrote: Hi Jim -- Please, whatever you do, DO NOT ever try Postgres! You will be ruined for MySql... :-P -- Joe On Friday, March 6, 2015 at 3:00:22 PM UTC-8, Jim S wrote: Shoot, I was hoping that information would help you out. Certainly made drastic improvements in my case. Let the hatefest continue!! However, I'll have to skip this one, MySQL has done very well for me over the years.. -Jim -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/JUUax7GjxYo/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Help deleting a row when using components LOAD
hi everyone, So i have two components on my page. I can insert comments on my components just fine. However i am trying to allow my users to delete a comment they have inserted. I am not sure how to go about it. Somebody please help it will be appreciated. This is what i have. *In comments.py #i declare controllers to the two components and declare a delete function * @auth.requires_login() def post(): return dict(form = SQLFORM(db.comment_post).process(), comments=db(db.comment_post).select()) @auth.requires_login() def post2(): return dict(form = SQLFORM(db.comment_post2).process(), comments=db(db.comment_post2).select()) @auth.requires_login() def delete_comment(): form = SQLFORM(db.comment_post).process() db(db.comment_post.id == request.vars.id).delete() return locals() *In comments_db.py, i declare my tables* db.define_table('comment_post', Field('body','text'), auth.signature) db.define_table('comment_post2', Field('body','text'), auth.signature) *In both post.load and post2.load, i insert the delete link which is in bold below* {{for post in comments:}} div class=post On {{=post.created_on}} {{=post.created_by.first_name}} says blockquote class=post_body{{=post.body}}/blockquote *{{=A('Remove', _href=URL('default', 'delete_comment', args=['delete', post.id]), cid=request.cid, ajax=True,user_signature=True)}}* /div {{pass}} {{=form}} *In both post.html and post2,html* {{extend 'layout.html'}} {{for post in comments:}} div class=post On {{=post.created_on}} {{=post.created_by.first_name}} says span class=post_body{{=post.body}}/span /div {{pass}} {{=form}} *In my htmls where i put my components* *{{=LOAD('comments', 'post.load', ajax=True)}}* *{{=LOAD('comments', 'post2.load', ajax=True)}}* -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] How to create a searchbox for my web page
hello people, So i have created my web pages. However i need a searchbox for my users, based on all my pages/database. How can i easily include a search box to my pages. Is there a plugin for search boxes? Thanks for the help -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: sqlformfactory smartgrid just search field
Another way to do it is crud .search (db.table, query) On Mar 6, 2015 10:57 AM, Leonel Câmara leonelcam...@gmail.com wrote: It's not that this isn't possible, it's just that it doesn't make much sense to use smartgrid if all you want is a searchbox. Anyway... Here's how you can do it. I don't recommend people use this. controller: def test(): grid = SQLFORM.smartgrid(db.mytable) return locals() view: {{extend 'layout.html'}} {{=grid.element('.web2py_console form')}} ul {{for row in grid.rows:}} li{{=row.title}}/li {{pass}} /ul This assumes, for the sake of example, that the resulting rows have a title field. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/xTCJzJrRuoo/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: IMPORTANT - DROPPING SUPPORT FOR PYTHON 2.5?
I use the source code version. So it doesn't really matter for me. On Saturday, March 7, 2015 at 2:18:17 PM UTC-5, Massimo Di Pierro wrote: Who is opposed? Why? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How to create a searchbox for my web page
There is another way to do it: results = crud.search(dbOBJECT.news, queries= ['equals','contains']) But that will print out all the tables. There are lot of ways to do this but the best is to use the query and output to a table, make it look nice and then display. On Saturday, March 7, 2015 at 1:33:50 PM UTC-5, Ron Chatterjee wrote: I would say, go through this link. Massimo and Leonel explained everything. https://groups.google.com/forum/#!topic/web2py/poJDzhYa-d0 On Saturday, March 7, 2015 at 7:33:33 AM UTC-5, zimani wrote: hello people, So i have created my web pages. However i need a searchbox for my users, based on all my pages/database. How can i easily include a search box to my pages. Is there a plugin for search boxes? Thanks for the help -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: IMPORTANT - DROPPING SUPPORT FOR PYTHON 2.5?
If I understand Massimo correctly, he is saying that the latest version of web2py will not be guaranteed to run on Python 2.5 *regardless* of whether you are using packaged binaries or source version. *It just won't be guaranteed to run on 2.5 no matter what.* It's not a problem with my site. -- Joe On Saturday, March 7, 2015 at 1:01:50 PM UTC-8, Ron Chatterjee wrote: I use the source code version. So it doesn't really matter for me. On Saturday, March 7, 2015 at 2:18:17 PM UTC-5, Massimo Di Pierro wrote: Who is opposed? Why? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Help deleting a row when using components LOAD
U can use the dictionary (or table) as a list n use regular python syntex for list. Like li =['a', 'b']; n then do li.remove ('a'). Ur table a dictionary in python. Db (table.field) r dictionaries. But, u can use [] to make it a list I belive or use select method a pass as a set n then remove. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: IMPORTANT - DROPPING SUPPORT FOR PYTHON 2.5?
I use 2.7.6 from canopy. I will b okay.I think... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: two (or more) applications using the same database
On the same note,...does anyone know if DAL object can b converted into xml like the sql designer did? I know web2py no longer probably support sql designer but if there is a way to convert web2py models into xml then if someone needs to use mysql or other database or use different framework like django they dont need to write up the model files all over again from scratch. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: two (or more) applications using the same database
On the same note,...does anyone know if DAL object can b converted into xml like the sql designer did? I know web2py no longer probably support sql designer but if there is a way to convert web2py models into xml then if someone needs to use mysql or other database or use different framework like django they dont need to write up the model files all over again from scratch. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: two (or more) applications using the same database
On the same note,...does anyone know if DAL object can b converted into xml like the sql designer did? I know web2py no longer probably support sql designer but if there is a way to convert web2py models into xml then if someone needs to use mysql or other database or use different framework like django they dont need to write up the model files all over again from scratch. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: two (or more) applications using the same database
On the same note,...does anyone know if DAL object can b converted into xml like the sql designer did? I know web2py no longer probably support sql designer but if there is a way to convert web2py models into xml then if someone needs to use mysql or other database or use different framework like django they dont need to write up the model files all over again from scratch. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: two (or more) applications using the same database
On the same note,...does anyone know if DAL object can b converted into xml like the sql designer did? I know web2py no longer probably support sql designer but if there is a way to convert web2py models into xml then if someone needs to use mysql or other database or use different framework like django they dont need to write up the model files all over again from scratch. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: IMPORTANT - DROPPING SUPPORT FOR PYTHON 2.5?
well, binaries ship their own python interpreter so they're out of the picture. Dropping 2.5 support means that if anyone is running web2py source with a python 2.5 interpreter would not work. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.