Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Johann Spies
On 8 October 2011 17:19, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Almost any query an be build using the dal. How would this type of postgresql-query be translated into DAL? WITH regional_sales AS ( SELECT region, SUM(amount) AS total_sales FROM orders GROUP

[web2py] Re: [web2py:31163] Re: Custom form builder appliance?

2011-10-10 Thread Gour-Gadadhara Dasa
On Wed, 16 Sep 2009 19:08:57 -0700 (PDT) mdipierro mdipie...@cs.depaul.edu wrote: No but it would be really nice. If done right the same code would be use to build tables (models) and forms. I know it's an old thread, but I hope you won't mind... Playing with Instant Press in order to move my

Re: [web2py] Re: Threads :-)

2011-10-10 Thread Mike Veltman
I found the solution, I was making it too complicated. Thank you for indirectly solving my problem. I moved the whol stuff to the cron job and make the frontend lean and mean. So no need anymore for threads the frontend. One question. when I run web2py in a cronjob can I use thread there ? Or

[web2py] Multi tenency in web2py

2011-10-10 Thread Saurabh S
hi , i am developing the configurable system for four clients . i want the code should be deployed on the single instance and should support the diffrent features depending upon who is logged in...also there should be a single database for all the clients..in order to impliment multi tenecy i

[web2py] Webfaction and SMTP

2011-10-10 Thread Kenneth Lundström
Hi web2py users, does anybody use Webfaction as hosting and use Webfactions SMTP servers to send mail? What settings are you using? I can´t web2py to send mails from Webfaction. Kenneth

[web2py] Re: Flash message: You are being redirected a href=app_namehere/a

