[web2py:37556] Python 2.7 and web2py

2009-12-19 Thread Anand Vaidya
While testing some other code with python-2.7-alpha1 I thought why not
try web2py too.

Web2py starts up, fine, with some deprecation warnings:

/home/cr/users/av/python27a1x64/lib/python2.7/mhlib.py:83:
DeprecationWarning: the multifile module has been deprecated since
Python 2.5
  import multifile
/home/cr/users/av/demo/web2py/gluon/import_all.py:97:
DeprecationWarning: the MimeWriter module is deprecated; use the email
package instead
  __import__(module, globals(), locals(), [])
/home/cr/users/av/demo/web2py/gluon/import_all.py:97:
DeprecationWarning: the mimify module is deprecated; use the email
package instead
  __import__(module, globals(), locals(), [])
/home/cr/users/av/demo/web2py/gluon/import_all.py:97:
DeprecationWarning: the sets module is deprecated
  __import__(module, globals(), locals(), [])
WARNING:root:GUI not available because Tk library is not installed
Warning: web2py requires Python 2.4, 2.5 (recommended), or 2.6 but you
are running:
2.7a1 (r27a1:76674, Dec 18 2009, 21:14:54)
[GCC 4.4.1]web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2010
Version 1.74.2 (2009-12-15 23:43:22)
Database drivers available: pysqlite2
Starting cron...
please visit:
http://127.0.0.1:8000
use "kill -SIGTERM 16780" to shutdown the web2py server


Also, the web interface was failing to come up and reporting an error
with missing sqlite3 module. After installing pysqlite seems to work
fine. All basic functions are fine.

Isn't SQLite built into python since 2.5?

Just though I'd share this info...

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37557] Re: semantic web2py

2009-12-19 Thread davidjensen
I will do some testing.

Does this mean there is no need for the mysterious couchdb, mongodb,
and hadoop, whatever they are?

On Dec 18, 3:30 pm, mdipierro  wrote:
> http://www.web2py.com/semantic
>
> We could use some testers.
>
> Massimo

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37558] Re: LOAD function anybody?

2009-12-19 Thread mdipierro
Hi Yarko,

yes, that is it, combined with the ajax code in web2py_ajax.html.

Massimo

On Dec 19, 1:13 am, Yarko Tymciurak 
wrote:
> On Dec 19, 12:22 am, Thadeus Burgess  wrote:
>
> > This has been in place for a while now. It was part of the original plugin_
> > schema, to load say "comments" easily. There is a screencast on vimeo about
> > this as well that explains LOAD, how it works, and its parameters.
>
> Ah - Thanks Thadeus -
>
> I looked at the vimeo video;  when I looked thru the web2py source
> tree, the only place I saw "LOAD" was in gluon/compileapp.py:
>
>     environment['LOAD'] = LoadFactory(environment)
>
> which is not (I do not think) what this is...
>
> Does anyone know where the code that implements this behavior is
> hidden?
>
> Thanks,
> - Yarko
>
>
>
> > -Thadeus
>
> > On Fri, Dec 18, 2009 at 10:59 PM, Yarko Tymciurak <
>
> > resultsinsoftw...@gmail.com> wrote:
> > > cally, this seems to be a way to load ancillary controller
> > > behavior from within a view, but the question (as usual) is what
> > > _view_ controls do I have over th
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37559] exporting csv file into table

2009-12-19 Thread vvk
I'm creating a csv file using db_export_to_csv. I want to make this
csv file downloadable.
"Download" function isn't allowing me to download this csv file
because it's not present in any table. I thought of exporting csv file
directly into a table, but unable to find any syntax for that. Any
help would be greatly appreciated.



--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37560] Re: Python 2.7 and web2py

2009-12-19 Thread mdipierro
good to know. We should make those warning go away.

On Dec 19, 3:51 am, Anand Vaidya  wrote:
> While testing some other code with python-2.7-alpha1 I thought why not
> try web2py too.
>
> Web2py starts up, fine, with some deprecation warnings:
>
> /home/cr/users/av/python27a1x64/lib/python2.7/mhlib.py:83:
> DeprecationWarning: the multifile module has been deprecated since
> Python 2.5
>   import multifile
> /home/cr/users/av/demo/web2py/gluon/import_all.py:97:
> DeprecationWarning: the MimeWriter module is deprecated; use the email
> package instead
>   __import__(module, globals(), locals(), [])
> /home/cr/users/av/demo/web2py/gluon/import_all.py:97:
> DeprecationWarning: the mimify module is deprecated; use the email
> package instead
>   __import__(module, globals(), locals(), [])
> /home/cr/users/av/demo/web2py/gluon/import_all.py:97:
> DeprecationWarning: the sets module is deprecated
>   __import__(module, globals(), locals(), [])
> WARNING:root:GUI not available because Tk library is not installed
> Warning: web2py requires Python 2.4, 2.5 (recommended), or 2.6 but you
> are running:
> 2.7a1 (r27a1:76674, Dec 18 2009, 21:14:54)
> [GCC 4.4.1]web2py Enterprise Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2010
> Version 1.74.2 (2009-12-15 23:43:22)
> Database drivers available: pysqlite2
> Starting cron...
> please visit:
>        http://127.0.0.1:8000
> use "kill -SIGTERM 16780" to shutdown the web2py server
>
> Also, the web interface was failing to come up and reporting an error
> with missing sqlite3 module. After installing pysqlite seems to work
> fine. All basic functions are fine.
>
> Isn't SQLite built into python since 2.5?
>
> Just though I'd share this info...

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37561] Re: LOAD function anybody?

2009-12-19 Thread Yarko Tymciurak
Thanks, Massimo -

