[web2py:15550] Re: Demo of plugin system

2009-01-28 Thread billf
p.s. in an ideal world, any new test suite (minus the plugin availability checks) should be able to run against the existing sql.py. On Jan 28, 7:30 am, billf wrote: > My intention is that all the functionality in the sql.py on which the > code was based (only 3 or 4 days ago) is in the demo ver

[web2py:15551] [PATCH] gluon/compileapp.py: fix some typos

2009-01-28 Thread rctay
nothing fancy, just fixes some spelling errors. Signed-off by: Tay Ray Chuan Index: gluon/compileapp.py === --- gluon/compileapp.py (revision 680) +++ gluon/compileapp.py (working copy) @@ -215,8 +215,8 @@ def run_view_in(environ

[web2py:15552] Re: Does a web2py app have the equivalent of main()?

2009-01-28 Thread achipa
Yes, I know, but I want to loose the 'echo |' hack in it which in turn first needs the upcoming patch for the -S command line which we talked about. On Jan 28, 5:46 am, mdipierro wrote: > I am still waiting for a copy of the lastest patch. The one you send > me was rejected because not build aga

[web2py:15553] how to import from a 'higher' directory

2009-01-28 Thread billf
I know this is really python but I am writing a test.py for the proposed plugin/db stuff where test.py is located in web2py/plugin/ db. In test.py I want to import from gluon.sql. I've managed to do this by appending an item to sys.path by: gluonpath=__file__.replace('.pyc','.py')

[web2py:15554] T2 Problem

2009-01-28 Thread murray3
Hi, I am trying out T2 but got following errors when tried to run, help appreciated. Error traceback Traceback (most recent call last): File "/Users/massimodipierro/web2py/gluon/restricted.py", line 62, in restricted File "C:/APPS/web2py/applications/fabmonger/controllers/default.py", li

[web2py:15555] provide a development flag for applications

2009-01-28 Thread rctay
Hi, what do you guys think of providing a global variable (at application- level), say, WEB2PY_APP_IS_DEVELOPING? it would be useful for applications yet to enter production, so that one could enable various functionality/code that would be useful for developing applications. eg. if (WEB2PY_APP

[web2py:15556] Re: bad news and good news

2009-01-28 Thread BearXu
I am so happy to see that web2py is being used as an Enterprise Framework:) 2009/1/28 mdipierro > > Bad news: > - Once again, in 2009, PyCon has rejected the web2py talk and web2py > tutorial. > > Good news: > - I have been invited to join a panel discussion with Guido van > Rossum on ORM & GAE

[web2py:15557] Re: bad news and good news

2009-01-28 Thread BearXu
Does Yarko or Carl have a blog? 2009/1/28 BearXu > I am so happy to see that web2py is being used as an Enterprise Framework:) > > 2009/1/28 mdipierro > > >> Bad news: >> - Once again, in 2009, PyCon has rejected the web2py talk and web2py >> tutorial. >> >> Good news: >> - I have been invited

[web2py:15558] Re: T2 Problem