2011-10-10 Thread Ross Peoples
Sorry it took so long to get back. Been a crazy couple of days: This is my controller: @auth.requires_login() def index(): form = SQLFORM.factory( Field('partnumber', length=30, requires=IS_NOT_EMPTY()), Field('quantity', 'double', default=1, requires=IS_FLOAT_IN_RANGE(0.1,

[web2py] Re: Debug web2py service?

2011-10-10 Thread Ross Peoples
I used Python's PDB extensively. I develop a couple of JSONRPC/XMLRPC services with no GUI on web2py and logging helps, but sometimes you just need to step through the code. Anywhere I need the Python code to break execution, I just put in this line: import pdb; pdb.set_trace() Then you are

Re: Re : Re: [web2py] Re: fluxflex

2011-10-10 Thread kralin
thanks a lot Marin, I've missed this change in generic.html On 7 Ott, 12:06, Marin Pranjić marin.pran...@gmail.com wrote: https://groups.google.com/forum/#!msg/web2py/26g9XA_0ZXE/4yiIHs5FivkJhttp://groups.google.com/group/web2py/browse_thread/thread/485ee82885... It is related to security

[web2py] Check to establish whether or not a record exists

2011-10-10 Thread Chris Rowson
Hi list, I have a database table which looks like this: postcode_cache postcode (UNIQUE) lat lon nearest I want to test first whether or not a record exists for 'postcode' and if a record does exist, I want to check whether the 'nearest' field contains any data. I've

Re: [web2py] Webfaction and SMTP

2011-10-10 Thread Vasile Ermicioi
in db.py mail.settings.server = 'smtp.webfaction.com' mail.settings.sender = 'some email of yours' mail.settings.login = 'user:pwd' # your webfaction name and password, you may change the password for mailboxes from webfaction panel then from controllers

[web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Massimo Di Pierro
You cannot. The DAL does not support the WITH statement. You have to use db.executesql On Oct 10, 1:55 am, Johann Spies johann.sp...@gmail.com wrote: On 8 October 2011 17:19, Massimo Di Pierro massimo.dipie...@gmail.comwrote: Almost any query an be build using the dal. How would this type

[web2py] Re: Threads :-)

2011-10-10 Thread Massimo Di Pierro
On Oct 10, 2:54 am, Mike Veltman mike.velt...@gmail.com wrote: I found the solution, I was making it too complicated. Thank you for indirectly solving my problem. I moved the whol stuff to the cron job and make the frontend lean and mean. So no need anymore for threads the frontend. One

[web2py] Grid and links

2011-10-10 Thread Massimiliano
I like the new grid/smartgrid a lot, but when you have many linked tables the grid appears a little bit cluttered. What do you think of an option that hide all links/buttons (but not detail button) from the grid, but show them on the detail view? Thank you -- Massimiliano

[web2py] Re: Multi tenency in web2py

2011-10-10 Thread Massimo Di Pierro
http://web2py.com/book/default/chapter/06?search=tenant On Oct 10, 5:09 am, Saurabh S ggtestlo...@gmail.com wrote: hi , i am developing the configurable system for four clients . i want the code should be deployed on the single instance and should support the diffrent features depending upon

[web2py] Re: Check to establish whether or not a record exists

2011-10-10 Thread Massimo Di Pierro
row = db.postcode_cache(postcode=postcode) if not row: db.postcode_cache.insert(postcode=postcode,nearset=nearest) elif not row.nearest: row.update_record(nearset=nearest) else: pass # do nothing On Oct 10, 8:22 am, Chris Rowson christopherrow...@gmail.com wrote: Hi list, I have a database

[web2py] Re: Grid and links

2011-10-10 Thread Massimo Di Pierro
def grid(query,             fields=None,             field_id=None,             left=None,             headers={},             columns=None,             orderby=None,             searchable=True,             sortable=True,             paginate=20,             deletable=True,             

Re: [web2py] Re: Check to establish whether or not a record exists

2011-10-10 Thread Chris Rowson
Thank you Massimo :-) Chris On Mon, Oct 10, 2011 at 2:55 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: row = db.postcode_cache(postcode=postcode) if not row: db.postcode_cache.insert(postcode=postcode,nearset=nearest) elif not row.nearest: row.update_record(nearset=nearest) else:

[web2py] IE9

2011-10-10 Thread horridohobbyist
When I use IE9 to access admin and edit any file in an app, the contents of the editor window are all highlighted and there's no way to get out of it. This makes editing impossible. Has anyone else found this? Not that it really matters to me because I just use Chrome or Firefox, instead. But

[web2py] Re: Flash message: You are being redirected a href=app_namehere/a

2011-10-10 Thread Anthony
redirect() works by raising an HTTP exception, so I think the redirect in your try is triggering your except, so it ends up flashing the response body of the redirect. Why are you catching HTTP exceptions -- is anything in your try likely to trigger an HTTP? Anthony On Monday, October 10,

[web2py] Re: IE9

2011-10-10 Thread Anthony
Yes, the default editor does not work on IE9. It's usable in IE7/IE8, though with an odd highlighting quirk. In IE9, you can switch to compatibility mode, or there is a toggle editor option that changes the editor to a regular text area (so no syntax highlighting). There's an alternative Amy

[web2py] Re: Flash message: You are being redirected a href=app_namehere/a

2011-10-10 Thread Ross Peoples
I didn't think about the try/except. The add_partnumber method will throw an HTTP exception if something fails, so that's why I was catching it. I moved the redirect() outside of the try/except and it is working as expected now. Thanks for catching that!

Re: [web2py] Re: Threads :-)

2011-10-10 Thread Jonathan Lundell
On Oct 10, 2011, at 6:51 AM, Massimo Di Pierro wrote: On Oct 10, 2:54 am, Mike Veltman mike.velt...@gmail.com wrote: I found the solution, I was making it too complicated. Thank you for indirectly solving my problem. I moved the whol stuff to the cron job and make the frontend lean and

[web2py] Re: Threads :-)

2011-10-10 Thread Massimo Di Pierro
oops. true. On Oct 10, 9:30 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 10, 2011, at 6:51 AM, Massimo Di Pierro wrote: On Oct 10, 2:54 am, Mike Veltman mike.velt...@gmail.com wrote: I found the solution, I was making it too complicated. Thank you for indirectly solving my

Re: [web2py] Re: Grid and links

2011-10-10 Thread Massimiliano
Thank you Massimo, I'm aware of that. I was just looking for a way to show all buttons but detail only in the detail view (the one generated from the grid) and not in the table view. -- Massimiliano On Mon, Oct 10, 2011 at 3:58 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: def

[web2py] Re: Grid and links

2011-10-10 Thread Massimo Di Pierro
You cannot, but open a ticket and we may add a flag for that. On Oct 10, 9:35 am, Massimiliano mbelle...@gmail.com wrote: Thank you Massimo, I'm aware of that. I was just looking for a way to show all buttons but detail only in the detail view (the one generated from the grid) and not in the

[web2py] Storage {'region': lazyT 'no match 2 digits'}

2011-10-10 Thread annet
I have a form containing the following validator: requires=IS_MATCH('\d{2}',error_message='no match 2 digits') When the user violates this constraint an error message is being displayed, however, this is written in the terminal: Storage {'region': lazyT 'no match 2 digits'} Why is that? Can I

[web2py] Import/execute sql file

2011-10-10 Thread David
Until now i did all my db queries with the DAL from web2py. But first the first i now got a raw sql file that needs to be execute at a certain point. In the terminal i use the '\i' command to import and execute a sql script. If i try to use this with db.executesql(\i /path/to/file.sql) i get an

[web2py] Re: Import/execute sql file

2011-10-10 Thread Mathew Grabau
Calls are not executed with the psql command, they are done with psycopg2. You could try a subprocess.POpen call: import subprocess ... sp = subprocess.POpen(psql {insert remainder of command line here}, shell=True) For more on the options of the subprocess module:

[web2py] Re: date picker on v1.99

2011-10-10 Thread kenji4569
The behavior of the date picker seems to have changed from a certain version. For now, we should apply a patch to the anytime.js: 545 - this.showPkr(null);event.preventDefault();},keyAhead:function() 545 + return;event.preventDefault();},keyAhead:function() [for readable version

[web2py] Re: Google Cloud SQL

2011-10-10 Thread howesc
re the image application: my recommendation is use blobstore for the images. then you can use the google high-performance image serving URL (which last i checked both is faster than anything you can do directly and cheaper). That serves your images then using the same technology as picassa

Re: [web2py] Webfaction and SMTP

2011-10-10 Thread Kenneth Lundström
Many thanks Vasile, I´m 100% sure I tested the same setting many times before, but no luck. Now I copied your settings and voila it works. It´s sometimes so frustrating to search for errors and after hours of searching it just works without finding what was wrong. But I guess thats the life

[web2py] migration fails when modifying field with notnull=True

2011-10-10 Thread Alex
I've an existing table: db.define_table('service_type', Field('cost_car_km', 'decimal(7,2)', notnull=True), ...) there is already some data in the table. Now I changed the field to Field('cost_car_km', 'decimal(7,3)', notnull=True), the next time I try to call a page I get this error:

[web2py] Re: migration fails when modifying field with notnull=True

2011-10-10 Thread Mathew Grabau
Specify a default value for the field, there may be NULLs in that column right now, which violates the NULL contraint you are adding to the table. Perhaps 0 would make a good default for your field.

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Phyo Arkar
Web2py DAL is Freaking Best Piece of Software Ever come into existance :) ! Use it , You Must! On Sat, Oct 8, 2011 at 9:54 PM, Chris Rowson christopherrow...@gmail.comwrote: Thanks Massimo, I'm very new at this and found the DAL a bit intimidating. I'm beginning to get the hang of it now