This actually looks to be pretty fast, and does not look like it would
prevent nice wrapping (contrary to what I first said).
I will have to study LoadFactory code a bit, try it some more.

- Yarko

On Dec 19, 8:24 am, mdipierro  wrote:
> Hi Yarko,
>
> yes, that is it, combined with the ajax code in web2py_ajax.html.
>
> Massimo
>
> On Dec 19, 1:13 am, Yarko Tymciurak 
> wrote:
>
>
>
> > On Dec 19, 12:22 am, Thadeus Burgess  wrote:
>
> > > This has been in place for a while now. It was part of the original 
> > > plugin_
> > > schema, to load say "comments" easily. There is a screencast on vimeo 
> > > about
> > > this as well that explains LOAD, how it works, and its parameters.
>
> > Ah - Thanks Thadeus -
>
> > I looked at the vimeo video;  when I looked thru the web2py source
> > tree, the only place I saw "LOAD" was in gluon/compileapp.py:
>
> >     environment['LOAD'] = LoadFactory(environment)
>
> > which is not (I do not think) what this is...
>
> > Does anyone know where the code that implements this behavior is
> > hidden?
>
> > Thanks,
> > - Yarko
>
> > > -Thadeus
>
> > > On Fri, Dec 18, 2009 at 10:59 PM, Yarko Tymciurak <
>
> > > resultsinsoftw...@gmail.com> wrote:
> > > > cally, this seems to be a way to load ancillary controller
> > > > behavior from within a view, but the question (as usual) is what
> > > > _view_ controls do I have over th

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37562] Re: semantic web2py

2009-12-19 Thread mdipierro
When we will have adaptors for other NoDB backend (like MongoDB), this
will work on that. Right now it works with the supported DBs.

On Dec 19, 6:29 am, davidjensen  wrote:
> I will do some testing.
>
> Does this mean there is no need for the mysterious couchdb, mongodb,
> and hadoop, whatever they are?
>
> On Dec 18, 3:30 pm, mdipierro  wrote:
>
> >http://www.web2py.com/semantic
>
> > We could use some testers.
>
> > Massimo
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37563] Re: exporting csv file into table

2009-12-19 Thread mdipierro
You uness you are customizing export_to_csv_file you can just do

def myaction():
import cStringIO
file = cStringIO.StringIO()
db(...).select().export_to_csv_file(file)
return file.getvalue()

and call with http://./myaction.csv so that you get the right
content-type.

The .csv does all the trink

On Dec 19, 8:24 am, vvk  wrote:
> I'm creating a csv file using db_export_to_csv. I want to make this
> csv file downloadable.
> "Download" function isn't allowing me to download this csv file
> because it's not present in any table. I thought of exporting csv file
> directly into a table, but unable to find any syntax for that. Any
> help would be greatly appreciated.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37564] question

2009-12-19 Thread Massimo Di Pierro
http://groups.google.com/group/comp.lang.python/browse_thread/thread/b014b89ede34dc27#

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37565] Re: semantic web2py

2009-12-19 Thread selecta
well this is not directly related but I just launched my first web2py
project, wich basicly helps you to semantically annotate source code.
I am working in the field of systems biology and we usually have a gap
between a mathematical model of a biological process and the
biological meaning of the model. This new service helps to close this
gap.
http://sourceforge.net/projects/aym/ <- some nice screenshots here
http://www.semanticsbml.org/aym/ <- the service


On Dec 19, 3:35 pm, mdipierro  wrote:
> When we will have adaptors for other NoDB backend (like MongoDB), this
> will work on that. Right now it works with the supported DBs.
>
> On Dec 19, 6:29 am, davidjensen  wrote:
>
>
>
> > I will do some testing.
>
> > Does this mean there is no need for the mysterious couchdb, mongodb,
> > and hadoop, whatever they are?
>
> > On Dec 18, 3:30 pm, mdipierro  wrote:
>
> > >http://www.web2py.com/semantic
>
> > > We could use some testers.
>
> > > Massimo

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37566] Re: semantic web2py

2009-12-19 Thread Richard
that pages style looks like Drupal - where can I get it?!


On Dec 19, 7:30 am, mdipierro  wrote:
> http://www.web2py.com/semantic
>
> We could use some testers.
>
> Massimo

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37567] Re: upload progress

2009-12-19 Thread Richard
I got it to work, and the discussion was here:
http://groups.google.com/group/web2py/browse_thread/thread/e5e38fca6fa3f378

"The upload was so fast that it had finished before the first
progress
bar call. At the end of the upload the cache is cleared, so that the
first progress bar call returned an undefined cache."



On Dec 19, 8:37 am, Wes James  wrote:
> I downloaded:
>
> http://www.web2py.com/examples/static/web2py_src.zip
>
> then add pieces from:
>
> http://www.web2pyslices.com/main/slices/take_slice/10
>
> and gave it a run and I get length: 0 uploaded : 0
>
> Anyone gotten this to work?
>
> thx,
>
> -wes

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37568] Re: multiple SQLForms and rows datetime problem

2009-12-19 Thread Mikey Jokinen
Is this possible?  It means one submit, four sqlforms.

2009/12/17 Mikey Jokinen 

