[web2py:17915] Re: Procedures and views in DB execute.

2009-03-12 Thread shuval
I use executesql, but I don't now how work with resulte in form controllers. for example work with procedure test/controllers/default.py def index(): return dict(org=db.executesql('select name,code,empcnt from org_chart(100) where empcnt<>2')) test/default/index org:Max 100 1244

[web2py:17916] Re: Source repository confusion

2009-03-12 Thread Markus Gritsch
yay! The repos are now consistent (except the .bzrignore file which only is present in the BZR repo which is acceptable ;) Hopefully they will stay in sync for a long time to come... Thank you, Markus On Wed, Mar 11, 2009 at 10:38 PM, Markus Gritsch wrote: > On Mon, Mar 9, 2009 at 6:52 PM, m

[web2py:17917] Re: Procedures and views in DB execute.

2009-03-12 Thread Yarko Tymciurak
Try something like this:.in models/db.py: db.define_table('org_chart', SQLField('name'), SQLField('code', 'integer'), SQLField('empcnt', 'integer'), # migrate=False # if web2py should NOT CREATE or ALTER table ) ..in controllers/default.py: def index(): orglist = db().select(

[web2py:17918] web2py book errata anywhere?

2009-03-12 Thread Joe Barnhart
I'm looking for a listing of errata for the web2py book but I don't see one. I looked in all the usual suspect areas -- AlterEgo, here, the website, etc. My issue is the section on using form_factory to generate a form for uploading a file that I do not want to store in the database directly, bu

[web2py:17920] Re: defining tree structure model problem

2009-03-12 Thread Jurgis Pralgauskis
by the way, to be able in db admin to have dropdown reference to entered records (trunk/branches) I need to have db.TreeStructure.parentID.requires=IS_IN_DB(db, 'TreeStructure.id') but that is problem if I am creating the first (root) element (as workaround I commented out the IS_IN_DB line for

[web2py:17919] Re: Procedures and views in DB execute.

2009-03-12 Thread shuval
Thank you very much!!! How create table without field ID? --~--~-~--~~~---~--~~ 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:17921] Re: web2py book errata anywhere?

2009-03-12 Thread DenesL
Under the old wiki I had an errata page: https://mdp.cti.depaul.edu/web2py_wiki/default/wiki/errata but my guess is that we have to wait until the dust settles around the new wiki (or whatever we are going to use for documentation). --~--~-~--~~~---~--~~ You recei

[web2py:17922] Re: web2py -wiki

2009-03-12 Thread Jonathan B
On Mar 11, 11:22 pm, mdipierro wrote: > https://launchpad.net/web2py-wiki > > feel free to help improve it Excellent! :) --Jonathan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To p

[web2py:17923] Re: the need for an ID field

2009-03-12 Thread DenesL
> Let's keep at this - for as I read, and have all my reactions (both > positive, and spotting potential trouble) one thing that is beginning to > emerge - this has the potential to be very useful. Thanks Yarko, forgive my lack of clarity but this is still a Swiss cheese to me, full of holes (I

[web2py:17924] The web2py wiki is now ready for your input!

2009-03-12 Thread Jonathan Benn
Hi all, The web2py documentation wiki is now ready to go. So if you're interested in helping to document web2py's new features, or if you're a feature developer, then please add to the wiki and help improve web2py! The wiki is here (you need to accept Massimo's self-signed security certificate

[web2py:17925] how to set which application is default?

2009-03-12 Thread Jurgis Pralgauskis
hello, now default app is welcome so http://mysite.net opens http://mysite.net/welcome/default/index where is the place to change this? thanks -- Jurgis Pralgauskis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[web2py:17926] RST to html on new wiki site source

2009-03-12 Thread Paul Eden
Hi Massimo, I was looking through the source of the new wiki and did not notice where the RST markup is converted to html. Can you point me to the right file? -- Best Regards, Paul Eden "...and a little looking out for the other guy too." - Mr. Smith --~--~-~--~~~

[web2py:17927] Re: how to set which application is default?

2009-03-12 Thread Michael Wales
The main domain will always open default/index unless you use some form of rewrite. mod_rewrite, in Apache, is the preferred method but web2py does offer a routes.py file in its root directory which will allow you to point root to any of your applications. On Mar 12, 8:54 am, Jurgis Pralgauskis

[web2py:17928] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread Michael Wales
Certificate is invalid - can eventually get to the site, but requires some manual labor in Firefox. On Mar 12, 7:35 am, Jonathan Benn wrote: > Hi all, > > The web2py documentation wiki is now ready to go. So if you're > interested in helping to document web2py's new features, or if you're > a fe

[web2py:17929] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread DenesL
Good news! IMHO we should create a basic structure, probably following the current manual, so this does not turn into a collection of notes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group

[web2py:17930] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread mr.freeze
Looks good. Will any of the content from here https://mdp.cti.depaul.edu/web2py_wiki/default/wiki/main be moved over or does it need to be recreated manually? On Mar 12, 8:34 am, DenesL wrote: > Good news! > IMHO we should create a basic structure, probably following the > current manual, so th

[web2py:17931] Re: Procedures and views in DB execute.

2009-03-12 Thread Fran
On Mar 12, 9:23 am, shuval wrote: > How create table without field ID? Not currently possible: http://groups.google.com/group/web2py/browse_thread/thread/8689f2509c7aa6f1 F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

[web2py:17932] Re: Source repository confusion

2009-03-12 Thread mdipierro
We'll try. Thanks for you help. On Mar 12, 2:57 am, Markus Gritsch wrote: > yay!  The repos are now consistent (except the .bzrignore file which > only is present in the BZR repo which is acceptable ;)  Hopefully they > will stay in sync for a long time to come... > > Thank you, > Markus > > On

[web2py:17933] Re: defining tree structure model problem

2009-03-12 Thread mdipierro
db.TreeStructure.parentID.requires=IS_NULL_OR(IS_IN_DB(db, 'TreeStructure.id')) On Mar 12, 4:40 am, Jurgis Pralgauskis wrote: > by the way, to be able in db admin > to have dropdown reference to entered records (trunk/branches) > I need to have > db.TreeStructure.parentID.requires=IS_IN_DB(db, '

[web2py:17934] Re: Development/Production mode

2009-03-12 Thread Fran
On Mar 11, 7:53 pm, Timothy Farrell wrote: > I'm curious, what method you use for compressing/merging javascript files? JS based on that used by OpenLayers/Mapfish (JSMin) CSS based on work by Michael Crute Have sent you attachment 1-1 F --~--~-~--~~~---~--~~ Yo

[web2py:17935] Re: RST to html on new wiki site source

2009-03-12 Thread mdipierro
oops. models/rest.py was missing. I am reposting it. Massimo On Mar 12, 7:53 am, Paul Eden wrote: > Hi Massimo, > > I was looking through the source of the new wiki and did not notice where > the RST markup is converted to html. > > Can you point me to the right file? > > -- > Best Regards, > >

[web2py:17936] Re: how to set which application is default?

2009-03-12 Thread mdipierro
http://groups.google.com/group/web2py/browse_thread/thread/7854353eb6d6bab9/d925fe5aba00fd8c On Mar 12, 8:23 am, Michael Wales wrote: > The main domain will always open default/index unless you use some > form of rewrite. mod_rewrite, in Apache, is the preferred method but > web2py does offer a

[web2py:17937] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread mdipierro
That contact needs to be converted from moarkdown to reST so I guess it has to be done manually. On Mar 12, 8:56 am, "mr.freeze" wrote: > Looks good.  Will any of the content from > herehttps://mdp.cti.depaul.edu/web2py_wiki/default/wiki/mainbe moved over > or does it need to be recreated manua

[web2py:17938] Re: Procedures and views in DB execute.

2009-03-12 Thread mdipierro
This may work but you must list explicilty list the two fields else web2py will try to select the missing id field too. orglist = db().select (db.org_chart.code,db.org_chart.empcnt,db.org_chart.empcnt != 2) On Mar 12, 2:59 am, Yarko Tymciurak wrote: > Try something like this:.in models/db.p

[web2py:17939] Re: RST to html on new wiki site source

2009-03-12 Thread Paul Eden
Thanks, I just saw it. Paul On Thu, Mar 12, 2009 at 7:55 AM, mdipierro wrote: > > oops. models/rest.py was missing. I am reposting it. > > Massimo > > On Mar 12, 7:53 am, Paul Eden wrote: > > Hi Massimo, > > > > I was looking through the source of the new wiki and did not notice where > > the

[web2py:17940] CSS enhancements to web2py-wiki

2009-03-12 Thread Paul Eden
Hi All, I created a new branch of the web2py-wiki on launchpad for css enhancements (IMHO). It is here: https://code.launchpad.net/~paul-benchline/web2py-wiki/css_tightening I propose it for merging into the trunk. -- Best Regards, Paul Eden "...and a little looking out for the other guy too

[web2py:17941] Re: CSS enhancements to web2py-wiki

2009-03-12 Thread mdipierro
done. thanks. :-) On Mar 12, 11:48 am, Paul Eden wrote: > Hi All, > > I created a new branch of the web2py-wiki on launchpad for css enhancements > (IMHO). > > It is > here:https://code.launchpad.net/~paul-benchline/web2py-wiki/css_tightening > > I propose it for merging into the trunk. > > --

[web2py:17942] Re: the need for an ID field

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 6:32 AM, DenesL wrote: > > > > Let's keep at this - for as I read, and have all my reactions (both > > positive, and spotting potential trouble) one thing that is beginning to > > emerge - this has the potential to be very useful. > > Thanks Yarko, forgive my lack of clari

[web2py:17943] Re: Source repository confusion

2009-03-12 Thread Yarko Tymciurak
I know this is minor, but for completeness it would be good to have .bzrignore on svn... On Thu, Mar 12, 2009 at 9:46 AM, mdipierro wrote: > > We'll try. Thanks for you help. > > On Mar 12, 2:57 am, Markus Gritsch wrote: > > yay! The repos are now consistent (except the .bzrignore file which >

[web2py:17944] Re: how to set which application is default?

2009-03-12 Thread Yarko Tymciurak
If there is applications/init, it is called;If there is no init, then welcome is tried; If there is no welcome or init, then http 400 error raised; You can see this in gluon/main.py - look around line 235 (that link below says "init or examples" - I'm not sure if this used to be, but is not now)

[web2py:17945] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 8:24 AM, Michael Wales wrote: > > Certificate is invalid - can eventually get to the site, but requires > some manual labor in Firefox. this is because DePaul has certificate for top level site; I do not think this will / can be fixed. > > On Mar 12, 7:35 am, Jonathan

[web2py:17946] Re: Development/Production mode

2009-03-12 Thread Francisco Gama
Yes, we don't have to start from scratch. But follow me, the timeout variables should be different in these 2 modes... I still remember the thread in this group referring to "an irritating loss of code" due to timeouts... There is no real need for authentication in Development mode (Just like I d

[web2py:17947] Re: Development/Production mode

2009-03-12 Thread mdipierro
> I still remember the thread in this group referring to "an irritating loss of > code" due to timeouts... This does not happen any more. web2py editor has an ajax keepalive since 1.57. Massimo On Mar 12, 1:25 pm, Francisco Gama wrote: > Yes, we don't have to start from scratch. But follow m

[web2py:17948] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread Wes James
On Thu, Mar 12, 2009 at 12:00 PM, Yarko Tymciurak wrote: > > On Thu, Mar 12, 2009 at 8:24 AM, Michael Wales wrote: >> >> Certificate is invalid - can eventually get to the site, but requires >> some manual labor in Firefox. > > > this is because DePaul has certificate for top level site;  I do n

[web2py:17949] Re: Development/Production mode

2009-03-12 Thread Yarko Tymciurak
(typing too fast...) On Thu, Mar 12, 2009 at 2:14 PM, Yarko Tymciurak wrote: > > On Thu, Mar 12, 2009 at 1:35 PM, mdipierro wrote: > >> >> > I still remember the thread in this group referring to "an irritating >> loss of code" due to timeouts... >> >> This does not happen any more. web2py editor

[web2py:17950] Re: Development/Production mode

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 1:35 PM, mdipierro wrote: > > > I still remember the thread in this group referring to "an irritating > loss of code" due to timeouts... > > This does not happen any more. web2py editor has an ajax keepalive > since 1.57. > > Massimo > > and for the rest of the app - it ne

[web2py:17951] Re: the need for an ID field

2009-03-12 Thread DenesL
> Yes - thanks... I think this is what I alredy knew. The snips from wikipedia highlite: 1) a view consists of a stored query (hence the sqlset in my first stab, but I might be wrong). 2) INSERT, UPDATE and DELETE are possible with views under certain conditions, so lets not restrict their use.

