[web2py:14296] Re: how to do dal not like?

2008-12-29 Thread Yarko Tymciurak
On Tue, Dec 30, 2008 at 1:34 AM, vince wrote: > > anyway to do sql not like? > db(!(db.members.name.like('%a%'))).select() or something like that? try: db( ~(db.members.name.like( '%a' )) ).select() > anyone like the syntax to do not? > > -vince > > > > --~--~-~--~~--

[web2py:14295] Re: Proposal: MVC separation - son of custom views

2008-12-29 Thread billf
Yarko Many thanks for your thoughtful comments - definitely the best so far. I will read through a few more times, update the "spec" and notify folk via a post here. I think my hosting company have recently sorted out some dns problems so hopefully folks wont have a problem accessing the "spec"

[web2py:14294] how to do dal not like?

2008-12-29 Thread vince
anyway to do sql not like? db(!(db.members.name.like('%a%'))).select() or something like that? anyone like the syntax to do not? -vince --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. T

[web2py:14293] Re: Many-to-Many widgets

2008-12-29 Thread vince
http://groups.google.com/group/web2py/browse_thread/thread/29655ebffb97d7ac/c8dcc5e5ed3c7ea5 this is a simple one. maybe you can base on this widget and workout something. -vince On Dec 30, 4:39 am, Fran wrote: > I agree with this thread that a good method for handling the 80% case > where the

[web2py:14292] Web2py in Seattle?

2008-12-29 Thread nathan.ms
Hi all, Any web2py users want to meet up in Seattle for coffee and web2py fun? It would be cool to work on a project for a few hours with other people. Nathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py

[web2py:14291] Re: Proposal: MVC separation - son of custom views

2008-12-29 Thread Yarko Tymciurak
Hi Bill - I see you put a lot of work / thought into this... It seems like it's in the right direction. I just read this now (wasn't able to before, then didn't hear anything about it). Here's some initial thoughts: - I think separating storage from updating persistent data is a good thing;

[web2py:14290] code of conduct - open source organization

2008-12-29 Thread Kirby Turner
I read through the current draft of the organization charter and it seems like a great start. But parts of the Code of Conduct seem too restrictive especially for my situation. I am self-employed - been in business for just over 5 years. I recently discovered web2py and think its a grea

[web2py:14289] Re: Proposal: MVC separation - son of custom views

2008-12-29 Thread James Ashley
For the backwards-compatibility conversation: This doesn't break backwards compatibility at all, AFAICT. It just introduces an alternative way of doing things. Of course, that can be a bad idea. It's no longer as obvious which is the "right" way. It's extra surface area to maintain. I'll secon

[web2py:14288] sqlform formname question