> db.define_table('table1',Field('field1'), Field('field2'))
>
> rows = db(db.field2 == 1).select()  #this has allways 4 rows or maybe more
> in future
>
> something like this "form=SQLFORM.factory(db.table1.field1, rows)"
> I now have "form1 = SQLFORM(db.table1, rows[n])",  n = 0..3
> mean all the rows comes into one form with one submit.
>
> Mikko
> -
>
>
>
> 2009/12/17 mdipierro 
>
> db.define_table('table1',Field('field1')
>> db.define_table('table2',Field('field2')
>> db.define_table('table3',Field('field3')
>> db.define_table('table4',Field('field4')
>>
>> form=SQLFORM.factory(db.table1.field1,
>> db.table2.field2,
>> db.table3.field3,
>> db.table4.field4)
>>
>> something like this?
>>
>>
>> On Dec 17, 2:57 pm, Mikey Jokinen  wrote:
>> > 4 different fields / rows from the same table.
>> >
>> > I now have 4 forms and 4 submit buttons. I dont like 4 submits...
>> everything
>> > else in forms (except datepciker and submits) is ok.
>> >
>> > Mikko
>> > -
>> >
>> > 2009/12/17 mdipierro 
>> >
>> > > You mean four fields from the same tables or 4 instances of the same
>> > > field?
>> >
>> > > On Dec 17, 2:28 am, Mikko  wrote:
>> > > > Comes to mind.
>> >
>> > > > What is the best way to put 4 lines from same database table into
>> same
>> > > > form?   What is easy model to do this?
>> >
>> > > > mr.freeze, I havent got time to try your widget yet.
>> >
>> > > > Mikko
>> > > > -
>> >
>> > > > On 14 joulu, 02:45, Mikey Jokinen  wrote:
>> >
>> > > > > Thanks and if quickfix (ie. with this calendar widget) comes in
>> mind...
>> > > I'll
>> > > > > be fixed too ;)
>> > > > > Any way to do something for id...  I guess should learn form
>> factory!
>> >
>> > > > > Mikko
>> > > > > -
>> >
>> > > > > 2009/12/13 mr.freeze 
>> >
>> > > > > > Has anyone identified or built a replacement? I could try to
>> find
>> > > one.
>> >
>> > > > > > On Dec 13, 11:02 am, mdipierro  wrote:
>> > > > > > > I played around with web2py_ajax.html the problem is that
>> calendar
>> > > > > > > uses field "id" to identify the element. If you display twice
>> the
>> > > same
>> > > > > > > same form for the same table, the two fields have the same
>> "id" and
>> > > > > > > calendar does not distinguish them.
>> >
>> > > > > > > Perhaps the problem will be gone as we move to a different
>> > > calendar.
>> >
>> > > > > > > On Dec 13, 6:01 am, Mikey Jokinen 
>> wrote:
>> >
>> > > > > > > >  I'll try web2py custom date widget first. I also have time
>> > > picker in
>> > > > > > the
>> > > > > > > > form and it works fine!
>> >
>> > > > > > > >  In ''/take_slice/25 <
>> > > > > >http://www.web2pyslices.com/main/slices/take_slice/25>'
>> > > > > > > > month name customize is also good.
>> >
>> > > > > > > > So going with these now. This, of course is solved in
>> future! :)
>> >
>> > > > > > > > I'll tell how it goes..
>> >
>> > > > > > > > 2009/12/13 mr.freeze 
>> >
>> > > > > > > > > If you can get away with just a date, here are two
>> options:
>> > > > > > > > >http://www.web2pyslices.com/main/slices/take_slice/22
>> > > > > > > > >http://www.web2pyslices.com/main/slices/take_slice/25
>> >
>> > > > > > > > > The latter should be easy to modify to include the time.
>> >
>> > > > > > > > > Hope that helps.
>> >
>> > > > > > > > > On Dec 12, 7:36 pm, Mikey J 
>> wrote:
>> > > > > > > > > > So I very much need help to solve this.
>> > > > > > > > > > custom widget tutor could also help.
>> >
>> > > > > > > > > > On 13 joulu, 02:31, "mr.freeze" 
>> > > wrote:
>> >
>> > > > > > > > > > > You're not doing anything wrong. It's either a problem
>> with
>> > > the
>> > > > > > > > > > > calendar.js plugin or the way it is implemented in
>> > > > > > web2py_ajax.html.
>> >
>> > > > > > > > > > > On Dec 12, 5:49 pm, Mikey J 
>> > > wrote:
>> >
>> > > > > > > > > > > > This problem comes also with default view.. and
>> Firefox,
>> > > IE7..
>> > > > > >  Too
>> > > > > > > > > > > > depressed to try opera ;)
>> >
>> > > > > > > > > > > > On 13 joulu, 00:45, Mikey J > >
>> > > wrote:
>> >
>> > > > > > > > > > > > > Hello,
>> >
>> > > > > > > > > > > > > I've four rows from db, four SQLForms in view.
>> > > > > > > > > > > > > {{=form1}}
>> > > > > > > > > > > > > {{=form2}}
>> > > > > > > > > > > > > {{=form3}}
>> > > > > > > > > > > > > {{=form4}}
>> > > > > > > > > > > > > forms come from same table and every form has two
>> > > datetime
>> > > > > > fields.
>> >
>> > > > > > > > > > > > > calendar only works in first form in view. Does
>> not
>> > > mather
>> > > > > > witch
>> > > > > > > > > form
>> > > > > > > > > > > > > comes first datetime picker works only in that
>> form
>> >
>> > > > > > > > > > > > > Am I doing something wrong?
>> >
>> > > > > > > > > --
>> >
>> > > > > > > > > You received this message because you are subscribed to
>> the
>> > > Google
>> > > > > > Groups
>> > > > > > > > > "w

[web2py:37569] Re: semantic web2py

2009-12-19 Thread mdipierro
This stuff looks really cool. Do you generate the images? Are hey 2d
or 3d?

On Dec 19, 2:45 pm, selecta  wrote:
> well this is not directly related but I just launched my first web2py
> project, wich basicly helps you to semantically annotate source code.
> I am working in the field of systems biology and we usually have a gap
> between a mathematical model of a biological process and the
> biological meaning of the model. This new service helps to close this
> gap.http://sourceforge.net/projects/aym/<- some nice screenshots 
> herehttp://www.semanticsbml.org/aym/<- the service
>
> On Dec 19, 3:35 pm, mdipierro  wrote:
>
> > When we will have adaptors for other NoDB backend (like MongoDB), this
> > will work on that. Right now it works with the supported DBs.
>
> > On Dec 19, 6:29 am, davidjensen  wrote:
>
> > > I will do some testing.
>
> > > Does this mean there is no need for the mysterious couchdb, mongodb,
> > > and hadoop, whatever they are?
>
> > > On Dec 18, 3:30 pm, mdipierro  wrote:
>
> > > >http://www.web2py.com/semantic
>
> > > > We could use some testers.
>
> > > > Massimo
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37570] Re: semantic web2py