[web2py:17952] routes_onerror in routes.py returns 303 but should return error code

2009-03-12 Thread Jim
Saw how to add a custom error message in this thread: http://groups.google.com/group/web2py/browse_thread/thread/834cbe25394e0d71/61f55eeb2432a6a8?lnk=gst&q=404#61f55eeb2432a6a8 That's what I want to do but if I use routes_onerror it returns 303: 127.0.0.1, 2009-03-12 13:30:55, GET, /myapp/defau

[web2py:17953] Re: the need for an ID field

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 5:23 PM, DenesL wrote: > *snip* > > tables MUST be in the same db, let alone server, e.g. you can not do: > dbX.define_table('dog',SQLField('name'),SQLField('owner',dbY.person)) > but this restriction can be worked on independently of views; > this also seems to suggest

[web2py:17954] Re: the need for an ID field

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 6:07 PM, Yarko Tymciurak wrote: > On Thu, Mar 12, 2009 at 5:23 PM, DenesL wrote: > >> *snip* >> > > >> tables MUST be in the same db, let alone server, e.g. you can not do: >> dbX.define_table('dog',SQLField('name'),SQLField('owner',dbY.person)) >> but this restriction ca

[web2py:17955] Errata

2009-03-12 Thread Nick Leaton
Web Manual. Page 129. Second bit of code 1 response.menu=[['Google',False','http://www.google.com'], 2 ['Index',True,URL(r=request,f='index')]] The error is that there is a extra ' after False on line 1 -- Nick --~--~-~--~~~---~--~~ You received this message beca

[web2py:17956] Re: the need for an ID field

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 6:07 PM, Yarko Tymciurak wrote: > On Thu, Mar 12, 2009 at 5:23 PM, DenesL wrote: > >> *snip* >> > > >> tables MUST be in the same db, let alone server, e.g. you can not do: >> dbX.define_table('dog',SQLField('name'),SQLField('owner',dbY.person)) >> but this restriction ca

[web2py:17957] Re: the need for an ID field

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 6:18 PM, Yarko Tymciurak wrote: > > On Thu, Mar 12, 2009 at 6:07 PM, Yarko Tymciurak wrote: > >> On Thu, Mar 12, 2009 at 5:23 PM, DenesL wrote: >> >>> *snip* >>> >> >> >>> tables MUST be in the same db, let alone server, e.g. you can not do: >>> dbX.define_table('dog',SQL

[web2py:17958] How to upload a file into web2py?

2009-03-12 Thread Joe Barnhart
I have a problem. I want to upload a file into my web2py site which does NOT go into a database, but rather will be processed (it is a CSV file). The proposed solution is to use form_factory to create the form as though a database exists (using SQLField objects). When I create the form with onl

[web2py:17959] Re: How to upload a file into web2py?

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 6:48 PM, Joe Barnhart wrote: > > I have a problem. I want to upload a file into my web2py site which > does NOT go into a database, but rather will be processed (it is a CSV > file). If you are going to use the sql.SQLTable.import_from_csv_file, then see how appadmin.py

[web2py:17960] Re: How to upload a file into web2py?

2009-03-12 Thread Joe Barnhart
Actually, I need to process the CSV file before it can be inserted into the database. I was hoping to upload it to disk (or even memory as the files are small), do the processing, and commit the changes to db. On Mar 12, 5:07 pm, Yarko Tymciurak wrote: > On Thu, Mar 12, 2009 at 6:48 PM, Joe Ba

[web2py:17961] Re: How to upload a file into web2py?

2009-03-12 Thread Wes James
On Thu, Mar 12, 2009 at 6:20 PM, Joe Barnhart wrote: > > Actually, I need to process the CSV file before it can be inserted > into the database.  I was hoping to upload it to disk (or even memory > as the files are small), do the processing, and commit the changes to > db. > How about uploading

[web2py:17962] Re: How to upload a file into web2py?

2009-03-12 Thread Joe Barnhart
Let me preface this by explaining that I am a noob at creating websites. This is probably so simple that anyone who's been around the block knows the answer and is thus confused at the empty- headedness of my question. I wanted to take advantage of web2py's built-in handling of update fields --

[web2py:17963] Re: How to upload a file into web2py?

2009-03-12 Thread Yarko Tymciurak
could you share your code? On Thu, Mar 12, 2009 at 7:55 PM, Joe Barnhart wrote: > > Let me preface this by explaining that I am a noob at creating > websites. This is probably so simple that anyone who's been around > the block knows the answer and is thus confused at the empty- > headedness of

[web2py:17964] Re: How to upload a file into web2py?

2009-03-12 Thread mdipierro
you can get the file content from request.vars.my_field_name.file.read() and the file name from request.vars.my_field_name.filename hope this helps. On Mar 12, 7:55 pm, Joe Barnhart wrote: > Let me preface this by explaining that I am a noob at creating > websites.  This is probably so

[web2py:17965] Re: How to upload a file into web2py?

2009-03-12 Thread Wes James
On Thu, Mar 12, 2009 at 6:55 PM, Joe Barnhart wrote: > > Let me preface this by explaining that I am a noob at creating > websites.  This is probably so simple that anyone who's been around > the block knows the answer and is thus confused at the empty- > headedness of my question. > If you look

[web2py:17966] Re: the need for an ID field

2009-03-12 Thread DenesL
Actually we are currently using views in a way. When a table is migrated the old fields remain in there but we can not see them. A seemingly unrelated question: is there an easy way to get all the objects of type ? --~--~-~--~~~---~--~~ You received this message b

[web2py:17967] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread DenesL
I see there is a "Web2py Documentation" page that could serve as the backbone but it is getting kinda lost in the page list, is there a way to visualize the hierarchy?. The instructions for creating pages recommend using the menu field to enter things like '/docs/dal' to keep the pages organized b

[web2py:17968] database market share

2009-03-12 Thread DenesL
After a little search I could only find info from 2006: http://www.gartner.com/it/page.jsp?id=507466 Company 2006 Market Share (%) Oracle47.1 IBM 21.1 Microsoft 17.4 Teradata3.2 Sybase 3.2 Other Vendors 7.9 Total

[web2py:17969] Re: The web2py wiki is now ready for your input!

2009-03-12 Thread DenesL
By that I mean I can see the index with the [+]s but the links are a bunch of numbers, letters and dashes. So which one is '/docs/examples' or '/docs/howto' ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py We

[web2py:17970] Re: the need for an ID field

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 9:47 PM, DenesL wrote: > > Actually we are currently using views in a way. > When a table is migrated the old fields remain in there but we can not > see them. I do not think so... here's an example of a recent migration I made (resize a column): timestamp: 2009-03-09T1

[web2py:17971] Re: the need for an ID field

2009-03-12 Thread mdipierro
yes. They are in organized by thread in the dict SQLDB._instances Look into sql.py SQLDB.close_all_instances for the a thread safe way of accessing them. Massimo On Mar 12, 9:47 pm, DenesL wrote: > Actually we are currently using views in a way. > When a table is migrated the old fields remai

[web2py:17972] Re: routes_onerror in routes.py returns 303 but should return error code

2009-03-12 Thread mdipierro
Let me look into this. Massimo On Mar 12, 5:35 pm, Jim wrote: > Saw how to add a custom error message in this > thread:http://groups.google.com/group/web2py/browse_thread/thread/834cbe2539... > > That's what I want to do but if I use routes_onerror it returns 303: > > 127.0.0.1, 2009-03-12 13:

[web2py:17973] Re: Errata

2009-03-12 Thread mdipierro
Thanks Nick. On Mar 12, 5:58 pm, Nick Leaton wrote: > Web Manual. Page 129. Second bit of code > > 1 response.menu=[['Google',False','http://www.google.com'], > 2 ['Index',True,URL(r=request,f='index')]] > > The error is that there is a extra ' after False on line 1 > -- > Nick --~--~-~-

[web2py:17974] Re: the need for an ID field

2009-03-12 Thread Yarko Tymciurak
On Thu, Mar 12, 2009 at 10:49 PM, mdipierro wrote: > > yes. They are in organized by thread in the dict > > SQLDB._instances > > Look into sql.py SQLDB.close_all_instances for the a thread safe way > of accessing them. This is how you get connection objects, and close them off; I think DenesL

[web2py:17975] Re: routes_onerror in routes.py returns 303 but should return error code

2009-03-12 Thread mdipierro
routes_onerror was designed to catch errors (like 400, 404, etc.) not return a standard page instead of an an error page. It returns 303 to redirect to the customizable page. This was done on purpose because some browsers (IE for example) do not display the content of a page if the page status sh

[web2py:17976] Re: Procedures and views in DB execute.

2009-03-12 Thread shuval
There is one question. How use parameters procedure DB (Firebird) in web2py? For example org_chart("parameter"). May be web2py not work procedure with parametres. db.define_table('org_chart("parameter")', SQLField('name'), SQLField('code', 'integer'), SQLField('empcnt', 'integer'),