2008-12-29 Thread vince
form1=SQLFORM(db.members,thisrecord) form2=SQLFORM(db.products,thisrecord) refer to the manual SQLFORM should set formname for each form. but i notice the second form generated by SQLFORM will have no formname. i try to set the formname myself but fail form2=SQLFORM(db.products,thisrecord,formn

[web2py:14287] Re: bug on devel trunk revision 320

2008-12-29 Thread Yarko Tymciurak
think carefully - do you want the DATABASE to hold TWO copies of the name value in two tables? _Really_?? On Mon, Dec 29, 2008 at 4:20 PM, vince wrote: > > thanks. it's my mistake that IS_IN_DB should not work this way. > > since i need the field holding the name instead of the id, i'll sort >

[web2py:14286] Re: bug on devel trunk revision 320

2008-12-29 Thread vince
thanks. it's my mistake that IS_IN_DB should not work this way. since i need the field holding the name instead of the id, i'll sort out other solution for it. -vince On Dec 30, 6:14 am, "Yarko Tymciurak" wrote: > If what you want is a form which will list the names to choose from, then I > th

[web2py:14285] Re: bug on devel trunk revision 320

2008-12-29 Thread Yarko Tymciurak
If what you want is a form which will list the names to choose from, then I think what you want is something like this: db.define_table('name_list', db.Field('name') ) db.define_table('members', db.Field('name',db.name_list), ) db.members.name.requires=IS_IN_DB(db,'name_list.id

[web2py:14284] Re: bug on devel trunk revision 320

2008-12-29 Thread vince
> > this says the foreign key (a 'name_list.id')  must be in the table name_list > in a string field, 'name'. > > This is why you get an error - you are checking a foreign key (an integer) > against a string. > > oh so the case is IS_IN_DB allow referring via the key(id) ? -vince --~--~--

[web2py:14283] an equivalent for Django edit-inline tabular/stacked form

2008-12-29 Thread xpareto
1. Mr. Prof. Di Pierro ,thank you for this great work . I wish web2py become for the web frameworks what Python is for the programming languages - an optimum mix of power, simplicity and elegance. 2. Maybe I am wrong, but I don't find an equivalent for Django edit- inline tabular/stacked form . I

[web2py:14282] Re: bug on devel trunk revision 320

2008-12-29 Thread Yarko Tymciurak
I think this is because: On Mon, Dec 29, 2008 at 3:47 PM, vince wrote: > > this problem exist on 1.54 as well. > > if using IS_IN_DB to string field instead of the id field. it will > have the error after form submit. > > db.define_table('name_list', >db.Field('name') >) > db.define_tabl

[web2py:14281] Re: bug on devel trunk revision 320

2008-12-29 Thread vince
this problem exist on 1.54 as well. if using IS_IN_DB to string field instead of the id field. it will have the error after form submit. db.define_table('name_list', db.Field('name') ) db.define_table('members', db.Field('name',db.name_list), ) db.members.name.requires=IS_IN_DB(db,

[web2py:14280] Re: Postgres error

2008-12-29 Thread Yarko Tymciurak
A couple of things: "name" is not a "reserved keyword" (see URL Fran referenced) - which means "name" is OK as a table or column name. And since "name" doesn't appear reserved in any of the SQL standards listed, I think this should be ok in other backends also... 'user' however _IS_ a reserved

[web2py:14279] Re: Postgres error

2008-12-29 Thread Fran
On Dec 29, 9:03 pm, Alex wrote: > So only solution to rename tables and fields everywhere ? AFAIK, yes...sorry... F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this grou

[web2py:14278] Re: sqlrow to json again

2008-12-29 Thread Timothy Farrell
OK, I've got my faster method ready.  But I have a question before we lock down the API. In your method, you have the mode parameter as either a dict or list type.  While expressing a similar thought, this is inaccurate since we're talking about a _javascript_ result not a Python result.  Ins

[web2py:14277] Re: Postgres error

2008-12-29 Thread Alex
So only solution to rename tables and fields everywhere ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from

[web2py:14276] Re: Postgres error

2008-12-29 Thread Fran
On Dec 29, 8:27 pm, Alex wrote: > I got error message with postgress: > ProgrammingError: syntax error at or near "user" > LINE 1: CREATE TABLE user( Postgres can't have a table called 'user': http://www.postgresql.org/docs/8.3/interactive/sql-keywords-appendix.html The same limitation wrt fiel

[web2py:14275] Many-to-Many widgets

2008-12-29 Thread Fran
I agree with this thread that a good method for handling the 80% case where the Many-to-Many just has the mapping fields would be really useful: http://groups.google.com/group/web2py/browse_thread/thread/70273ee7ba826a59/6393c3d67380a8ff Massimo, I know that you're not much into including this in

[web2py:14274] Postgres error

2008-12-29 Thread Alex
Hello! I got error message with postgress: Traceback (most recent call last): File "/home/alex/web2py/gluon/restricted.py", line 62, in restricted exec ccode in environment File "/home/alex/web2py/applications/monitoring/models/db.py", line 25, in SQLField('failed_attempts','integer

[web2py:14273] bug on devel trunk revision 320

2008-12-29 Thread vince
Traceback (most recent call last): File "gluon/restricted.py", line 62, in restricted exec ccode in environment File "/home/web2py/applications/cychurch/controllers/appadmin.py", line 209, in File "gluon/globals.py", line 55, in self._caller=lambda f: f() File "/home/web2py/appli

[web2py:14272] Re: google messed up?

2008-12-29 Thread Yarko Tymciurak
some AS228822 info: http://www.robtex.com/dns/llnw.net.html On Mon, Dec 29, 2008 at 1:37 PM, mr.freeze wrote: > > > http://www.google.com/safebrowsing/diagnostic?site=http://mdp.cti.depaul.edu/ > > This says that the site is hosted on 2 networks. If you click the > second one (AS22822 (LLNW)) i

[web2py:14271] Re: google messed up?

2008-12-29 Thread mr.freeze
http://www.google.com/safebrowsing/diagnostic?site=http://mdp.cti.depaul.edu/ This says that the site is hosted on 2 networks. If you click the second one (AS22822 (LLNW)) it says it functions as an intermediary for malware. Hmmm... On Dec 29, 1:30 pm, "Yarko Tymciurak" wrote: > same here..

[web2py:14270] Re: google messed up?

2008-12-29 Thread Yarko Tymciurak
same here... Only web2py / mdi.cdp.depaul.edu link is on the third page, http://mdp.cti.depaul.edu/examples/static/web2py_comics.pdf Yahoo, MSN are ok... as mr.freeze pointed out... On Mon, Dec 29, 2008 at 1:06 PM, mr.freeze wrote: > > Doesn't work for me either. Yahoo and MSN seem to be ok

[web2py:14269] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread mdipierro
I am till confused about (1). The url "...buy_one/3#zoom-t2_person-foto-41" is not generated by T2. Do you have db.table.field.represent=... somewhere? (2) The trunk will be promoted to production in about one week. Massimo On Dec 29, 10:47 am, Peter wrote: > Hi Massimo, thanks for helping

[web2py:14268] Re: sqlrow to json again

2008-12-29 Thread mdipierro
Got it. Thank you Tim. Please look again at the latest trunk. My implementation is much slower than yours but it is independent of the database backend and I think this is a must. If you can you optimize it further, that is very much welcome. Massimo On Dec 29, 11:02 am, mdipierro wrote: > Sor

[web2py:14267] Re: google messed up?

2008-12-29 Thread mr.freeze
Doesn't work for me either. Yahoo and MSN seem to be okay (at the moment). Very strange... On Dec 29, 12:52 pm, Massimo Di Pierro wrote: > http://www.google.com/search?hl=en&q=web2py&btnG=Search > > no longer returns the web2py web page for me. > Yesterday it was the first entry. > It does not

[web2py:14266] Re: reportlab in web2py?

2008-12-29 Thread BBi
I think we should not include reportlab in the basic web2py framework. I suggest that we keep a "basic web2py framework", as small as possible, with more or less the current framework scope. It has a very clear focus (web entreprise applications) and it's doing it very well. And it is easy to und

[web2py:14265] google messed up?

2008-12-29 Thread Massimo Di Pierro
http://www.google.com/search?hl=en&q=web2py&btnG=Search no longer returns the web2py web page for me. Yesterday it was the first entry. It does not even work if I search for my name. The total google count number of web2py pages for web2py has suspiciously gone down in the last week. Does it w

[web2py:14264] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread mdipierro
yes, please send me the code than output (form only) Massimo On Dec 29, 11:38 am, Peter wrote: > > form.element(_type='submit').update(_value='click me!') > > Massimo, I just tried the above with t2.update using trunk (1.55rc1): > > form = t2.update(db.t2_person,query= > (db.t2_person.id==t

[web2py:14263] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread Peter
> form.element(_type='submit').update(_value='click me!') Massimo, I just tried the above with t2.update using trunk (1.55rc1): form = t2.update(db.t2_person,query= (db.t2_person.id==t2.person_id),next=nextpage,deletable=False) form.element(_type="submit").update(_value="Save") The subs

[web2py:14262] Re: web2py with T2 does not work on GAE

2008-12-29 Thread Alexandre Miguel de Andrade Souza
Maybe a python function to join 2 dict (selects results) using some criteria coul be developed. On Mon, Dec 29, 2008 at 12:38 PM, mdipierro wrote: > > t2 work. the puppy app does not. you have to break the select into > multiple selects. > > Massimo > > On Dec 29, 12:28 am, "Miguel Goncalves"

[web2py:14261] Re: open source organization again

2008-12-29 Thread mdipierro
perhaps questions to the group is easier. On Dec 29, 9:29 am, Kirby Turner wrote: > Found the URL in the other message with the subject "web2py google > docs". > > -KIRBY > > On Dec 29, 2008, at 10:27 AM, Kirby Turner wrote: > > > Also, it seems I can't get to the document today. Did the URL ch

[web2py:14260] Re: sqlrow to json again

2008-12-29 Thread mdipierro
Sorry. I must have got confused. I do not think I have seen your implementation than. Please email it to me. Massimo On Dec 29, 9:22 am, Timothy Farrell wrote: > Yes, but before I do that, I want to clarify something. > My first implementation results in a JSON list of objects like so (roughly)

[web2py:14259] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread Peter
Hi Massimo, thanks for helping out again... Re (1), interaction between T2 and args passed in the query string, here's the basic code: in default.py: def buy_one(): prod=db(db.product.id==request.args[0]).select()[0] form = t2.display(db.t2_person,query= (db.t2_person.id==t2.person_id))

[web2py:14258] Re: Helper for Custom Forms

2008-12-29 Thread Jon
Thanks all. This seems very useful indeed and less cumbersome than making all forms with the FORM process + view set-up. On Dec 29, 3:39 am, rfx_labs wrote: > Hi Jon, > > > form.element(_name="reference").update(_type="hidden") > > I'am sorry. I've copied the example from a real application. Bu

[web2py:14257] Re: open source organization again

2008-12-29 Thread Kirby Turner
Found the URL in the other message with the subject "web2py google docs". -KIRBY On Dec 29, 2008, at 10:27 AM, Kirby Turner wrote: > Also, it seems I can't get to the document today. Did the URL change? --~--~-~--~~~---~--~~ You received this message becaus

[web2py:14256] Re: open source organization again

2008-12-29 Thread Kirby Turner
I have some questions regarding the code of conduct. Is it okay post the questions here in the user group or as comments in the document? Also, it seems I can't get to the document today. Did the URL change? -KIRBY On Dec 27, 2008, at 2:18 PM, mdipierro wrote: > > Some of you may remember

[web2py:14255] Re: sqlrow to json again

2008-12-29 Thread Timothy Farrell
Yes, but before I do that, I want to clarify something. My first implementation results in a JSON list of objects like so (roughly): [ {field1:'field1val',field2:'field2val'}, {field1:'field1val',field2:'field2val'} ] Your reimplementation results in a JSON list of lists where the first lis

[web2py:14254] Re: sorting my date

2008-12-29 Thread Joel
ah yes. thanks. On Dec 29, 12:39 am, mdipierro wrote: > this is not Django. > > events = db(db.territory_event.territory==territory.id).select > (db.territory_event.ALL,orderby=~db.territory_event.date) > > or > > orderby=~db.territory_event.date|db.territory_event.territory > > or > > orderby=~

[web2py:14253] Re: sqlrow to json again

2008-12-29 Thread mdipierro
where? Can you send me a patch? Massimo On Dec 29, 9:01 am, Timothy Farrell wrote: > You might want to switch back to list comprehensions. Granted the code is > uglier but there are two big reasons. > 1) Speed. Seehttp://www.daniweb.com/forums/thread32869.htmlfor more info. > You could wr

[web2py:14252] Re: open source organization again

2008-12-29 Thread mdipierro
Not quite correct. There are companies that provide web2py support. Let's start another thread on this topic. Massimo On Dec 29, 6:05 am, vince wrote: > i think that's really necessary for web2py. without anyone providing > business support, cooperate won't trust web2py! > > vince > > On Dec 28

[web2py:14251] Re: sqlrow to json again

2008-12-29 Thread Timothy Farrell
You might want to switch back to list comprehensions.  Granted the code is uglier but there are two big reasons. 1) Speed. See http://www.daniweb.com/forums/thread32869.html for more info.     You could wrap the inner loop inner workings in a function and still reap massive benefits     by no

[web2py:14250] Re: web2py with T2 does not work on GAE

2008-12-29 Thread mdipierro
t2 work. the puppy app does not. you have to break the select into multiple selects. Massimo On Dec 29, 12:28 am, "Miguel Goncalves" wrote: > So I suppose the JOIN in the puppy tutorial is the "friendship" declaration. > > What is the recommended pattern to "simulate" a JOIN in order to run on

[web2py:14249] Re: sqlrow to json again

2008-12-29 Thread mdipierro
OK. it is in trunk but slightly different. The representation is now independent on the database backend. Massimo On Dec 29, 8:04 am, Timothy Farrell wrote: > Massimo, would it help if I made a bzr branch? > Timothy Farrell wrote:I've been using this in my setup (my setup has a few > customiza

[web2py:14248] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread mdipierro
1) I am sorry. I do not understand without a code example. 2) not possible. I agree there should be a way to do it. Using the latest trunk you can do form.element(_type='submit').update(_value='click me!') Massimo On Dec 29, 5:21 am, Peter wrote: > Thank you -- based on all of your input I'm

[web2py:14247] Re: T3 / table header with itemize?

2008-12-29 Thread mdipierro
try something like items=t2.itemize() if isinstance(items,TABLE): items.insert(0,TR('col1','col2','col3')) On Dec 29, 6:51 am, Atanasius wrote: > Hi folks! > > I use the mechanism (posted from Julius Minka on December, 7th) to > display a table via itemize: > > db.firmen.represent=lamb

[web2py:14246] Re: sqlrow to json again

2008-12-29 Thread Timothy Farrell
Massimo, would it help if I made a bzr branch? Timothy Farrell wrote: I've been using this in my setup (my setup has a few customizations) since the thread linked below.  Just to say that it works! -tim vince wrote: http://groups.google.com/group/web2py/browse_thread/thread/8

[web2py:14245] Re: sqlrow to json again

2008-12-29 Thread Timothy Farrell
I've been using this in my setup (my setup has a few customizations) since the thread linked below.  Just to say that it works! -tim vince wrote: http://groups.google.com/group/web2py/browse_thread/thread/8e3e33879974663f/64f76c562366aec4?lnk=gst&q=json#64f76c562366aec4 will it be added

[web2py:14244] Re: reportlab in web2py?

2008-12-29 Thread mdipierro
easy_install reportlab On Dec 29, 5:57 am, vince wrote: > i think pdf generation is necessary but the size may affect those user > who do not need it. > > any convenient way to include reportlab to web2py right now? (at least > compatible on win32/osx and linux) > > -vince > On Dec 27, 12:20 am,

[web2py:14243] Re: AlterEgo substring search

2008-12-29 Thread mdipierro
it is not a bug, it is a limitation. On Dec 29, 12:50 am, "mr.freeze" wrote: > A search for 'widget' on AlterEgo yields no results but a search for > 'widgets' found the article I was looking for. Seemed strange. Is > this expected behavior? --~--~-~--~~~---~--~---

[web2py:14242] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread mdipierro
CORRECTION: define a widget, something like: def myhelper(field,value): field_id='%s_%s' % (field._tablename,field.name) inp=INPUT(_type='file',_id=field_id,_class=field.type, _name=field.name, requires=field.requires) if not value: return inp url='app

[web2py:14241] T3 / table header with itemize?

2008-12-29 Thread Atanasius
Hi folks! I use the mechanism (posted from Julius Minka on December, 7th) to display a table via itemize: db.firmen.represent=lambda row:\ DIV(SPAN(TD(A(row.firma,_href=t2.action('wiki/firmabearbeiten', [row.id]))),_class="col1",_width="100px"), SPAN(TD (row.ort),_class="col1",_width="100px"

[web2py:14240] Re: open source organization again

2008-12-29 Thread vince
i think that's really necessary for web2py. without anyone providing business support, cooperate won't trust web2py! vince On Dec 28, 3:18 am, mdipierro wrote: > Some of you may remember previous threads on creating an organization > to support web2py adoption and provide business support to th

[web2py:14239] Re: reportlab in web2py?

2008-12-29 Thread vince
i think pdf generation is necessary but the size may affect those user who do not need it. any convenient way to include reportlab to web2py right now? (at least compatible on win32/osx and linux) -vince On Dec 27, 12:20 am, mdipierro wrote: > There is a problem with makingreportlaban applianc

[web2py:14238] sqlrow to json again

2008-12-29 Thread vince
http://groups.google.com/group/web2py/browse_thread/thread/8e3e33879974663f/64f76c562366aec4?lnk=gst&q=json#64f76c562366aec4 will it be added or we'll have to wait? i think it's hard to avoid all dependency contrib / thirdparty package. as long as it's include i think that's fine. -vince --~--~

[web2py:14237] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread Peter
Thank you -- based on all of your input I'm having another stab at using T2. Two more questions: - How do you pass variables to T2-enabled pages without breaking T2 behaviors? For instance, I have a page where person X buys product P; prod_id is passed as a var or an arg in the query string. The

[web2py:14236] Re: Helper for Custom Forms

2008-12-29 Thread rfx_labs
Hi Jon, > form.element(_name="reference").update(_type="hidden") I'am sorry. I've copied the example from a real application. But simplfy the model, and forget to adjust the name of deleted field reference in the view. >'returns: is the rendert output of the view ,-) Martin --~--~-~--