2009-12-19 Thread mdipierro
I think it is from drupal. I took it from the official Linked Data web
site.

On Dec 19, 3:09 pm, Richard  wrote:
> that pages style looks like Drupal - where can I get it?!
>
> On Dec 19, 7:30 am, mdipierro  wrote:
>
> >http://www.web2py.com/semantic
>
> > We could use some testers.
>
> > Massimo
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37571] Re: multiple SQLForms and rows datetime problem

2009-12-19 Thread mdipierro
By definition one sqlform has one submit. You can combine the fields
of multiple forms in one bigger form but you must make sure the names
have no conflict.

On Dec 19, 3:42 pm, Mikey Jokinen  wrote:
> Is this possible?  It means one submit, four sqlforms.
>
> 2009/12/17 Mikey Jokinen 
>
> > db.define_table('table1',Field('field1'), Field('field2'))
>
> > rows = db(db.field2 == 1).select()  #this has allways 4 rows or maybe more
> > in future
>
> > something like this "form=SQLFORM.factory(db.table1.field1, rows)"
> > I now have "form1 = SQLFORM(db.table1, rows[n])",  n = 0..3
> > mean all the rows comes into one form with one submit.
>
> > Mikko
> > -
>
> > 2009/12/17 mdipierro 
>
> > db.define_table('table1',Field('field1')
> >> db.define_table('table2',Field('field2')
> >> db.define_table('table3',Field('field3')
> >> db.define_table('table4',Field('field4')
>
> >> form=SQLFORM.factory(db.table1.field1,
> >>                     db.table2.field2,
> >>                     db.table3.field3,
> >>                     db.table4.field4)
>
> >> something like this?
>
> >> On Dec 17, 2:57 pm, Mikey Jokinen  wrote:
> >> > 4 different fields / rows from the same table.
>
> >> > I now have 4 forms and 4 submit buttons. I dont like 4 submits...
> >> everything
> >> > else in forms (except datepciker and submits) is ok.
>
> >> > Mikko
> >> > -
>
> >> > 2009/12/17 mdipierro 
>
> >> > > You mean four fields from the same tables or 4 instances of the same
> >> > > field?
>
> >> > > On Dec 17, 2:28 am, Mikko  wrote:
> >> > > > Comes to mind.
>
> >> > > > What is the best way to put 4 lines from same database table into
> >> same
> >> > > > form?   What is easy model to do this?
>
> >> > > > mr.freeze, I havent got time to try your widget yet.
>
> >> > > > Mikko
> >> > > > -
>
> >> > > > On 14 joulu, 02:45, Mikey Jokinen  wrote:
>
> >> > > > > Thanks and if quickfix (ie. with this calendar widget) comes in
> >> mind...
> >> > > I'll
> >> > > > > be fixed too ;)
> >> > > > > Any way to do something for id...  I guess should learn form
> >> factory!
>
> >> > > > > Mikko
> >> > > > > -
>
> >> > > > > 2009/12/13 mr.freeze 
>
> >> > > > > > Has anyone identified or built a replacement? I could try to
> >> find
> >> > > one.
>
> >> > > > > > On Dec 13, 11:02 am, mdipierro  wrote:
> >> > > > > > > I played around with web2py_ajax.html the problem is that
> >> calendar
> >> > > > > > > uses field "id" to identify the element. If you display twice
> >> the
> >> > > same
> >> > > > > > > same form for the same table, the two fields have the same
> >> "id" and
> >> > > > > > > calendar does not distinguish them.
>
> >> > > > > > > Perhaps the problem will be gone as we move to a different
> >> > > calendar.
>
> >> > > > > > > On Dec 13, 6:01 am, Mikey Jokinen 
> >> wrote:
>
> >> > > > > > > >  I'll try web2py custom date widget first. I also have time
> >> > > picker in
> >> > > > > > the
> >> > > > > > > > form and it works fine!
>
> >> > > > > > > >  In ''/take_slice/25 <
> >> > > > > >http://www.web2pyslices.com/main/slices/take_slice/25>'
> >> > > > > > > > month name customize is also good.
>
> >> > > > > > > > So going with these now. This, of course is solved in
> >> future! :)
>
> >> > > > > > > > I'll tell how it goes..
>
> >> > > > > > > > 2009/12/13 mr.freeze 
>
> >> > > > > > > > > If you can get away with just a date, here are two
> >> options:
> >> > > > > > > > >http://www.web2pyslices.com/main/slices/take_slice/22
> >> > > > > > > > >http://www.web2pyslices.com/main/slices/take_slice/25
>
> >> > > > > > > > > The latter should be easy to modify to include the time.
>
> >> > > > > > > > > Hope that helps.
>
> >> > > > > > > > > On Dec 12, 7:36 pm, Mikey J 
> >> wrote:
> >> > > > > > > > > > So I very much need help to solve this.
> >> > > > > > > > > > custom widget tutor could also help.
>
> >> > > > > > > > > > On 13 joulu, 02:31, "mr.freeze" 
> >> > > wrote:
>
> >> > > > > > > > > > > You're not doing anything wrong. It's either a problem
> >> with
> >> > > the
> >> > > > > > > > > > > calendar.js plugin or the way it is implemented in
> >> > > > > > web2py_ajax.html.
>
> >> > > > > > > > > > > On Dec 12, 5:49 pm, Mikey J 
> >> > > wrote:
>
> >> > > > > > > > > > > > This problem comes also with default view.. and
> >> Firefox,
> >> > > IE7..
> >> > > > > >  Too
> >> > > > > > > > > > > > depressed to try opera ;)
>
> >> > > > > > > > > > > > On 13 joulu, 00:45, Mikey J 
> >> > > wrote:
>
> >> > > > > > > > > > > > > Hello,
>
> >> > > > > > > > > > > > > I've four rows from db, four SQLForms in view.
> >> > > > > > > > > > > > > {{=form1}}
> >> > > > > > > > > > > > > {{=form2}}
> >> > > > > > > > > > > > > {{=form3}}
> >> > > > > > > > > > > > > {{=form4}}
> >> > > > > > > > > > > > > forms come from same table and every form has two
> >> > > datetime
> >> > > > > > fields.
>
> >> > > > > > > > > > > > > calendar only works in first form in view. Does
> >> not
> >> > > mather
> >> > > > > > witch
> >> > > > > > > 

[web2py:37572] compile app to bytecode using commandline

2009-12-19 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I know I may compile my app using the web interface. I wish to deploy
the bytecode often. Is there any way to perform the compilation by script?

I have found, that there is a function "compile_application" in
gluon.contrib.compileapp.py, but the module is labeled "FOR INTERNAL USE
ONLY" so I do not know whether it is a good idea to try it directly
somehow :)