2009-01-28 Thread Fran
On Jan 28, 11:49 am, murray3 wrote: > I am trying out T2 but got following errors when tried to run, help > appreciated. > in create_fabservice > KeyError: 'fabservice' > In file: C:\APPS\web2py\applications\fabmonger/controllers/default.py > def create_fabservice(): >     form=t2.create(db.fabse

[web2py:15559] Re: how to import from a 'higher' directory

2009-01-28 Thread Paul Eden
Here's a slightly easier way. import os import sys sys.path.append(os.path.dirname(os.path.dirname(__file__))) from gluon.sql import drivers check out the documentation on os.path.dirname Paul On Wed, Jan 28, 2009 at 3:19 AM, billf wrote: > > I kno

[web2py:15560] Re: how to import from a 'higher' directory

2009-01-28 Thread Paul Eden
This version actually works. import os import sys up=os.path.dirname sys.path.append(up(up(up((os.path.abspath(__file__)) from gluon.sql import drivers Sorry, I didn't test the last post. Paul On Wed, Jan 28, 2009 at 6:27 AM, Paul Eden wrote: > Here's a slightly easier way. > > import os

[web2py:15561] Re: provide a development flag for applications

2009-01-28 Thread rctay
here's a simple patch that does this. execute web2py with this option: --developingapps APP[,APP...] anywhere in your application, you can use the boolean variable WEB2PY_APP_IS_DEVELOPING. ---cut below this line--- Index: compileapp.py

[web2py:15562] Re: Web2py manual

2009-01-28 Thread Joel Merrick
Many thanks for this Tim, Sorry for the late reply, it seems to have fell between a gap in my inbox! I'll give that a whirl... actually based on your dimensions, I think I can accomplish it with a bit of bash and imagemagick Thanks! On Thu, Jan 15, 2009 at 3:01 PM, Timothy Farrell wrote: > >

[web2py:15563] t2.display

2009-01-28 Thread Julius Minka
can I somehow change the output of t2.display? I need 2 things: 1. to format a date field 2. to change a reference to an other table to the corresponding value from that other table quick view at t2 source reveals, that t2.display returns DIV(TABLE(*items),_class='t2-display') that is my issue

[web2py:15564] Re: gluon/compileapp.py: fix some typos

2009-01-28 Thread mdipierro
thanks. Will fix today On Jan 28, 2:24 am, rctay wrote: > nothing fancy, just fixes some spelling errors. > > Signed-off by: Tay Ray Chuan > > Index: gluon/compileapp.py > === > --- gluon/compileapp.py (revision 680) > +++ gluon/co

[web2py:15565] Re: bad news and good news

2009-01-28 Thread Sebastian E. Ovide
Hi Massimo On Wed, Jan 28, 2009 at 2:01 AM, mdipierro wrote: > > Bad news: > - Once again, in 2009, PyCon has rejected the web2py talk and web2py > tutorial. I do not see it as a bad news... it is just a delay ...! web2py is very young... and in PyCon there are a limited number of conferences a

[web2py:15566] Re: how to import from a 'higher' directory

2009-01-28 Thread Timothy Farrell
Note to those unfamiliar: up() is a web2py function, not a Python function. It will only work in models and controllers. -tim Paul Eden wrote: > This version actually works. > > import os > import sys > up=os.path.dirname > sys.path.append(up(up(up((os. > path.abspath(__file__)) > > from

[web2py:15567] Re: Some thoughts on authentication and its implementation

2009-01-28 Thread Timothy Farrell
see below billf wrote: > I guessing this didn't push anyone's buttons but I thought I'd bring > it to the top of the queue just one more time in case someone could > respond :-) Apologies if this is a breach of forum etiquette. > > On Jan 27, 6:52 am, billf wrote: > >> 1. The idea of bundlin

[web2py:15568] Re: how to import from a 'higher' directory

2009-01-28 Thread Paul Eden
Very interesting! I didn't know that up() was a web2py function. I just set it as an alias to os.path.dirname on this line: up=os.path.dirname Here is a version then that does not use up() so there are no naming conflicts. import os import sys aa=os.path.dirname sys.path.append(aa(aa(aa(os.pat

[web2py:15569] Re: how to import from a 'higher' directory

2009-01-28 Thread Timothy Farrell
I missed the third line to see where you assigned it. Oops. The web2py version is in fileutils.py and is not actually normally in the execute environment. I got ahead of myself. It looks like this. def up(path): return os.path.dirname(os.path.normpath(path)) Sorry for any confusion. -t

[web2py:15570] Re: how to import from a 'higher' directory

2009-01-28 Thread Paul Eden
Not a problem and thanks for the clarification. It's nice to get to know some more of the API. Paul On Wed, Jan 28, 2009 at 7:43 AM, Timothy Farrell wrote: > > I missed the third line to see where you assigned it. Oops. > > The web2py version is in fileutils.py and is not actually normally in

[web2py:15571] Re: t2.display

2009-01-28 Thread mdipierro
On Jan 28, 7:51 am, Julius Minka wrote: > can I somehow change the output of t2.display? > > I need 2 things: > 1. to format a date field My suggestion is do not use the T2 layout.html. Use your own. In this case you can change datetime format using internationalization via the languages tab. >

[web2py:15572] Re: bad news and good news

2009-01-28 Thread mdipierro
I agree. it not to bad and it was not meant as a complaint. In fact I was one of the reviwers (although I did not review myself) hence I trust the process. They are using web2py for registration which is more important than anything. Massimo On Jan 28, 8:04 am, "Sebastian E. Ovide" wrote: > Hi

[web2py:15573] Re: An example of MSSQL database connection and installing modules to support it

2009-01-28 Thread achipa
Hm, what does python web2py.py -S welcome -P say ? On Jan 28, 5:40 am, kgingeri wrote: > ...on a little further investigation, I found... > > KarlsMacBook:~ kgingeri$ l /Library/Python/ > total 0 > drwxrwxr-x  4 root  admin  136  2 Sep 17:17 2.3 > drwxrwxr-x  4 root  admin  136  2 Sep 17:16 2.

[web2py:15574] Re: how to import from a 'higher' directory

2009-01-28 Thread billf
Many thanks folks On Jan 28, 3:06 pm, Paul Eden wrote: > Not a problem and thanks for the clarification. > > It's nice to get to know some more of the API. > > Paul > > > > On Wed, Jan 28, 2009 at 7:43 AM, Timothy Farrell wrote: > > > I missed the third line to see where you assigned it.  Oops.

[web2py:15575] Re: bad news and good news

2009-01-28 Thread Zoom.Quiet
On Wed, Jan 28, 2009 at 13:01, mdipierro wrote: > > Bad news: > - Once again, in 2009, PyCon has rejected the web2py talk and web2py > tutorial. > > Good news: > - I have been invited to join a panel discussion with Guido van > Rossum on ORM & GAE > - PyCon 2009 registration is based on web2py a

[web2py:15576] Re: Restricted left outer join

2009-01-28 Thread Baron
thanks for the clarification On Jan 28, 3:44 pm, mdipierro wrote: > db(a) is a set > > db(a)(b) is a subset > > db(a)(b)(c) is a subset of the subset etc. > > db(a)(b)(c).select(left=table.on(d)) is a join > > notice that table.on(d) is not a set, but a condition (that is why it > is on the rig

[web2py:15577] Re: bad news and good news

2009-01-28 Thread Yarko Tymciurak
Hi Sebastian - Even more on your nice comment is - people who know django and maintianing django parts of pycon web site were there, making their _own_ changes and asking how to do stuff in web2py (and a few of us have access to the django parts). A couple of things: the collaboration between peo

[web2py:15578] mysql max active connections

2009-01-28 Thread Baron
With mysql I am getting an error: User already has more than 'max_user_connections' active connections This is strange because it is just an internal test application that only I am accessing. From googling this error it seems a common reason is not closing a database connection. Is this a possib

[web2py:15579] Loading a website freezes when s9.addthis.com button is downloading

2009-01-28 Thread Macieksk
Hi Everyone, I set up my own web2py-driven site yesterday. I never did web designing before (although I am a programmer). I like it, i find it logical and neat. Hence, I browse API, FAQ's, etc. a lot and this is what I experience lately: Every time I click on a link under http://mdp.cti.depaul.e

[web2py:15580] Re: An example of MSSQL database connection and installing modules to support it

2009-01-28 Thread kgingeri
@achipa it says KarlsMacBook:~ kgingeri$ python web2py.py -S welcome -P /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/ Contents/MacOS/Python: can't open file 'web2py.py': [Errno 2] No such file or directory ...it runs as an .app install from my Applications folder t

[web2py:15581] Re: An example of MSSQL database connection and installing modules to support it

2009-01-28 Thread kgingeri
Also, I've tried a few things and here are my responses - again, I am new at this (I had looked at web2py a year ago briefly) so don't laugh too loud ;v) # easy_install pymssql Searching for pymssql Reading http://pypi.python.org/simple/pymssql/ Reading http://pymssql.sourceforge.net No local pa

[web2py:15582] Re: bad news and good news

2009-01-28 Thread mdipierro
This was (is) an exciting projects in many ways. One is that specs have been changing a lot and are still somewhat changing. More interesting we started from a position where we did not know each other and, therefore, we did not trust each other. Then we figured out each of us was bringing some u

[web2py:15583] Re: mysql max active connections

2009-01-28 Thread mdipierro
Connections are closed outside the controller so it should not be a problem with your program (I cannot be sure without looking at it) but I have never seen this error before. Perhaps it would help to loot at you models and controllers. What os? what's in the mysql.conf? Massimo On Jan 28, 5:3

[web2py:15584] Re: Loading a website freezes when s9.addthis.com button is downloading

2009-01-28 Thread mdipierro
Thanks for letting us know. Perhaps we should just remove the button since nobody uses it. I will do it asap. Massimo On Jan 28, 5:27 pm, Macieksk wrote: > Hi Everyone, > I set up my own web2py-driven site yesterday. I never did web > designing before (although I am a programmer). I like it, i

[web2py:15585] Able to do a table entries selection?

2009-01-28 Thread MadWalker
is it able to do a joint table entries selection? by only selecting only those that i need but still having those database stored and not delete it away? the table database and code are listed as db.define_table('notebook', SQLField('name')) db.define_table('entry',

[web2py:15586] Re: An example of MSSQL database connection and installing modules to support it

2009-01-28 Thread mdipierro
Hi Karl, My guess is that you are running the binary distribution of web2py. That comes with its own python and this it does not see any module you installed on the default python that comes with your mac. Download the web2py source code from http://mdp.cti.depaul.edu/examples/default/download

[web2py:15587] Doing a Username and Password check?

2009-01-28 Thread MadWalker
i got some problem and i still not able to do the username and password check i was told to do this way def log_in(): form=SQLFORM(userdb.user,fields=['username','password']) if form.accepts(form,request.vars,session): rows=userdb(userdb.user.username==form.vars.username)\

[web2py:15588] Re: Doing a Username and Password check?

2009-01-28 Thread mdipierro
You have various problems: 1) form=SQLFORM() is a create form. when you form.accept it creates a new record. I do not think that is what you want. 2) your cannot for form.accepts(form,...) it is form.accepts (request.vars,...) or FORM.accepts(form,request.vars,...) 3) You have this:

[web2py:15589] Re: Able to do a table entries selection?

2009-01-28 Thread mdipierro
I do not understand. Can you do an example of what you want? Without understanding I can see something is missing: > db.define_table('notebook', > SQLField('name')) > > db.define_table('entry', > SQLField('title'), > SQLField('notebook',db.notebook

[web2py:15590] Re: An example of MSSQL database connection and installing modules to support it

2009-01-28 Thread kgingeri
Ah! Thanks Massimo! I thought it must have been something like that. I will give it a try and report back. An actual source example or tutorial would be helpful - maybe I can give you one when I get it working :v) Karl --~--~-~--~~~---~--~~ You received this

[web2py:15591] Re: bad news and good news

2009-01-28 Thread Paul Eden
"It is definitely important to spread the word. PyCon 2009 may have 9 Django-related talks and 2 TG tutorials, and 0 web2py talks but when they choose a software to handle their money they choose web2py." That just says it all! Paul On Wed, Jan 28, 2009 at 8:27 PM, mdipierro wrote: > > This wa

[web2py:15592] Re: An example of MSSQL database connection and installing modules to support it

2009-01-28 Thread kgingeri
Ok so no more pyodbc issues - the module loads just fine. Thanks again Massimo! I have unixodbc and freetds working - i can run iodbctest just fine to my database, and run queries etc, but now I need the proper connect string for SQLDB('mssql://...'), in web2py'd db.py. I am connecting via VPN