[web2py:24286] Re: from slashdot: Oracle Beware - Google Tests Cloud-Based Database

2009-06-15 Thread mdipierro
keep us posted. we should support it. On Jun 16, 12:18 am, JD Erickson wrote: > NimbusDB is a cloud-based database being developed by Mr. Jim Starkey, the > veritable database genius who developed Interbase back in the day (now > Firebird), innovated MVCC, and who developed the Falcon storage en

[web2py:24285] Re: nested forms

2009-06-15 Thread mdipierro
Can you explain more? On Jun 15, 9:51 pm, DenesL wrote: > Thinking about about a specific use case I came across the need for > nested forms. > In the first form one field controls which kind of form is presented > next. > > form1=SQLFORM(...) > if form1.accepts(...): >   form2=SQLFORM(db.[form1

[web2py:24284] Re: from slashdot: Oracle Beware - Google Tests Cloud-Based Database

2009-06-15 Thread JD Erickson
NimbusDB is a cloud-based database being developed by Mr. Jim Starkey, the veritable database genius who developed Interbase back in the day (now Firebird), innovated MVCC, and who developed the Falcon storage engine for MySQL, among other things. Last summer he left MySQL to work solely on Nimbus,

[web2py:24283] Re: How to output a ''?

2009-06-15 Thread mdipierro
hmmm. yes this is a bug with sanitize. On Jun 15, 8:50 pm, Eddie Eyles wrote: > Thanks one and all for your suggestions - very useful. > I'm not especially happy with the way sanitizer.sanitize behaves: > * if you pass it tags, it gives you tags [i.e. with no > space before the /], which, al

[web2py:24282] nested forms

2009-06-15 Thread DenesL
Thinking about about a specific use case I came across the need for nested forms. In the first form one field controls which kind of form is presented next. form1=SQLFORM(...) if form1.accepts(...): form2=SQLFORM(db.[form1.vars.formtype]): if form2.accepts(...): other form1 & form2 ifs/elifs

[web2py:24281] Re: what could we use this for?

2009-06-15 Thread mr.freeze
You could delegate processor intensive tasks to the client to reduce your server needs. Think online image/video/audio editors. Also, it is supposed to include a simplified threading model for the browser. I think their end-game is software as a service so you will pay them $10 a month for the r

[web2py:24280] Re: IS_PASSWORD validator?

2009-06-15 Thread mr.freeze
I sent you a patch. On Jun 15, 8:32 pm, mdipierro wrote: > OK. the second is a good point (the first one is not because you can > pass a custom hash algorithm to CRYPT). > I will keep it separate. > > Massimo > > On Jun 15, 8:28 pm, "mr.freeze" wrote: > > > > > Two situations come to mind: > >

[web2py:24279] Re: what could we use this for?

2009-06-15 Thread JohnMc
My confusion I guess is with intent. I thought one of the great motivators for moving applications to the web was to free ourselves from system level dependencies on the client side. NaCl seems to take us right back there, only in a sandbox. On Jun 14, 7:59 pm, mdipierro wrote: > http://plash.be

[web2py:24278] Re: How to output a ''?

2009-06-15 Thread Eddie Eyles
Thanks one and all for your suggestions - very useful. I'm not especially happy with the way sanitizer.sanitize behaves: * if you pass it tags, it gives you tags [i.e. with no space before the /], which, although not illegal, are discouraged as against [with a space], for compatibility with old

[web2py:24277] Re: IS_PASSWORD validator?

2009-06-15 Thread mdipierro
OK. the second is a good point (the first one is not because you can pass a custom hash algorithm to CRYPT). I will keep it separate. Massimo On Jun 15, 8:28 pm, "mr.freeze" wrote: > Two situations come to mind: > If you wanted to use a custom encryption method > If the field wasn't a password

[web2py:24276] Re: IS_PASSWORD validator?

2009-06-15 Thread mr.freeze
Two situations come to mind: If you wanted to use a custom encryption method If the field wasn't a password and didn't require encryption (our organization has complexity requirements on usernames too) On Jun 15, 8:15 pm, mdipierro wrote: > why? when would you one without the other? > > Massimo

[web2py:24275] Re: IS_PASSWORD validator?

2009-06-15 Thread mdipierro
why? when would you one without the other? Massimo On Jun 15, 7:43 pm, "mr.freeze" wrote: > It just seems like validation and encryption should remain separate > but I will defer to your judgment. > > On Jun 15, 7:36 pm, mdipierro wrote: > > > OK, I will include this in web2py but probably mer

[web2py:24274] Re: from slashdot: Oracle Beware - Google Tests Cloud-Based Database

2009-06-15 Thread Luciano Ramalho
On Jun 15, 12:59 pm, Wes James wrote: > /me wonders if web2py will be able to use this some how... (some day)? > > http://developers.slashdot.org/article.pl?sid=09/06/12/1658206 If you look at the original Google announcement [1], you will realize that IT World did not quite get it. Google *did

[web2py:24273] Re: IS_PASSWORD validator?

2009-06-15 Thread mr.freeze
It just seems like validation and encryption should remain separate but I will defer to your judgment. On Jun 15, 7:36 pm, mdipierro wrote: > OK, I will include this in web2py but probably merge it with CRYPT. > Any reason not to? > > Massimo > > On Jun 15, 7:31 pm, "mr.freeze" wrote: > > > I k

[web2py:24272] Re: IS_PASSWORD validator?

2009-06-15 Thread mdipierro
OK, I will include this in web2py but probably merge it with CRYPT. Any reason not to? Massimo On Jun 15, 7:31 pm, "mr.freeze" wrote: > I know you said not to make one but it felt wrong mixing with CRYPT. > I settled on IS_COMPLEX.  With it you can do: > db.mytable.myfield.requires = [IS_COMPLE

[web2py:24271] Re: IS_PASSWORD validator?

2009-06-15 Thread mr.freeze
I know you said not to make one but it felt wrong mixing with CRYPT. I settled on IS_COMPLEX. With it you can do: db.mytable.myfield.requires = [IS_COMPLEX(min=10, max=20, upper=2, lower=2, number=1, special=2, specials="!...@#$%^"), CRYPT()] It will automatically generate the error message(s) b

[web2py:24270] Re: userstate

2009-06-15 Thread Richard
import time? On Jun 16, 7:11 am, pk wrote: > Traceback (most recent call last): >   File "gluon/restricted.py", line 107, in restricted >   File "/Applications/web2py1.64/web2py.app/Contents/Resources/ > applications/2busy/views/menu/index.html", line 46, in > NameError: name 'time' is not def

[web2py:24269] Re: query using IN list on GAE?

2009-06-15 Thread mdipierro
On Jun 15, 6:42 pm, Dan wrote: > On Jun 15, 4:02 pm, mdipierro wrote: > > > You cannot do 'id IN' because GAE treats ID in a spacial way. Please > > try a different field. > > > Massimo > > shoot. I didn't see any mention of that in the GAE docs... can you > point me to it? > > I can run a separ

[web2py:24268] Re: query using IN list on GAE?

2009-06-15 Thread Dan
On Jun 15, 4:02 pm, mdipierro wrote: > You cannot do 'id IN' because GAE treats ID in a spacial way. Please > try a different field. > > Massimo > shoot. I didn't see any mention of that in the GAE docs... can you point me to it? I can run a separate "=" query for each of the elements that I

[web2py:24267] Re: query using IN list on GAE?

2009-06-15 Thread mdipierro
You cannot do 'id IN' because GAE treats ID in a spacial way. Please try a different field. Massimo On Jun 15, 5:49 pm, Dan wrote: > whoops, sorry- I was working with the older version of web2py when I > concluded that it was working properly. > > using the trunk version, it did not work on GAE

[web2py:24266] Re: query using IN list on GAE?

2009-06-15 Thread Dan
whoops, sorry- I was working with the older version of web2py when I concluded that it was working properly. using the trunk version, it did not work on GAE -- but does work on SQLite. This is the error message I got (edited a bit for simplicity). I'm using an array of integers as the argument to

[web2py:24265] Re: message

2009-06-15 Thread pk
ok, no stress massimo, i wondered only why i can`t send it from my adress. On 16 Jun., 00:35, mdipierro wrote: > yes. Will look at it later. I am at a conference. > > On Jun 15, 5:16 pm, pk wrote: > > > massimo, > > have you received my message? because there were some problems while > > sendin

[web2py:24264] Re: query using IN list on GAE?

2009-06-15 Thread mdipierro
:-) On Jun 15, 5:20 pm, Dan wrote: > that works great! note that I didn't try to send more than 30 items - > so I don't know what would happen if that limit were exceeded. > > thanks Massimo! > > Dan > > On Jun 15, 1:38 pm, mdipierro wrote: > > > I have not tested/debugged it yet but you can tr

[web2py:24263] Re: message

2009-06-15 Thread mdipierro
yes. Will look at it later. I am at a conference. On Jun 15, 5:16 pm, pk wrote: > massimo, > have you received my message? because there were some problems while > sending. > peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

[web2py:24262] Re: Nested list : good example for the documentation

2009-06-15 Thread mdipierro
Try these {{extend 'layout.html'}} This is the test/show_periods.html template {{for period in periods:}} {{=period}} {{ subperiods = db(db.subperiod.period=period.id).select()}} {{for subperiod in subperiods:}} {{=subperiod}} {{pass}} {{pass}} and the followi

[web2py:24261] Re: Nested list : good example for the documentation

2009-06-15 Thread Francois (Jersey)
I tried the following view: {{extend 'layout.html'}} This is the test/show_periods.html template {{for period in periods:}} {{period}} {{ subperiods = db(db.subperiod.period=period.id).select()}} {{for subperiod in subperiods:}} {{subperiod}} {{pass}} {{pass}}

[web2py:24260] Re: query using IN list on GAE?

2009-06-15 Thread Dan
that works great! note that I didn't try to send more than 30 items - so I don't know what would happen if that limit were exceeded. thanks Massimo! Dan On Jun 15, 1:38 pm, mdipierro wrote: > I have not tested/debugged it yet but you can try the latest trunk > > db(db.table.field.belongs(('a'

[web2py:24259] message

2009-06-15 Thread pk
massimo, have you received my message? because there were some problems while sending. peter --~--~-~--~~~---~--~~ 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@go

[web2py:24258] Re: Multi-line error_message on validator

2009-06-15 Thread mdipierro
You can use error_message=XML('line1line2') Massimo On Jun 15, 4:35 pm, "mr.freeze" wrote: > I hope this hasn't been asked/answered already but...How can I have > the error_message on a validator display on multiple lines? --~--~-~--~~~---~--~~ You received this

[web2py:24257] Re: Postgresql-confusion

2009-06-15 Thread mdipierro
I cannot really help since this is a path issue. the Python running under apache mod_wsgi does not seem to find psycopg2. This is not exactly a web2py issue. Perhaps some of our wsgi experts can give us some advice. Massimo On Jun 15, 4:14 pm, Johann Spies wrote: > 2009/6/14 mdipierro : > > >

[web2py:24256] Multi-line error_message on validator

2009-06-15 Thread mr.freeze
I hope this hasn't been asked/answered already but...How can I have the error_message on a validator display on multiple lines? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to

[web2py:24255] Re: Postgresql-confusion

2009-06-15 Thread Johann Spies
2009/6/14 mdipierro : > > There are two options here: > - installation was not successful It is working as expected when I use sqlite. > - you have two python versions (one has psycopg2 and you are using the > other to start web2py). Yes I have two versions. > > Ignore web2py and see if you can

[web2py:24254] Re: db.table.truncate() error if migrate=False

2009-06-15 Thread Fran
On Jun 15, 10:04 pm, mdipierro wrote: > uploading the fix My app is no longer broken :) (Haven't tested the point of the original fix) tx, F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" gr

[web2py:24253] Re: userstate

2009-06-15 Thread pk
Traceback (most recent call last): File "gluon/restricted.py", line 107, in restricted File "/Applications/web2py1.64/web2py.app/Contents/Resources/ applications/2busy/views/menu/index.html", line 46, in NameError: name 'time' is not defined On 15 Jun., 23:04, mdipierro wrote: > what error

[web2py:24252] Re: Nice plugin idea..

2009-06-15 Thread Oleg
I have not look into api.. :) it's funny... I've seen only http://rails-engines.org/news/2009/05/18/engines-at-railsconf/ http://en.oreilly.com/rails2009/public/schedule/detail/7785 as far as I understood it is already more or less incorporated in Rail 2.3.. On Jun 14, 2:20 am, mdipierro wrote

[web2py:24251] Re: menu

2009-06-15 Thread mdipierro
It can be used to use different classes for some menu items. Currently it is not used. On Jun 15, 2:47 pm, Alej wrote: > By the way, what is the meaning of the boolean (Active) parameter in > the Menu class. > Having it False or True, seems the Menu always behaves the same. > Alej > > On May 21,

[web2py:24250] Re: db.table.truncate() error if migrate=False

2009-06-15 Thread mdipierro
uploading the fix On Jun 15, 3:47 pm, Fran wrote: > On Jun 15, 9:25 pm, mdipierro wrote: > > > oops.sorry. check if fixed in trunk > > r926 breaks my app: > Traceback (most recent call last): >   File "C:\Bin\web2py\gluon\restricted.py", line 107, in restricted >     exec ccode in environment >

[web2py:24249] Re: userstate

2009-06-15 Thread mdipierro
what error? On Jun 15, 3:46 pm, pk wrote: > massimo, there is still something wrong, with the syntax. > > On 15 Jun., 22:31, mdipierro wrote: > > > {{for user in db((db.online.last_visit>time.time()-dt) > > (db.online.user_id==db.auth_user.id).select():}} > >   {{=user.auth_user.last_name}} > >

[web2py:24248] Re: menu

2009-06-15 Thread Alej
By the way, what is the meaning of the boolean (Active) parameter in the Menu class. Having it False or True, seems the Menu always behaves the same. Alej On May 21, 11:35 pm, mdipierro wrote: > no it does not. I use this in jpolite. > > On May 21, 6:03 pm, murray3 wrote: > > > > >  I am using:

[web2py:24247] Re: db.table.truncate() error if migrate=False

2009-06-15 Thread Fran
On Jun 15, 9:25 pm, mdipierro wrote: > oops.sorry. check if fixed in trunk r926 breaks my app: Traceback (most recent call last): File "C:\Bin\web2py\gluon\restricted.py", line 107, in restricted exec ccode in environment File "C:/Bin/web2py/applications/sahana/models/00_db.py", line 36,

[web2py:24246] Re: userstate

2009-06-15 Thread pk
massimo, there is still something wrong, with the syntax. On 15 Jun., 22:31, mdipierro wrote: > {{for user in db((db.online.last_visit>time.time()-dt) > (db.online.user_id==db.auth_user.id).select():}} >   {{=user.auth_user.last_name}} > {{pass}} > > On Jun 15, 2:17 pm, pk wrote: > > > i need i

[web2py:24245] Re: query using IN list on GAE?

2009-06-15 Thread mdipierro
I have not tested/debugged it yet but you can try the latest trunk db(db.table.field.belongs(('a','b','c'))).select() Let me know if it works or not, and if not, what's the error. We can make it work replatively soon. Massimo On Jun 15, 2:04 pm, Dan wrote: > is it possible to create a GQL for

[web2py:24244] Re: userstate

2009-06-15 Thread pk
thanks massimo, your the best ;) have you receive the logo? peter On 15 Jun., 22:31, mdipierro wrote: > {{for user in db((db.online.last_visit>time.time()-dt) > (db.online.user_id==db.auth_user.id).select():}} >   {{=user.auth_user.last_name}} > {{pass}} > > On Jun 15, 2:17 pm, pk wrote: > > >

[web2py:24243] Re: userstate

2009-06-15 Thread mdipierro
{{for user in db((db.online.last_visit>time.time()-dt) (db.online.user_id==db.auth_user.id).select():}} {{=user.auth_user.last_name}} {{pass}} On Jun 15, 2:17 pm, pk wrote: > i need it like so (logic): > > Folgende User sind online: > {{for onuser in db.auth_user:}} >      {{if(URL(r=request,c

[web2py:24242] Re: db.table.truncate() error if migrate=False

2009-06-15 Thread mdipierro
oops.sorry. check if fixed in trunk On Jun 15, 1:39 pm, Hans wrote: > db.table.truncate() on a table with migrate=False produces a error. Is > that only allowed on table with migrate on? > > Hans > > Using web2py 1.64.1 with MySQL > > Traceback (most recent call last): >   File "F:\Documents and

[web2py:24241] Re: Helper DD DL/Custom forms with Auth

2009-06-15 Thread JohnMc
"4. Is this how you would handle DT terms? How do you incorporate input, dropdowns, and checkboxes/radio buttons? " If you use SQLFORM you pass the table of interest and it performs the necessary formating. So much of the attributes you seek are defined in the model that you build. The balance ha

[web2py:24240] Re: Helper DD DL/Custom forms with Auth

2009-06-15 Thread JohnMc
Bill, Not to strain the point, but why complicate matters with DD/DT lists to accomplish this? 95% of your example can be delivered with a standard SQLFORM. Store the result in a var, serialize it with xml() then tweak it with python code if you need, the balance by some changes in CSS classes.

[web2py:24239] Re: userstate

2009-06-15 Thread pk
i need it like so (logic): Folgende User sind online: {{for onuser in db.auth_user:}} {{if(URL(r=request,c='userstate',f='is_user_online(onuser)')):}} {{=onuser.last_name}} {{pass}} {{pass}} On 15 Jun., 20:48, pk wrote: > oh i forget to ask, > > and how can i now display on

[web2py:24238] Re: Helper DD DL/Custom forms with Auth

2009-06-15 Thread Bill
Massimo, Need clarification. Not certain of the best approach. Some questions(1-5): 1. How do you overide exposed URLs for register (def register), login (def login) etc. ? 2. Do you use conditional statements inside of def user? The example below represents your previous answer inserted insi

[web2py:24237] Re: query using IN list on GAE?

2009-06-15 Thread Dan
is it possible to create a GQL format query and send it to the GAE datastore that web2py connects to? what would the code for that be? On Jun 15, 10:25 am, Dan wrote: > the IN operator is supported according > tohttp://code.google.com/appengine/docs/python/datastore/queriesandinde... > > The IN

[web2py:24236] Re: I want to send an email...

2009-06-15 Thread Jason Brower
Thanks, I will try working with these. Regards, Jason On Sun, 2009-06-14 at 06:19 -0700, Fran wrote: > def email_user(sender,message,subject="group notice"): > import smtplib > fromaddr=sender > toaddrs=[x.email for x in db().select(db.recipient.email)] > msg="From: %s\r\nTo: %s\

[web2py:24235] Re: userstate

2009-06-15 Thread pk
oh i forget to ask, and how can i now display on the html page, which user are online? thanks massimo for your time ;) On 15 Jun., 20:24, pk wrote: > thanks massimo ;) > > On 15 Jun., 20:07, mdipierro wrote: > > > Put this in your layout.html > > > > > jQuery(document).ready(function(){ > >

[web2py:24234] db.table.truncate() error if migrate=False

2009-06-15 Thread Hans
db.table.truncate() on a table with migrate=False produces a error. Is that only allowed on table with migrate on? Hans Using web2py 1.64.1 with MySQL Traceback (most recent call last): File "F:\Documents and Settings\Hans\Desktop\web2py\", line 1, in File "F:\Documents and Settings\Hans\D

[web2py:24233] Re: userstate

2009-06-15 Thread pk
thanks massimo ;) On 15 Jun., 20:07, mdipierro wrote: > Put this in your layout.html > > > jQuery(document).ready(function(){ >      setTimeout("keepalive('{{=URL > (r=request,c='default',f='keepalive')}}')",2000);}); > > > > This in your model > > db.define_table('online',SQLField('user_id',d

[web2py:24232] Re: userstate

2009-06-15 Thread mdipierro
Put this in your layout.html jQuery(document).ready(function(){ setTimeout("keepalive('{{=URL (r=request,c='default',f='keepalive')}}')",2000); }); This in your model db.define_table('online',SQLField('user_id',db.auth_user),SQLField ('last_visit','integer')) This in your default.py con

[web2py:24231] userstate

2009-06-15 Thread pk
hi, is there a available command or function to check whether the user (from auth.user) is online or not? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, s

[web2py:24230] Re: global logging to file

2009-06-15 Thread Hans
Important note: do *not* 'import logging' in your controller if you use log.py. its done for all your controllers already in the log.py model and it would break the log.py magic. On Jun 15, 7:46 pm, Hans wrote: > Log file usage in Web2py is now simpler than ever! > You want to monitor the activi

[web2py:24229] Re: global logging to file

2009-06-15 Thread Hans
Log file usage in Web2py is now simpler than ever! You want to monitor the activities of your cron-driven web2py functions? To use the per application log file with rotating file handler in web2py you need to put log.py (below) into your models folder. The log file itself is created in your_web2p

[web2py:24228] Re: Helper DD DL/Custom forms with Auth

2009-06-15 Thread mdipierro
You can already do this: table=TAG.DL( TAG.TH('List header'), TD('Term1'),TAG.DD('This is the definition of the first term.'), TD('Term2'),TAG.DD('This is the definition of the second term.') ) {{=table}} On Jun 15, 12:28 pm, JohnMc wrote: > Definition lists. Its a variant of the LI/UL

[web2py:24227] Re: Helper DD DL/Custom forms with Auth

2009-06-15 Thread JohnMc
Definition lists. Its a variant of the LI/UL construct. Example -- List Header Term 1This is the definition of the first term. Term 2This is the definition of the second term. You see it most often used in blogging and occasionally for book indexes. On Jun 15, 11:04 am, mdipierro wrote: > >

[web2py:24226] Re: Delete

2009-06-15 Thread pk
i got a ticket: Traceback (most recent call last): File "gluon/restricted.py", line 107, in restricted File "/Applications/web2py1.64/web2py.app/Contents/Resources/ applications/2busy/controllers/menu.py", line 103, in File "gluon/globals.py", line 100, in File "/Applications/web2py1.64/

[web2py:24225] Re: query using IN list on GAE?

2009-06-15 Thread Dan
the IN operator is supported according to http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Introducing_Queries The IN operator also performs multiple queries, one for each item in the provided list value where all other filters are the same and the IN filter is replac

[web2py:24224] Re: Delete

2009-06-15 Thread mdipierro
This db.projectfile.project_id.requires=IS_IN_DB(db,'project.id','%(name) s') in my previous example should do what you ask. On Jun 15, 11:55 am, pk wrote: > for perhaps better understanding: > > on the webpage calls projectfile: > > User can chose one of his projects (drop down):   - Project1

[web2py:24223] Re: query using IN list on GAE?

2009-06-15 Thread mdipierro
As far as I know GAE does not support this. The only option is to use the ListProperty but web2py does not have an interface for it. Massimo On Jun 15, 11:45 am, Dan wrote: > What is the proper way to run a query on Google App Engine that uses > an IN clause? > > I want to do something like thi

[web2py:24222] Re: Delete

2009-06-15 Thread pk
for perhaps better understanding: on the webpage calls projectfile: User can chose one of his projects (drop down): - Project1 - Project2 - Project3 now he can take some description and upload

[web2py:24221] query using IN list on GAE?

2009-06-15 Thread Dan
What is the proper way to run a query on Google App Engine that uses an IN clause? I want to do something like this (in traditional SQL) SELECT person.name, person.age FROM person WHERE person.name IN ('Ralph','Henry','Sue') After searching around here and the web2py docs, I tried two different

[web2py:24220] Re: Delete

2009-06-15 Thread pk
ähm massimo, how can i do this: the project_id should change if the youser change the project from the choose list here my function: def projectfile(): db.projectfile.project_id.writable=False if auth.is_logged_in(): form=SQLFORM(db.projectfile,fields=['project_id'

[web2py:24219] Re: Helper DD DL/Custom forms with Auth

2009-06-15 Thread mdipierro
> 1.  Is there any plan to have support for definition list? what are they? can you provide an example of what you have in mind? > 2.  How do you incorporate custom forms with Auth? yes, you can build views for forms that look like this and insert any html you like: {{=form.custom.begin}} {{=f

[web2py:24218] from slashdot: Oracle Beware - Google Tests Cloud-Based Database

2009-06-15 Thread Wes James
/me wonders if web2py will be able to use this some how... (some day)? http://developers.slashdot.org/article.pl?sid=09/06/12/1658206 -wes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" grou

[web2py:24217] Re: Variables stored in session.

2009-06-15 Thread annet
Massimo, > If I understand your problem, this should solve it. You did not fully understand my problem, my mistake; the domain names don't contain the id, that was just my lack of imagination. In real life they read like www.vermeer.eu or www.ou.nl However, I believe your reply helped me solve

[web2py:24216] Re: How to create a cross-tabulation view?

2009-06-15 Thread DenesL
Very interesting case. Maybe using a contact_method table that keeps the name of table used for each contact_method type and a crossref with person_id, contact_method_id, related_table_entry_id. I am too busy right now, but I will try tonight. On Jun 15, 6:18 am, samwyse wrote: > I have a perso

[web2py:24215] Re: Delete

2009-06-15 Thread pk
ok thanks massimo, i will try it when i come home peter On 15 Jun., 15:42, mdipierro wrote: > I think you need something like this... > > db.define_table('project',SQLField('name'),...other fields...) > db.define_table('projectfile',SQLField > ('project_id',db.project),other fields...) > d

[web2py:24214] Re: request.now.date()

2009-06-15 Thread annet
Massimo, Thanks, for providing me with the plus_two_months(da) function. Annet --~--~-~--~~~---~--~~ 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

[web2py:24213] Re: request.now.date()

2009-06-15 Thread mdipierro
usually you would do: from datetime import timedelta db.event.fromdate<=request.now + timedelta(hours=24*30*2) but it would not be precise and timedelta does not support months. You wil have to write your own function def plus_two_months(da): (y,m,d)=(da.year,da.month,da.day) m+=2 if m

[web2py:24212] Re: request.now.date()

2009-06-15 Thread annet
Massimo, Thanks, something else though, how do I increase request.now by 2 months? db.event.fromdate<=request.now + 2 months Kind regards, Annet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framew

[web2py:24211] Re: How to create a cross-tabulation view?

2009-06-15 Thread mdipierro
I assume you have db.define_table('person',SQLField('name'),SQLField('email') db.define_table('contact_method',SQLField ('person_id',db.person),SQLField('work_phone')) you can do: rows=db(db.person.id==db.contact_method.person_id).select() for row in rows: print row.person.name print ro

[web2py:24210] How to create a cross-tabulation view?

2009-06-15 Thread samwyse
I have a person table, with names, and a contact_method table, with a name column and a very few rows (Work, Home, Cell, Email). Finally, I have a contact table that contains person ids, contact_method ids, and the phone numbers, etc, that go along with them. I want to create a view that looks l

[web2py:24209] Re: Nice plugin idea..

2009-06-15 Thread samwyse
I think that they got hacked, since the bottom of the page has some Viagra ads. On Jun 13, 7:20 pm, mdipierro wrote: > Funny... they use PHP for their web page and does not work: > > http://api.rails-engines.org/ > > Because of this I cannot get to the actual documentation. Perhaps it > will wor

[web2py:24208] Re: Interview?

2009-06-15 Thread mdipierro
Thanks you Victor. I would be happy. Let me just say that probably web2py would benefit more form users speaking out their opinions than from me talking about technical issues. Massimo On Jun 15, 8:19 am, Victor wrote: > I have just sent an email to Ron Stevens of the python 411 podcast > atht

[web2py:24206] Re: Delete

2009-06-15 Thread mdipierro
I think you need something like this... db.define_table('project',SQLField('name'),...other fields...) db.define_table('projectfile',SQLField ('project_id',db.project),other fields...) db.projectfile.project_id.requires=IS_IN_DB(db,'project.id','%(name) s') db.projectfile.project_id.represent

[web2py:24207] Re: request.now.date()

2009-06-15 Thread mdipierro
You should just use: db.event.fromdate>=request.now Massimo On Jun 15, 7:05 am, annet wrote: > In a model I have a table definition: > > db.Field('fromdate',type='date',default='',notnull=True), >  ... > > db.event.fromdate.requires=IS_DATE(str(T('%Y-%m-%d'))) > > In a controller I have: > > d

[web2py:24205] Helper DD DL/Custom forms with Auth

2009-06-15 Thread Bill
Hi. Three questions: 1. Is there any plan to have support for definition list? 2. How do you incorporate custom forms with Auth? 3. Is that possible? If not, do you use "if form.vars accepts" (Syntax ?) Thanks, Bill --~--~-~--~~~---~--~~ You received this mes

[web2py:24204] Re: Variables stored in session.

2009-06-15 Thread mdipierro
This is what I would do, in the controller, outside any function com_id=request.env.http_host[-5] ### '1' or '2' if com_id!=session.com_id: (session.com_id, session.comname)=(com_id, db[com_id].comname) If I understand your problem, this should solve it. Massimo On Jun 15, 2:24 am, annet

[web2py:24203] Interview?

2009-06-15 Thread Victor
I have just sent an email to Ron Stevens of the python 411 podcast at http://www.awaretek.com/python/ to ask if he would like to do an interview with Massimo. I hope it was a good idea. Victor --~--~-~--~~~---~--~~ You received this message because you are subscri

[web2py:24202] request.now.date()

2009-06-15 Thread annet
In a model I have a table definition: db.Field('fromdate',type='date',default='',notnull=True), ... db.event.fromdate.requires=IS_DATE(str(T('%Y-%m-%d'))) In a controller I have: db.event.fromdate>=request.now.today() Exposing the function results in an error ticket being issued: SyntaxE

[web2py:24201] Re: Delete

2009-06-15 Thread pk
i think i have an idea massimo which can possible solve my problem but you have to help me. how can i save the project.id in the projectfile table. the user can choose a self created project over a form and i like to save automaticly the project.id in the table projectfile. how can i do this?

[web2py:24200] Re: Delete

2009-06-15 Thread pk
the reference should be the name of the project, projectname thanks peter On 15 Jun., 02:40, mdipierro wrote: > That is what I thought but I do not see in "projectfile" any reference > field to "project". > > On Jun 14, 4:47 pm, pk wrote: > > > a projectfile should reference a project, but a p

[web2py:24199] Re: authentication - login error

2009-06-15 Thread mika
Ok, I solved it - I was running python 2.6 instead 2.5... Now, with 2.5 everything seems to be good. Thanks for your help! On Jun 14, 8:01 pm, Fran wrote: > On Jun 14, 5:15 pm, mika wrote: > > > I still have that problem - I'm using web2py from trunk - Version > > 1.64.1 (2009-06-13 13:29:19)

[web2py:24198] Variables stored in session.

2009-06-15 Thread annet
I am working on a web app that serves pages to different domain names. Since the models and views for these domains are the same I decided to put them in one application and create a controller for each domain. In these controllers I put the response attributes, the menu, the variables com_id and

[web2py:24197] Re: Args and Ajax call

2009-06-15 Thread Fauché JM
OK ,All is right !! I am happy again ... ,Thank you Massimo Jean-Marc --~--~-~--~~~---~--~~ 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 unsub