Thanks,
David

- --
David Zejda
http://www.tabang.eu
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkstMfMACgkQ3oCkkciamVFRogCffwB1qQACTQlbO1MFJTEqh7bf
830AoJMxVHjKvE9j4A7SpTcWm0HEdHA5
=2F0z
-END PGP SIGNATURE-

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37573] Re: compile app to bytecode using commandline

2009-12-19 Thread mdipierro
yes, make a script compile.py

from gluon.admin import app_compile
app_compile(request.application, request)

and run it with

python web2py.py -S yourappname -R compile.py

I have not tried it but should work. Everything that can be done via
admin interface has an API in the gluon.admin module.

Let us know if it works.

Massimo

On Dec 19, 2:05 pm, David Zejda  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello,
>
> I know I may compile my app using the web interface. I wish to deploy
> the bytecode often. Is there any way to perform the compilation by script?
>
> I have found, that there is a function "compile_application" in
> gluon.contrib.compileapp.py, but the module is labeled "FOR INTERNAL USE
> ONLY" so I do not know whether it is a good idea to try it directly
> somehow :)
>
> Thanks,
> David
>
> - --
> David Zejdahttp://www.tabang.eu
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iEYEARECAAYFAkstMfMACgkQ3oCkkciamVFRogCffwB1qQACTQlbO1MFJTEqh7bf
> 830AoJMxVHjKvE9j4A7SpTcWm0HEdHA5
> =2F0z
> -END PGP SIGNATURE-

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37574] Re: question

2009-12-19 Thread Jake
added my 2 cents :)  Go web2py!

On Dec 19, 3:20 pm, Massimo Di Pierro  wrote:
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/...

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37575] Re: semantic web2py

2009-12-19 Thread selecta
I hotlink the images from http://pubchem.ncbi.nlm.nih.gov/
eg http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=5957&loc=ec_rcs
the US version of "the" small chemical compounds database
the EU version would be chebi 
http://www.ebi.ac.uk/chebi/searchFreeText.do?searchString=CHEBI:10789
look at the Molfile it contains (if i remember corretly 3d)
coordinates

On Dec 19, 11:54 pm, mdipierro  wrote:
> This stuff looks really cool. Do you generate the images? Are hey 2d
> or 3d?
>
> On Dec 19, 2:45 pm, selecta  wrote:
>
>
>
> > well this is not directly related but I just launched my first web2py
> > project, wich basicly helps you to semantically annotate source code.
> > I am working in the field of systems biology and we usually have a gap
> > between a mathematical model of a biological process and the
> > biological meaning of the model. This new service helps to close this
> > gap.http://sourceforge.net/projects/aym/<- some nice screenshots 
> > herehttp://www.semanticsbml.org/aym/<- the service
>
> > On Dec 19, 3:35 pm, mdipierro  wrote:
>
> > > When we will have adaptors for other NoDB backend (like MongoDB), this
> > > will work on that. Right now it works with the supported DBs.
>
> > > On Dec 19, 6:29 am, davidjensen  wrote:
>
> > > > I will do some testing.
>
> > > > Does this mean there is no need for the mysterious couchdb, mongodb,
> > > > and hadoop, whatever they are?
>
> > > > On Dec 18, 3:30 pm, mdipierro  wrote:
>
> > > > >http://www.web2py.com/semantic
>
> > > > > We could use some testers.
>
> > > > > Massimo

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37576] Re: semantic web2py

2009-12-19 Thread selecta
go to more structures >> to get the mol file with the 3d coordinates