[web2py] Re: date picker on v1.99

2011-10-10 Thread Massimo Di Pierro
Can you please email me the patch? On Oct 10, 11:35 am, kenji4569 hos...@s-cubism.jp wrote: The behavior of the date picker seems to have changed from a certain version. For now, we should apply a patch to the anytime.js: 545 - this.showPkr(null);event.preventDefault();},keyAhead:function()

Re: [web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Phyo Arkar
Is it possible to support with? On Mon, Oct 10, 2011 at 8:21 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: You cannot. The DAL does not support the WITH statement. You have to use db.executesql On Oct 10, 1:55 am, Johann Spies johann.sp...@gmail.com wrote: On 8 October 2011

[web2py] Re: migration fails when modifying field with notnull=True

2011-10-10 Thread Alex
As shown in the example above the field already had a notnull=True constraint so there were no NULLs in the existing rows. But nevertheless it works with a default value, thanks! It seems that a default value is needed for the migration process by web2py. Is this true?

[web2py] Re: migration fails when modifying field with notnull=True

2011-10-10 Thread Mathew Grabau
I can't say for sure, sorry. Given the error comes from PostgreSQL (IntegrityError), I'd wager it's probably a PostgreSQL thing.

[web2py] SQLFORM and IS_IN_SET problem

2011-10-10 Thread Cliff
This is the field def: Field('status', 'list:string'), then: db.mytable.status.requires = IS_IN_SET( {'n': 'New', 'I':'In process', 'C':'Complete'}, zero = 'Choose' ) When editing, SQLFORM shows the zero choice when on opening. The choices display correctly and can be changed. On the

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Anthony
Since 'status' is a list:string field, why not set multiple=True? IS_IN_SET(..., multiple=True) Anthony On Monday, October 10, 2011 2:45:48 PM UTC-4, Cliff wrote: This is the field def: Field('status', 'list:string'), then: db.mytable.status.requires = IS_IN_SET( {'n': 'New',

[web2py] How to add more buttons to form that submits form to different actions ...

2011-10-10 Thread David Marko
I would like to use concept of shared form (http://web2py.com/book/default/chapter/07#Sharing-Forms) and I want to have a more submit buttons, each to different action on controller. How can I sinmply make a more buttons each submiting form to different action.

[web2py] DAL level access to GAE entities by named key

2011-10-10 Thread Wikus van de Merwe
Is there a way to use DAL to make a GAE query by entity name (not just numeric id)? I remember a discussion on the list about GAE keys with parents and a proposed patch for DAL to be able to pass GAE Key instead of if id. I see this implemented in the DAL code:

Re: [web2py] Re: Help for creating template

2011-10-10 Thread Miroslav Gojic
with {{=request.url}} i will get /some/my/url/address but when I tray next example it is not working: {{ myurl = request.url: i = /some/my/url/address: if i == myurl: response.writ('my first HTML output') else: response.write('my other HTML output') pass }} how to resolve this, I need one part

[web2py] Re: checkbox input default value

2011-10-10 Thread Wikus van de Merwe
Are you using list:string? Can you post the relevant parts of your model and controller?

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Cliff
Anthony, I don't want multiple values. I just want one of those values. Is IS_IN_SET the incorrect way to do what I want. On Oct 10, 2:52 pm, Anthony abasta...@gmail.com wrote: Since 'status' is a list:string field, why not set multiple=True? IS_IN_SET(..., multiple=True) Anthony On

[web2py] Re: To DAL or not to DAL, that is the question!

2011-10-10 Thread Massimo Di Pierro
Open a ticket. It is not going to happen today but we are committed to make DAL more and more powerful. On Oct 10, 1:17 pm, Phyo Arkar phyo.arkarl...@gmail.com wrote: Is it possible to support with? On Mon, Oct 10, 2011 at 8:21 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote:

Re: [web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Bruno Rocha
On Mon, Oct 10, 2011 at 5:38 PM, Cliff cjk...@gmail.com wrote: Anthony, I don't want multiple values. I just want one of those values. If you want only one value, why are you using list:string? change to Field('status', 'string'),

[web2py] Re: Windows + Apache + mod_proxy

2011-10-10 Thread Omi Chiba
Paolo, I finished the setting and access http://ochiba-183(My PC Name) but it shows the default index.php under www and not web2py. d4 - open %WINDOWS%\system32\drivers\etc\hosts file and add the alias 127.0.0.1 web2py.localhost. Replace server's IP to 127.0.0.1 and access to web2py from not

Re: [web2py] Re: Help for creating template

2011-10-10 Thread Anthony
On Monday, October 10, 2011 4:03:49 PM UTC-4, miroslavgojic wrote: with {{=request.url}} i will get /some/my/url/address but when I tray next example it is not working: {{ myurl = request.url: i = /some/my/url/address: if i == myurl: response.writ('my first HTML output') else:

[web2py] Re: How to add more buttons to form that submits form to different actions ...

2011-10-10 Thread Cliff
Do you mean one form with multiple submit buttons? On the form: {{=INPUT(_type='submit', _name='submit_one')}} {{=INPUT(_type='submit', _name='submit_two')}} In the controller: if request.vars['submit_one']: do something ## maybe call a function elif request.vars['submit_two'] do

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Cliff
If you want only one value, why are you using list:string? Misread the book :( Thanks, anyway.

[web2py] Re: How to add more buttons to form that submits form to different actions ...

2011-10-10 Thread Anthony
I'm not sure there's an easy way to do that in HTML, as the form's 'action' attribute determines where the form is posted. But you might use Javascript (jQuery) to dynamically change the form's action based on the button that is clicked. See

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Cliff
Wait a minute, though. I want a drop down menu. So if I do this: Field('status', 'string', requires = IS_IN_SET({'A' : 'Apple', 'B': 'Banana'})) I will get a drop down? On Oct 10, 4:40 pm, Bruno Rocha rochacbr...@gmail.com wrote: On Mon, Oct 10, 2011 at 5:38 PM, Cliff cjk...@gmail.com wrote:

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Anthony
On Monday, October 10, 2011 5:01:52 PM UTC-4, Cliff wrote: Wait a minute, though. I want a drop down menu. So if I do this: Field('status', 'string', requires = IS_IN_SET({'A' : 'Apple', 'B': 'Banana'})) I will get a drop down? Yes.

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Cliff
Made the change as recommended - still not working. On Oct 10, 5:01 pm, Cliff cjk...@gmail.com wrote: Wait a minute, though.  I want a drop down menu. So if I do this: Field('status', 'string', requires = IS_IN_SET({'A' : 'Apple', 'B': 'Banana'})) I will get a drop down? On Oct 10, 4:40 

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Anthony
See http://web2py.com/book/default/chapter/07#Widgets. On Monday, October 10, 2011 5:09:03 PM UTC-4, Anthony wrote: On Monday, October 10, 2011 5:01:52 PM UTC-4, Cliff wrote: Wait a minute, though. I want a drop down menu. So if I do this: Field('status', 'string', requires =

Re: [web2py] Re: Help for creating template

2011-10-10 Thread Miroslav Gojic
This is much better ... just how to define condition only for index page (or function or controller) {{if condition:}} how to make definition of condition - there no need to be request.url it can be request.controller when I tray this I get an error: {{if {{=request.function}} == index:}} your

[web2py] Re: Windows + Apache + mod_proxy

2011-10-10 Thread Paolo Caruccio
Hi Omi, I wasn't sure this part, so I just add 127.0.0.1 ochiba-183 to my hosts. Try to replace with 10.30.6.122 ochiba-183 Let me know if it works. Ciao. Paolo

Re: [web2py] Re: Help for creating template

2011-10-10 Thread Anthony
{{if {{=request.function}} == index:}} Yes, once you're inside a {{}}, you can write any Python and refer to any global (or local) variables -- so no need to nest another {{=}} in there.

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Cliff
Mostly fixed now. There was also a bug in my controller code that was complicating things. One problem remains. With readonly=True, the field still shows the dictionary key rather than the value. On Oct 10, 5:09 pm, Cliff cjk...@gmail.com wrote: Made the change as recommended - still not

Re: [web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Bruno Rocha
just tested values = ((0, 'value 1'), (1, 'value 2)) db.table.field.requires = IS_IN_SET(values) works ok. On Mon, Oct 10, 2011 at 7:01 PM, Cliff cjk...@gmail.com wrote: Mostly fixed now. There was also a bug in my controller code that was complicating things. One problem remains. With

[web2py] Re: Help for creating template

2011-10-10 Thread Massimo Di Pierro
In fact this {{if {{=request.function}} == index:}} is wrong because web2py would look for the first {{ and the first }} and try interpret the code in between as python. By if {{=request.function is not valid python. You want: {{if request.function == 'index':}} On Oct 10, 4:28 pm, Anthony

Re: [web2py] Re: checkbox input default value

2011-10-10 Thread Matt Broadstone
I'm using the Field in a rather unconventional way - I just have a number of Field objects in a class that I refer to as my model (its not actually connected to any database), and I use the SQLFORM.factory to generate the form. The actual Field entry in the form looks like this: AutoStart =

[web2py] Re: Windows + Apache + mod_proxy

2011-10-10 Thread Omi Chiba
Paolo, You made my day !! web2py is up and pyodbc works fine under wsgi !!! Grazie molto! On Oct 10, 4:20 pm, Paolo Caruccio paolo.carucci...@gmail.com wrote: Hi Omi, I wasn't sure this part, so I just add 127.0.0.1 ochiba-183 to my hosts. Try to replace with 10.30.6.122 ochiba-183 Let me

[web2py] Re: Windows + Apache + mod_proxy

2011-10-10 Thread Paolo Caruccio
I am very glad I helped Ciao. Paolo

[web2py] Re: new feature - need help

2011-10-10 Thread Paolo Caruccio
The result is splendid with your changes. I want only suggest to replace the row # 1344 in /gluon/sqlhtml.py with this jQuery('#w2p_query_fields').val('').change(); so the change event is fired and when you query again the .w2p_query_row is hidden. Ciao. Paolo

[web2py] Re: SQLFORM and IS_IN_SET problem

2011-10-10 Thread Anthony
On Monday, October 10, 2011 6:01:49 PM UTC-4, Cliff wrote: Mostly fixed now. There was also a bug in my controller code that was complicating things. One problem remains. With readonly=True, the field still shows the dictionary key rather than the value. With readonly, I guess it's

[web2py] Re: Help! import winrandom gives dll load failed error under Apache on Vista, but works under Rocket.

2011-10-10 Thread dlypka
Resolved: After researching, I see this problem plagues many other developers as well. The root cause is that the Distribution Windows Build of Apache 2.2 is built with msvcr71.dll which is the C++ runtime dll for Visual Studio 2003!!! But, most recent builds of python .pyd files which link to

[web2py] Tag handling suggestions

2011-10-10 Thread pbreit
Anyone have a quick perspective on the pros/cons of handling tags like this: Option 1: db.define_table('item',Field('tags','list:string')) Option 2: db.define_table('tag') db.define_table('item',Field('tags','list:reference tag')) Options 3: db.define_table('item') db.define_table('tag')

Re: [web2py] Tag handling suggestions

2011-10-10 Thread Bruno Rocha
On Mon, Oct 10, 2011 at 9:36 PM, pbreit pbreitenb...@gmail.com wrote: Option 1: db.define_table('item',Field('tags','list:string')) I am using the Option 1. for me it is better because I end with pure Python list, which I can run map, reduce, filter etc... also contains and belongs are

Re: [web2py] Tag handling suggestions

2011-10-10 Thread Bruno Rocha
Clarifying: Option 1: db.define_table('item',Field('tags','list:string')) *Pro*: Easy search: tag = request.args(0) results = db(db.item.tags.contains(tag)).select() *Con*: build a tag cloud records = db(db.item.id0).select(db.item.tags) alltags = [] # loop thought records to populate the

[web2py] Re: new feature - need help

2011-10-10 Thread Massimo Di Pierro
Done. Thank you! On Oct 10, 6:11 pm, Paolo Caruccio paolo.carucci...@gmail.com wrote: The result is splendid with your changes. I want only suggest to replace the row # 1344 in /gluon/sqlhtml.py with this jQuery('#w2p_query_fields').val('').change(); so the change event is fired and when

[web2py] Re: Tag handling suggestions

2011-10-10 Thread Massimo Di Pierro
I think Option 1 if faster on GAE Datastore. Option 3 is the best on SQL because you can do db.define_table('data', Field('value')) db.define_table('tag', Field('record_id', db.data), Field('name')) def search_or(data=db.data, tag=db.tag, tags=[]): rows = db(data.id==tag.record_id)\

Re: [web2py] Re: Tag handling suggestions

2011-10-10 Thread Bruno Rocha
I like this, and it is really smarter than list:string option, but, imagine a blog where users include tags in an INPUT text field, this will be more difficult to store tags in other table (you can do using ajax or building a checkbox list of tags) but it is easy just to let the user put tags in a

[web2py] Re: date picker on v1.99

2011-10-10 Thread kenji4569
Massimo, I sent a patch with two more minor updates. On 10月11日, 午前3:17, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Can you please email me the patch? On Oct 10, 11:35 am, kenji4569 hos...@s-cubism.jp wrote: The behavior of the date picker seems to have changed from a certain

[web2py] windows + apache + mod_wsgi error

2011-10-10 Thread mart
Hi, has any one gotten this error when using this combination: windows + apache + mod_wsgi ? Syntax error on line 518 of C:/Program Files (x86)/Apache Software Foundation/Ap ache2.2/conf/httpd.conf: LogFormat takes 1-2 arguments, a log format string (see docs) and an optional fo rmat name Note

[web2py] Re: windows + apache + mod_wsgi error

2011-10-10 Thread mart
Sorry, the error points to line 518, which is this: LogFormat %h %l %u %t %r %s %b common Thanks, Mart :) On Oct 10, 11:24 pm, mart msenecal...@gmail.com wrote: Hi, has any one gotten this error when using this combination: windows + apache + mod_wsgi ? Syntax error on line 518 of

[web2py] Re: Import/execute sql file

2011-10-10 Thread Brian M
Try opening your file, reading its contents and then having db.executesql() execute what was read. Should work assuming the file's contents can be run by psycopg2 (i.e some special psql stuff might not work) #untested code f = open('/path/to/file.sql', 'r') db.executesql(f.read())

[web2py] Re: windows + apache + mod_wsgi error

2011-10-10 Thread mart
found the problem :) line should be: LogFormat %h %l %u %t \%r\ %s %b common instead of LogFormat %h %l %u %t %r %s %b common Service started properly now. Thanks, Mart :) On Oct 10, 11:29 pm, mart msenecal...@gmail.com wrote: Sorry, the error points to line 518, which is this:

[web2py] windows + apache + mod_wsgi -- question 2

2011-10-10 Thread mart
Hi, So this combination seems to be working well, except I can't log in to the admin interface. Getting this msg/exception: admin disabled because unable to access password file Is there a quick fix? Thanks, Mart :)

[web2py] Re: windows + apache + mod_wsgi -- question 2

2011-10-10 Thread MidGe
heya mart, I think that is an easy one, you need rename a file parameters_nnn,py to parameters_.py where is the port your app listens to. Enjoy

[web2py] Re: windows + apache + mod_wsgi -- question 2

2011-10-10 Thread mart
Hey MidGe, well, now its an easy one, but that's only because you gave me the answer! :) Thanks for that!, now its working great! Much appreciated, Mart :) On Oct 10, 11:58 pm, MidGe degreef.mic...@gmail.com wrote: heya mart, I think that is an easy one, you need rename a file

[web2py] Re: windows + apache + mod_wsgi -- question 2

2011-10-10 Thread MidGe
By the way, the original file gets created the very first time you run the rocket server. So you need run the server once for a minute or so to let the file be created.. and then rename the file if needed to the port you are listening to.

Re: [web2py] Re: Import/execute sql file

2011-10-10 Thread Bruno Rocha
On Tue, Oct 11, 2011 at 12:32 AM, Brian M bmere...@gmail.com wrote: Try opening your file, reading its contents and then having db.executesql() execute what was read. Should work assuming the file's contents can be run by psycopg2 (i.e some special psql stuff might not work) #untested code

[web2py] Re: windows + apache + mod_wsgi -- question 2

2011-10-10 Thread mart
thanks for the tip! :) mart On Oct 11, 12:04 am, MidGe degreef.mic...@gmail.com wrote: By the way, the original file gets created the very first time you run the rocket server. So you need run the server once for a minute or so to let the file be created..  and then rename the file if