On Dec 20, 3:38 am, selecta  wrote:
> I hotlink the images fromhttp://pubchem.ncbi.nlm.nih.gov/
> eghttp://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=5957&loc=ec_rcs
> the US version of "the" small chemical compounds database
> the EU version would be 
> chebihttp://www.ebi.ac.uk/chebi/searchFreeText.do?searchString=CHEBI:10789
> look at the Molfile it contains (if i remember corretly 3d)
> coordinates
>
> On Dec 19, 11:54 pm, mdipierro  wrote:
>
>
>
> > This stuff looks really cool. Do you generate the images? Are hey 2d
> > or 3d?
>
> > On Dec 19, 2:45 pm, selecta  wrote:
>
> > > well this is not directly related but I just launched my first web2py
> > > project, wich basicly helps you to semantically annotate source code.
> > > I am working in the field of systems biology and we usually have a gap
> > > between a mathematical model of a biological process and the
> > > biological meaning of the model. This new service helps to close this
> > > gap.http://sourceforge.net/projects/aym/<- some nice screenshots 
> > > herehttp://www.semanticsbml.org/aym/<- the service
>
> > > On Dec 19, 3:35 pm, mdipierro  wrote:
>
> > > > When we will have adaptors for other NoDB backend (like MongoDB), this
> > > > will work on that. Right now it works with the supported DBs.
>
> > > > On Dec 19, 6:29 am, davidjensen  wrote:
>
> > > > > I will do some testing.
>
> > > > > Does this mean there is no need for the mysterious couchdb, mongodb,
> > > > > and hadoop, whatever they are?
>
> > > > > On Dec 18, 3:30 pm, mdipierro  wrote:
>
> > > > > >http://www.web2py.com/semantic
>
> > > > > > We could use some testers.
>
> > > > > > Massimo

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




Re: [web2py:37577] Re: SQLFORM, no-table, with fieldsets.

2009-12-19 Thread Thadeus Burgess
I need some help then. I do not see any way this is possible using the
current system of helpers and how data is validated by these helpers.

-Thadeus




On Fri, Dec 18, 2009 at 12:21 PM, Yarko Tymciurak <
resultsinsoftw...@gmail.com> wrote:

> On Dec 15, 6:09 pm, Thadeus Burgess  wrote:
> > The real problem is the cohesion between Models and Views within the
> > "internal" aspects of web2py. SQLFORM is way too cohesive between
> > validation and rendering.
>
> I think the term that describes this is "coupling" - there is design
> coupling between validation, and rendering, which couples model and
> view aspects.
>
> This is an important topic for web2py - not just from the immediate
> developer perspective (and both Denes and Thadeus, I think, have come
> on some convergent view) - but from a generalization point of view:
> Coupling is natural in some cases, and can be useful to simplify
> behavior and setup In this case, what is coming up is that it is
> standing in the way of generalization (e.g. easily changing layout).
>
> I would suggest at this point to layout a diagram, and attempt to
> state the problem these classes are trying to solve - and then test
> the appropriate generality.
>
> E.g. "this works for changing HTML layout;  does it work for Ajax
> equally well?  How does it affect CSS layout control? Will it
> facilitate a site/application designer in moving from an HTML/CSS
> prototype to, say, a flash/flex UI solution?  To alternate layouts for
> smart mobile devices (there are quite a number of web-capable devices
> now, e.g. iPhone, Droid, etc.)
>
> These questions will start to flush out what degrees of freedom are
> needed, and help refactor for most useful decoupling.
>
> Some general use cases will help also.   Right now, web2py seems to be
> implicitly built around rapid-prototyping based on data layout (which
> is where all the validation and form defaults come to play - lets not
> break that!).   What this, in effect, is asking for is rapid
> prototyping from the presentation end - if both of these are in place,
> this will be doubly useful as prototypes can evolve from alternately
> both directions.
>
> - Yarko
>
> > In my opinion, this is why I suggested separate classes, one for the form
> > model, and another for the form rendering(view).
> >
> > You solution, though works, creates an even bigger mess, since view
> > code would then also, be located in sql.py.
> >
> > -Thadeus
> >
> >
> >
> > On Tue, Dec 15, 2009 at 5:52 PM, Thadeus Burgess 
> wrote:
> > > I wouldn't be so quick to dismiss as_p as_ul and as_table. As they
> > > offer pre-defined templates.
> >
> > > Also, I am quickly playing aroudn with your suggestion. I added
> > > .forform() (that just returns self.widget(self, self.default) to field
> > > objects, and I am using FORM.
> >
> > > The problem with this approach is it still requires the developer to
> > > declare simple things, such as labels and submit buttons...
> >
> > > The following actually renders perfectly, and validates, however,
> > > requires the developer to define labels, submit buttons and such.
> >
> > > form = FORM(
> > >FIELDSET(LEGEND("Personal Information"),
> > >P(db.test.first_name.forform()),
> > >P(db.test.last_name.forform()),
> > >),
> > >FIELDSET(LEGEND("Login Information"),
> > >P(db.test.username.forform()),
> > >P(db.test.password.forform()),
> > >),
> > >FIELDSET(
> > >INPUT(_type="submit", _value="submit"),
> > >)
> > >)
> >
> > > Is this what you ment by a "generic" solution?
> >
> > > -Thadeus
> >
> > > On Tue, Dec 15, 2009 at 5:22 PM, mdipierro 
> wrote:
> > >> No. I django's form.as_p, form.as_ul, form.as_table are not an option
> > >> for web2py. Each of them is a specific solution. I think we are
> > >> looking for a general solution instead.
> >
> > >> I think this takes two steps:
> >
> > >> order 0) SMARTFORM = FORM
> > >> order 1) Fields get an .xml() attributes that serializes them using
> > >> the widget
> > >> order 2) move some of the SQLHTML logic into SMARTFORM
> >
> > >> at that point SQLFORM is just an instance of a SMARTFORM (perhaps the
> > >> default SMARTFORM).
> >
> > >> On Dec 15, 5:16 pm, Thadeus Burgess  wrote:
> > >>> I still do not see how field sets and legends could be determined by
> a
> > >>> SMARTFORM using the current way web2py HELPERS work.
> >
> > >>> If you look at ruby on rails, this is why their forms require you to
> > >>> explicitly define your forms.
> >
> > >>> Django has sort of what I would like, however lacks fieldsets.
> > >>> django's form.as_p, form.as_ul, form.as_table, however for more
> > >>> advanced functionality, django forms provide a similar custom
> > >>> interface to the widgets.
> >
> > >>> A perfect form solution would actually be a mixture of both, we could
> > >>> have the same as_p, as_ul, as_table. We could have one class
> > >>> (SmartForm) which ju

[web2py:37578] restore db tcp connection

2009-12-19 Thread KMax
Hello
 Unable to find solution here, so i am asking.
 Is there any way to avoid Internal error on losing connection to db?
 At this moment I have to restart apache to restore connection.
 Apache2 and postgres8.3 run on separate linux workstations.
Thanks in advice.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37579] Re: SQLFORM, no-table, with fieldsets.

2009-12-19 Thread hamdy.a.farag
Hi There

@mdipierro , whether SQLFORM was refactored or there will be a new
kind of form , still this's important and needs to be of high
priority

I work in a team that faced many problems using the current SQLFORM

1st if you're work in agile environment , then you don't necessarily
see the whole design of your web application from the 1st time, you
just work and produce , then you refactor and add more changes and so
on

one of our problems with SQLFORMS is that you may use them with a
table somewhere in the beginnging then you found that
when you need that particular form in another place , you need to add
a field for it . you can add it but still the validation problem is
there

you may end up not using SQLFORM and always use SQLFORM.factory that
needs more work

So I'm absolutely with the idea of taking an action towards this
problem .

thanks

> No. I django's form.as_p, form.as_ul, form.as_table are not an option
> for web2py. Each of them is a specific solution. I think we are
> looking for a general solution instead.
>
> I think this takes two steps:
>
> order 0) SMARTFORM = FORM
> order 1) Fields get an .xml() attributes that serializes them using
> the widget
> order 2) move some of the SQLHTML logic into SMARTFORM
>
> at that point SQLFORM is just an instance of a SMARTFORM (perhaps the
> default SMARTFORM).
>
> On Dec 15, 5:16 pm, Thadeus Burgess  wrote:
> > I still do not see how field sets and legends could be determined by a
> > SMARTFORM using the current way web2py HELPERS work.
> >
> > If you look at ruby on rails, this is why their forms require you to
> > explicitly define your forms.
> >
> > Django has sort of what I would like, however lacks fieldsets.
> > django's form.as_p, form.as_ul, form.as_table, however for more
> > advanced functionality, django forms provide a similar custom
> > interface to the widgets.
> >
> > A perfect form solution would actually be a mixture of both, we could
> > have the same as_p, as_ul, as_table. We could have one class
> > (SmartForm) which just defines the widgets, performs the validation,
> > and sets error messages. This would basically be a class that only
> > provides the same interfaces as SQLFORM.custom. Now with a SmartForm
> > class, you create a (FormRenderer) class that will take a SmartForm as
> > an argument (or SmartForm could take a renderer as an argument), and
> > render the form into HTML.
> >
> > class AsPRenderer(FormRenderer):
> > class AsULRenderer(FormRenderer):
> > class AsTableRenderer(FormRenderer):
> >
> > We're still left with the difficulty of fieldsets. How do we know what
> > fields break up into which fieldsets ? Passing a list that represents
> > the forms structure is the most logical way I can think of doing this
> > (refer tohttp://pastebin.com/m764d7a39for an example... note the
> > matter list) For this there would need to be a class
> > CustomRenderer(FormRenderer) that takes said list as an argument.
> > (again my first question, I do not know how this could be worked with
> > web2py helpers)
> >
> > How does this sound?
> >
> > -Thadeus
> >
> > On Tue, Dec 15, 2009 at 9:09 AM, mdipierro  wrote:
> > > There is no reason to make SQLFORM more complex than it is. Why not
> > > move some of the SQLFORM logic into a new object SMARTFORM(?) and
> > > behaves like FORM but accepts Fields as helpers and processes them
> > > like SQLFORM? parhaps SQLFORM could be derived from such a beast.
> >
> > > Massimo
> >
> > > On Dec 15, 6:06 am, villas  wrote:
> > >> @Thadeus
> > >> Thanks for raising this topic.  Tables don't seem correct for laying
> > >> out forms any more.  So,  should we assume that we're all heading in
> > >> the direction of fieldsets?  Surely fieldsets should eventually be the
> > >> default.
> >
> > >> Maybe one way forward to is introduce a new option:
> > >> renderfieldset=False.  If true we can get a fieldset and drag our
> > >> forms into the next generation!
> >
> > >> -David
> >
> > > --
> >
> > > You received this message because you are subscribed to the Google Groups 
> > > "web2py-users" group.
> > > To post to this group, send email to web...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > web2py+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37580] Re: restore db tcp connection

2009-12-19 Thread mdipierro
I think I need to know more about settings. Who is losing connections
to the db? Is there a ssh tunnel connection the two machines? Do you
use connection pooling and one of the threads in the pool loses the
connection? Is this a problem without connection pooling?

On Dec 19, 11:36 pm, KMax  wrote:
> Hello
>  Unable to find solution here, so i am asking.
>  Is there any way to avoid Internal error on losing connection to db?
>  At this moment I have to restart apache to restore connection.
>  Apache2 and postgres8.3 run on separate linux workstations.
> Thanks in advice.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37581] Re: SQLFORM, no-table, with fieldsets.

2009-12-19 Thread mdipierro
Can you summarize for me what the problem is. This is a long thread
and I got lost.

Massimo

On Dec 19, 11:46 pm, "hamdy.a.farag"  wrote:
> Hi There
>
> @mdipierro , whether SQLFORM was refactored or there will be a new
> kind of form , still this's important and needs to be of high
> priority
>
> I work in a team that faced many problems using the current SQLFORM
>
> 1st if you're work in agile environment , then you don't necessarily
> see the whole design of your web application from the 1st time, you
> just work and produce , then you refactor and add more changes and so
> on
>
> one of our problems with SQLFORMS is that you may use them with a
> table somewhere in the beginnging then you found that
> when you need that particular form in another place , you need to add
> a field for it . you can add it but still the validation problem is
> there
>
> you may end up not using SQLFORM and always use SQLFORM.factory that
> needs more work
>
> So I'm absolutely with the idea of taking an action towards this
> problem .
>
> thanks
>
> > No. I django's form.as_p, form.as_ul, form.as_table are not an option
> > for web2py. Each of them is a specific solution. I think we are
> > looking for a general solution instead.
>
> > I think this takes two steps:
>
> > order 0) SMARTFORM = FORM
> > order 1) Fields get an .xml() attributes that serializes them using
> > the widget
> > order 2) move some of the SQLHTML logic into SMARTFORM
>
> > at that point SQLFORM is just an instance of a SMARTFORM (perhaps the
> > default SMARTFORM).
>
> > On Dec 15, 5:16 pm, Thadeus Burgess  wrote:
> > > I still do not see how field sets and legends could be determined by a
> > > SMARTFORM using the current way web2py HELPERS work.
>
> > > If you look at ruby on rails, this is why their forms require you to
> > > explicitly define your forms.
>
> > > Django has sort of what I would like, however lacks fieldsets.
> > > django's form.as_p, form.as_ul, form.as_table, however for more
> > > advanced functionality, django forms provide a similar custom
> > > interface to the widgets.
>
> > > A perfect form solution would actually be a mixture of both, we could
> > > have the same as_p, as_ul, as_table. We could have one class
> > > (SmartForm) which just defines the widgets, performs the validation,
> > > and sets error messages. This would basically be a class that only
> > > provides the same interfaces as SQLFORM.custom. Now with a SmartForm
> > > class, you create a (FormRenderer) class that will take a SmartForm as
> > > an argument (or SmartForm could take a renderer as an argument), and
> > > render the form into HTML.
>
> > > class AsPRenderer(FormRenderer):
> > > class AsULRenderer(FormRenderer):
> > > class AsTableRenderer(FormRenderer):
>
> > > We're still left with the difficulty of fieldsets. How do we know what
> > > fields break up into which fieldsets ? Passing a list that represents
> > > the forms structure is the most logical way I can think of doing this
> > > (refer tohttp://pastebin.com/m764d7a39foran example... note the
> > > matter list) For this there would need to be a class
> > > CustomRenderer(FormRenderer) that takes said list as an argument.
> > > (again my first question, I do not know how this could be worked with
> > > web2py helpers)
>
> > > How does this sound?
>
> > > -Thadeus
>
> > > On Tue, Dec 15, 2009 at 9:09 AM, mdipierro  
> > > wrote:
> > > > There is no reason to make SQLFORM more complex than it is. Why not
> > > > move some of the SQLFORM logic into a new object SMARTFORM(?) and
> > > > behaves like FORM but accepts Fields as helpers and processes them
> > > > like SQLFORM? parhaps SQLFORM could be derived from such a beast.
>
> > > > Massimo
>
> > > > On Dec 15, 6:06 am, villas  wrote:
> > > >> @Thadeus
> > > >> Thanks for raising this topic.  Tables don't seem correct for laying
> > > >> out forms any more.  So,  should we assume that we're all heading in
> > > >> the direction of fieldsets?  Surely fieldsets should eventually be the
> > > >> default.
>
> > > >> Maybe one way forward to is introduce a new option:
> > > >> renderfieldset=False.  If true we can get a fieldset and drag our
> > > >> forms into the next generation!
>
> > > >> -David
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "web2py-users" group.
> > > > To post to this group, send email to web...@googlegroups.com.
> > > > To unsubscribe from this group, send email to 
> > > > web2py+unsubscr...@googlegroups.com.
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/web2py?hl=en.
>
>

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37582] Re: SQLFORM, no-table, with fieldsets.

2009-12-19 Thread hamdy.a.farag

well,

suppose you've a form for registeration that's related to auth_user
table
Now you can register new users and no problem

suppose after a while you need a page where manager can add special
users to them , [firs_name, last_name , ..] but in the
registration form you need a new field to be added ,
let's say the new field is a combo box that selects some thing from
another table .
This 's ok if I'm going to use SQLFORM.factory

what if 

I already have the Form that adds this special user that satisfied me
in the past , now I need to change it to suit my needs
so this needs to refactor my code using SQLFORM.factory
as you can see refactoring my code can be painful, and I'm always
refactoring my code
Now I can take  a decision to simply use just SQLFORM.factory from the
beginning if my software changes frequently and this's not easy as
using SQLFORM

my other decision is to add the table manually to the form
(form.insert.) but this has a problem that this field can not be
validated upon accepting the form

Now we need SQLFORM to be more customizable, meaning that I can add to
it a field from another table, another field that doesn't belong to
any table and that can be validated upon accepting the form

 - may be we need a new SMARTFORM - as you've suggested -

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.