[web2py:16686] Re: Can hardcron work without being triggered by a request?

2009-02-22 Thread AchipA
OK, I don't have a windows machine at hand, will check this on monday. As for the docs, that's in progress, I'm working on an extended doc based on https://mdp.cti.depaul.edu/web2py_wiki/default/wiki/Web2pyCron to be part of the official documentation. On Feb 22, 8:35 am, Iceberg wrote: > On Fe

[web2py:16687] Re: Can hardcron work without being triggered by a request?

2009-02-22 Thread AchipA
I think I know what's causing the issue, try the following as your web2py.py instead of the original one: #!/usr/bin/python # -*- coding: utf-8 -*- import os import sys path = os.path.dirname(os.path.abspath(__file__)) if not path in sys.path: sys.path.append(path) os.chdir(path) import gl

[web2py:/] Re: Trailing slash

2009-02-22 Thread Jim
I've copied the files from launchpad newer than 1.56.3 down to my system (linux), then restarted web2py. That might not be the right approach to updating. I still have the same pattern: /function works /function/works /function/page# works (equivalent of "all categories") /function/pa

[web2py:16689] Re: Trailing slash

2009-02-22 Thread mdipierro
They should all work now. Sorry my first quick fix did not do the job. I tested the new one (in launchpad) and it does the job. Massimo On Feb 22, 8:48 am, Jim wrote: > I've copied the files from launchpad newer than 1.56.3 down to my > system (linux), then restarted web2py.  That might not be

[web2py:16690] DAL mssql DSN connection

2009-02-22 Thread carlo
I am going to port an application developed in Karrigell to web2py: RDBMS was DB2 on as400. In my actual version I connected through DSN and pyodbc this way: db400=pyodbc.connect("DSN=myAS400;UID=myUID;PWD=myPWD") How can I get a DSN connection through SQLDB? thank you carlo --~--~-~-

[web2py:16691] Re: Can hardcron work without being triggered by a request?

2009-02-22 Thread Iceberg
On Feb22, 8:37pm, AchipA wrote: > I think I know what's causing the issue, try the following as your > web2py.py instead of the original one: > > #!/usr/bin/python > # -*- coding: utf-8 -*- > > import os > import sys > > path = os.path.dirname(os.path.abspath(__file__)) > if not path in sys.path:

[web2py:16692] Ubuntu Apache server setup problem

2009-02-22 Thread cadrentes
Linux user: 2 yrs Web2py user: 2 days I don't know how to phrase this problem. I'm trying to set up a server. I get this http://65.49.60.137/ when following the instructions in the guide instead of the html. Any ideas? --~--~-~--~~~---~--~~ You received this m

[web2py:16693] Re: DAL mssql DSN connection

2009-02-22 Thread mdipierro
We do not have DB2 support but if you are available to run some tests we can have that in a couple of days. I will email you a new sql.py for you to test later today. Massimo On Feb 22, 9:47 am, carlo wrote: > I am going to port an application developed in Karrigell to web2py: > RDBMS was DB2  

[web2py:16694] Re: Ubuntu Apache server setup problem

2009-02-22 Thread mdipierro
Welcome. your Apache is not running web2py. You need to setup mod_proxy (easy) or mod_wsgi (difficult but better for production). I suggest you download http://mdp.cti.depaul.edu/examples/static/web2py_manual_cut.pdf for deployment instructions. Let us know if you have problems and we will he

[web2py:16695] Re: Can hardcron work without being triggered by a request?

2009-02-22 Thread mdipierro
> I don't have a python 2.5 Mind that web2py requires 2.5 unless you run the binary distribution. we do not gurantee things work with 2.4 or 2.6. Massimo On Feb 22, 10:19 am, Iceberg wrote: > On Feb22, 8:37pm, AchipA wrote: > > > > > I think I know what's causing the issue, try the following

[web2py:16696] Re: Ubuntu Apache server setup problem

2009-02-22 Thread AchipA
Do we have anybody who is a registered Debian developer on this list ? I have some scripts which generate deb packages for ubuntu and debian, but I don't think they are worth much unless they get into the official repositories. mdipierro wrote: > Welcome. > > your Apache is not running web2py. >

[web2py:16697] Authentication Problem !

2009-02-22 Thread Yannick
Hello mate, Here is what I have in my controller: def login(): formlog = auth.login(next="profile") return dict(form=formlog) @auth.requires_login(): def profile(): if not auth.is_logged_in(): return dict(form=auth.login(next="login")) else: return dict(msg="Welco

[web2py:16698] web2py "AJAX" admin editor

2009-02-22 Thread Boris Manojlovic
Hello to All, i have started to work on something called "ajax" code editor. What exactly does it mean? 1. No need for reloads on editor page (just think about undo redo in editor window) 2. No "terrible loss of code" if you are logged out (application timeout... with that "great" red

[web2py:16699] Re: web2py "AJAX" admin editor

2009-02-22 Thread Boris Manojlovic
Please try this patch last one was non working... On Sun, Feb 22, 2009 at 7:16 PM, Boris Manojlovic < boris.manojlo...@gmail.com> wrote: > Hello to All, > > i have started to work on something called "ajax" code editor. > What exactly does it mean? > >1. No need for reloads on editor page (j

[web2py:16700] Re: web2py "AJAX" admin editor

2009-02-22 Thread Jurgis Pralgauskis
has anybody tried http://knoboo.com/ ? maybe it would be good idea to somehow join development I am asking, because I am trying to make interactive online python tutorial system (http://84.55.3.131:801/ ) and now looking around for available sollutions... On Sun, Feb 22, 2009 at 8:43 PM, Bori

[web2py:16701] Does new CRUD have T2 Style Stamping?

2009-02-22 Thread jlegler
T2 had a cool feature that would show when a table was updated and by whom as long as the appropriate fields existed in the table (created_by_ip, created_on, created_by, created_signature, modified_by_ip, modified_on, modified_by, modified_signature). Does the new Crud class have any of that func

[web2py:16702] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread Jose C
Creating new app using postgresql, encountered same error as OP. Downloaded latest trunk (rev:738) and the error no longer appears, however the registration form at /app/default/user/register/ does nothing and throws no errors either. Tried the above URL with the most basic example of: def user()

[web2py:16703] Re: web2py "AJAX" admin editor

2009-02-22 Thread Phyo Arkar
Have you tried curnchy? Its online python tutorial system , very nice one. *>Crunchy* is an application that formats and delivers html-written Python tutorials >inside a browser window, adding interactive elements and snazzy >navigation *...* http://code.google.com/p/*crunchy*/ On Sun, Feb 22, 2

[web2py:16704] Re: web2py "AJAX" admin editor

2009-02-22 Thread Phyo Arkar
knoboo is interesting project. How about we Persuade them to use Web2py ? They just started to use Django. On Sun, Feb 22, 2009 at 7:56 PM, Phyo Arkar wrote: > Have you tried curnchy? > > Its online python tutorial system , very nice one. > > *>Crunchy* is an application that formats and delivers

[web2py:16705] Re: DAL mssql DSN connection

2009-02-22 Thread carlo
massimo, I do not need native db2 support I always had access via odbc ( I like pyodbc ), I was just wondering how I can have a connection through a DSN (very common in windows environment) instead of using the usual connection string. I found something in one thread here but nothing official in t

[web2py:16706] Re: Authentication Problem !

2009-02-22 Thread mdipierro
In your code @auth.requires_login() def profile(): if not auth.is_logged_in(): return dict(form=auth.login(next="login")) else: return dict(msg="Welcome") because of @auth.requires_login() auth.is_logged_in() is always true The validator, is user is not logged in,

[web2py:16707] Re: Does new CRUD have T2 Style Stamping?

2009-02-22 Thread mdipierro
Yes but different syntax If you CRUD timestamps if a table has a filed called "modified_by", etc. In the latest web2py there is no such convention but if a table has a field SQLField("modified_by","datetime",default=request.now, update=request.now, writable=False) has the same effect. Nothing

[web2py:16709] Re: DAL mssql DSN connection

2009-02-22 Thread mdipierro
Even if you use odbc, don't you you still need to generate SQL statements in the DB2 SQL dialects? Massimo On Feb 22, 2:01 pm, carlo wrote: > massimo, I do not need native db2 support I always had access via odbc > ( I like pyodbc ), I was just wondering how I can have a connection > through a

[web2py:/] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
Nice patch. Can you explain how does it solve the "loss of code issue"? Massimo On Feb 22, 12:16 pm, Boris Manojlovic wrote: > Hello to All, > > i have started to work on something called "ajax" code editor. > What exactly does it mean? > >    1. No need for reloads on editor page (just think a

[web2py:16710] Re: [web2py:/] Re: web2py "AJAX" admin editor

2009-02-22 Thread Yarko Tymciurak
crunchy looks "lovely" ... I'll have to play w/ this... On Sun, Feb 22, 2009 at 2:18 PM, mdipierro wrote: > > Nice patch. Can you explain how does it solve the "loss of code > issue"? > > Massimo > > On Feb 22, 12:16 pm, Boris Manojlovic > wrote: > > Hello to All, > > > > i have started to work

[web2py:16711] Re: Authentication Problem !

2009-02-22 Thread Yannick
Oh Thanks Massimo I completely forgot about the "auth.settings.login_url...". Here my new code: auth.settings.login_url=URL(r=request,f='login') def login(): return dict(form=auth.login(next="profile")) @auth.requires_login() def profile(): return dict(Welcome="Welcome") How can I retr

[web2py:16712] Re: DAL mssql DSN connection

2009-02-22 Thread Yarko Tymciurak
yes - there are two things you are talking about here, Carlo - How do I connect to the DB server so it will listen to me? That you have answered with pyodbc.connect(); And what will you say to it? --- Simply, with web2py your choices are literally two, but practically one: - you can write all th

[web2py:16713] Re: [web2py:/] Re: web2py "AJAX" admin editor

2009-02-22 Thread Yarko Tymciurak
played... this is ... pretty "crunchy" at the moment... interesting idea though... On Sun, Feb 22, 2009 at 2:41 PM, Yarko Tymciurak wrote: > crunchy looks "lovely" ... I'll have to play w/ this... > > > On Sun, Feb 22, 2009 at 2:18 PM, mdipierro wrote: > >> >> Nice patch. Can you explain how doe

[web2py:16714] Re: Trailing slash

2009-02-22 Thread Jim
Works great! Thanks again. On Feb 22, 7:35 am, mdipierro wrote: > They should all work now. Sorry my first quick fix did not do the job. > I tested the new one (in launchpad) and it does the job. > > Massimo > > On Feb 22, 8:48 am, Jim wrote: > > > I've copied the files from launchpad newer th

[web2py:16715] Re: Authentication Problem !

2009-02-22 Thread mdipierro
I am not sure I fully understand so I give you two answers. A) Before redirection you should set session.flash="message" instead of response.flash="message" The former is copied in the latter automatically before redirection. B) The messages generated by the auth method all set session

[web2py:16716] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
Basically he have this http://mdp.cti.depaul.edu/appliances/default/show/23 it just needs to customized to you expose the functions you want to expose and have the proper look and feel. Of course you cannot safely sandbox python. Massimo On Feb 22, 12:59 pm, Jurgis Pralgauskis wrote: >  

[web2py:16717] Re: Trailing slash

2009-02-22 Thread mdipierro
Thank you for reporting the problem. Massimo On Feb 22, 3:24 pm, Jim wrote: > Works great! > > Thanks again. > > On Feb 22, 7:35 am, mdipierro wrote: > > > They should all work now. Sorry my first quick fix did not do the job. > > I tested the new one (in launchpad) and it does the job. > > >

[web2py:16718] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
the web based shell I refer to below has different "modes". You can set it so that it returns escaped text or unescaped HTML. It can be used to return charts for example or other formatted text. Massimo On Feb 22, 3:38 pm, mdipierro wrote: > Basically he have this > > http://mdp.cti.depaul.

[web2py:16719] Re: DAL mssql DSN connection

2009-02-22 Thread carlo
Yarko and Massimo, both of you are right of course: I did not use any DAL or ORM before web2py and sometimes I feel lost without my traditional sql statements. To say it all, I would not be perfectly persuaded that we need a DAL in place of a traditional SQL if I had not seen what additional advan

[web2py:16720] Multicolumn CSS

2009-02-22 Thread Joe Barnhart
I'm having a conceptual problem. Eventually I would like to implement a web site that has more than one column of information. These columns would be in different divisions and controlled by a CSS style sheet. My difficulty comes from this -- how do I support multiple columns with only one cont

[web2py:16721] Re: [web2py:/] Re: web2py "AJAX" admin editor

2009-02-22 Thread Boris Manojlovic
In current form it does not do that :) Not in real sense of it, as I still did not fixed "issue" with session expiration (it is currently just avoidance of reload - and "loss of code" because of re-login process ;)) and as such it is still not a finished product :\ Will try to see where to patch in

[web2py:16722] Re: Multicolumn CSS

2009-02-22 Thread mdipierro
You have various options and it really depends on the logic behind the two columns. If one the second column is independent on the main controller you can just implement it in layout. If the two columns are both generated by the action you can use web2py's html functions. example: views/layout.

[web2py:16723] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
If you tell me this is the only missing feature I can easily add an ajax ping to keep alive the session. Massimo On Feb 22, 4:06 pm, Boris Manojlovic wrote: > In current form it does not do that :) > Not in real sense of it, as I still did not fixed "issue" with session > expiration (it is curr

[web2py:16724] Re: web2py "AJAX" admin editor

2009-02-22 Thread AchipA
I wouldn't mind a solution with the new tab/jquery popup does the re- login, especially if we make it work with generic forms. Keepalive is not that good as that would make session timeout/expiry pointless (IMO kind of paradoxical to be the same page that sets the timeout to do the keepalive to av

[web2py:16725] Re: DAL mssql DSN connection

2009-02-22 Thread Yarko Tymciurak
Hello Carlo - (I refer to the latest trunk, which is close enough if you are using 1.55.2 or 3): gluon/sql.py: line 64: try: import pyodbc # right now, this is for MSSQL support; we'll expand, fix the message which now says "no MSSQL driver" ;-) You'll note that around line 645 (__init__),

[web2py:16726] Textarea on SQLFORM

2009-02-22 Thread murray3
I have been enjoying the flexibiity of web2py, and my app idea is progressing well, it is something I have been contemplating for a long time and I will release it when I get it to a suitable stage as to take it further it needs to be open source. So with that in mind, I would like to solve my mo

[web2py:16727] Authentication and authorization

2009-02-22 Thread weheh
I'm trying to figure out how to create user registration, login and login pages, etc. for purposes of authentication. Then I want to set various levels of authorization so that different users have various levels of access to protected pages in my site. The documentation on this topic is a bit ob

[web2py:16728] Hierarchical object

2009-02-22 Thread weheh
I'm trying to create a hierarchical database object: db.define_table('object', SQLField('oid','integer',default=0),# id of parent object SQLField('name','string'), SQLField('description','text') ) When I insert a new obj

[web2py:16729] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread Jose C
To confirm, the other functions work with sqlite (except for a bug in chg password, which I'll open another thread on). JC --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this

[web2py:16730] auth change_password bug

2009-02-22 Thread Jose C
Using the auth module change_password form at app/default/user/ change_password provides feedback that the password has been changed ok, however it sets the password to NULL in the db, effectively blocking that user from logging in again. This was tested with latest trunk version (ver 740) and wi

[web2py:16731] Re: Authentication and authorization

2009-02-22 Thread weheh
OK, so after further investigation, I decided to follow the tutorial on http://mdp.cti.depaul.edu/examples/default/tools#authorization and have run into some issues. I'm running web2py 1.56: 0) I tried to import Recaptcha but it caused an error: ImportError: cannot import name Recaptcha 1) I

[web2py:16732] Re: web2py "AJAX" admin editor

2009-02-22 Thread mr.freeze
It would be nice if the keepalive was generic so that it could be used in your own controller: In a controller function: response.keepalive=6 In web2py_ajax.html $(document).read function: {{if response.keepalive:}} setInterval("$.post(document.forms[0].action);", {{=response.keepalive}}); {

[web2py:16733] Re: Hierarchical object

2009-02-22 Thread Yarko Tymciurak
On Feb 22, 6:31 pm, weheh wrote: > I'm trying to create a hierarchical database object: > db.define_table('object', >                 SQLField('oid','integer',default=0),            # id of > parent object >                 SQLField('name','string'), >                 SQLField('description','te

[web2py:16734] Re: Authentication Problem !

2009-02-22 Thread Yarko Tymciurak
yes, and set session flash in your controller (not your view); On Feb 22, 3:32 pm, mdipierro wrote: > I am not sure I fully understand so I give you two answers. > > A) Before redirection you should set > >    session.flash="message" > > instead of > >    response.flash="message" > > The former

[web2py:/] Re: DAL mssql DSN connection

2009-02-22 Thread mdipierro
Hi Carlo, I added experimental DB2 support to sql.py (in trunk now). 1) make sure you have pyodbc 2) download the trunk 3) run cd gluon python sql.py 'db2:DSN=myAS400;UID=myUID;PWD=myPWD' Let me know what happens. Please email me personally. Massimo On Feb 22, 9:47 am, carlo wrote: > I am

[web2py:16736] Re: auth change_password bug

2009-02-22 Thread mdipierro
Are you using a custom table_user? On Feb 22, 7:01 pm, Jose C wrote: > Using the auth module change_password form at app/default/user/ > change_password provides feedback that the password has been changed > ok, however it sets the password to NULL in the db, effectively > blocking that user fro

[web2py:16737] Re: Authentication and authorization

2009-02-22 Thread mdipierro
On Feb 22, 7:04 pm, weheh wrote: > OK, so after further investigation, I decided to follow the tutorial > onhttp://mdp.cti.depaul.edu/examples/default/tools#authorizationand > have run into some issues. I'm running web2py 1.56: > > 0) I tried to import Recaptcha but it caused an error: >     Im

[web2py:16738] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
we can have this in admin but not everywhere since requires modifing every app layout. On Feb 22, 7:09 pm, "mr.freeze" wrote: > It would be nice if the keepalive was generic so that it could be used > in your own controller: > > In a controller function: > response.keepalive=6 > > In web2py_

[web2py:16739] Re: auth change_password bug

2009-02-22 Thread Jose C
Hi Massimo, no, no custom table_user set. --~--~-~--~~~---~--~~ 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 this group, send

[web2py:16740] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread mdipierro
I count on you for a patch on this. If you need help debug it please email me. On Feb 22, 6:55 pm, Jose C wrote: > To confirm, the other functions work with sqlite (except for a bug in > chg password, which I'll open another thread on). > > JC --~--~-~--~~~---~--~

[web2py:16741] Re: auth change_password bug

2009-02-22 Thread mdipierro
odd. works for me with sqlite. --~--~-~--~~~---~--~~ 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 this group, send email to

[web2py:16742] Re: web2py "AJAX" admin editor

2009-02-22 Thread mr.freeze
So I should avoid making patches that alter web2py_ajax.html? I ask because I have a couple that I am working on now that require modifying it. On Feb 22, 7:38 pm, mdipierro wrote: > we can have this in admin but not everywhere since requires modifing > every app layout. > > On Feb 22, 7:09 pm,

[web2py:16743] Re: Ubuntu Apache server setup problem

2009-02-22 Thread cadrentes
Thanks so much for your response. I've followed the instructions but it is unclear to me how to (from pg. 52)..."By default, web2py runs the web server on 127.0.0.1:8000 but, you can run it on any available IP address and port..." When I start web2py I get: default applications appear to be ins

[web2py:16744] Re: auth change_password bug

2009-02-22 Thread Jose C
very odd. I just tried again, created another 2 users, verified emails, logged in, changed their passwords. Check the db and the passwords are now NULL. Logging out and trying to login again fails (naturally). sqlite3 that comes with python 2.5.2. web2py rev 740 winxp sp3 Perhaps someone else

[web2py:16745] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread Jose C
> I count on you for a patch on this. If you need help debug it please > email me. lol, I'll see what I can do but can't promise anything. Evaluating web2py and django for a new project that has to start very soon so not sure how much time I'll have to help debug... One thing concerns me... reg

[web2py:16746] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread Jose C
Update: So previous report was with ver. 738. With ver. 740 I now get a traceback when clicking submit button in form at app/default/user/ register: File "c:\web2py\gluon\sql.py", line 630, in **b) ProgrammingError: value too long for type character varying(32) Hopefully that's meaningfu

[web2py:16747] Re: Textarea on SQLFORM

2009-02-22 Thread Yarko Tymciurak
Something like this works - but you may not want to define your own template: in models/db.py: db.define_table('comment', SQLField( 'comment','text', length=256 )) then in controllers/default.py: def myform(): form=SQLFORM(db.comment, _style='width:100%') # this gets insert

[web2py:16748] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
Not necessairily What patches are you thinking about? What do other people think about the keepalive in web2py_ajax.html? Perhaps my judgment was premature. Massimo On Feb 22, 7:50 pm, "mr.freeze" wrote: > So I should avoid making patches that alter web2py_ajax.html? I ask > because I have a co

[web2py:16749] Re: Authentication Problem !

2009-02-22 Thread Yannick
Thanks Massimo and Yarko, The problem here is the redirect is done implicitly using the decorator pattern... It is done inside the method "requires_login()" of tools.py. I guess one solution should have been to put the session.flash message inside the "requires_login()" BUT I'm not allow to do so

[web2py:16750] Re: Ubuntu Apache server setup problem

2009-02-22 Thread mdipierro
Thank you for using web2py. On Feb 22, 8:01 pm, cadrentes wrote: > Thanks so much for your response. > > I've followed the instructions but it is unclear to me how to (from > pg. 52)..."By default, > web2py runs the web server on 127.0.0.1:8000 but, you can run it on > any > available IP address

[web2py:16751] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread mdipierro
Yes got it. The length of one of the fields is too small. Uploading a fix in trunk! Massimo On Feb 22, 8:28 pm, Jose C wrote: > Update: > So previous report was with ver. 738.  With ver. 740 I now get a > traceback when clicking submit button in form at app/default/user/ > register: > >  File "

[web2py:16752] Re: auth change_password bug

2009-02-22 Thread mdipierro
Of course. Silly me. It did not work for me either. I just run the wrong test. It is fixed now in trunk. The postgresql should be fixed as well. Please give it a try. Massimo On Feb 22, 8:04 pm, Jose C wrote: > very odd.  I just tried again, created another 2 users, verified > emails, logged

[web2py:16753] Re: Does new CRUD have T2 Style Stamping?

2009-02-22 Thread jlegler
That is actually a much more graceful way of doing it. That works great, thanks. On Feb 22, 12:11 pm, mdipierro wrote: > Yes but different syntax > > If you CRUD timestamps if a table has a filed called "modified_by", > etc. > > In the latest web2py there is no such convention but if a table ha

[web2py:16754] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
Boris. I really like this but we need 1) make hash value visible and readonly 2) return the same when it was saved as well 3) some kind of notification (possibly in the form of flash) that informs the user if the file was saved or not. Massimo On Feb 22, 12:43 pm, Boris Manojlovic wrote: > Ple

[web2py:16755] This seems like it should be easy, but checkboxes are killing me in custom forms.

2009-02-22 Thread jlegler
If I have a custom form, I seem to always have the checkbox returning the same result whether it is checked or not. Does anyone have any examples on how to make the checkbox return different results depending on whether it is checked or not? All I want to do is have the checkbox represent whethe

[web2py:16756] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
In principle all we need is something like this setInterval("ajax(url,source,target)",6); where url is the callback url, source is a list of 'id' INPUT fields to be passed to the callback and target is the id of the INPUT field where to store the return value. Since it is optional I am not

[web2py:/] Re: This seems like it should be easy, but checkboxes are killing me in custom forms.

2009-02-22 Thread mdipierro
def check(): default=True form=FORM(INPUT(_type='checkbox',_name='check',value=default),INPUT (_type='submit')) if form.accepts(request.vars): if form.vars.check: response.flash='checked' else: response.flash='not checked' return dict(form=form) On Feb 22, 9:58 pm, jleg

[web2py:16758] Re: Ubuntu Apache server setup problem

2009-02-22 Thread Yarko Tymciurak
i On Feb 22, 8:01 pm, cadrentes wrote: > Thanks so much for your response. > > I've followed the instructions but it is unclear to me how to (from > pg. 52)..."By default, > web2py runs the web server on 127.0.0.1:8000 but, you can run it on > any > available IP address and port..." > > When I s

[web2py:16759] Re: Hierarchical object

2009-02-22 Thread weheh
Yarko, thanks, but I'm not sure I understand your answer. Here's what I want to do. An object contains zero or more other objects. The root object should have oid=0. The child objects should have oid=db.object.id. I want to set the parent object according to a drop-down menu showing the name of

[web2py:16760] Re: Textarea on SQLFORM

2009-02-22 Thread Yarko Tymciurak
ugh...never write email before dinner: On Sun, Feb 22, 2009 at 8:54 PM, Yarko Tymciurak wrote: > > Something like this works - but you may not want to define your own you may _want_ to define your own template > > template: > > in models/db.py: > db.define_table('comment', >

[web2py:16761] Re: auth change_password bug

2009-02-22 Thread Jose C
ok, change_password issue is fixed, thanks. Checking the postgresql issue next. On Feb 22, 7:24 pm, mdipierro wrote: > Of course. Silly me. It did not work for me either. I just run the > wrong test. > > It is fixed now in trunk. The postgresql should be fixed as well. > > Please give it a tr

[web2py:16762] Re: web2py "AJAX" admin editor

2009-02-22 Thread mr.freeze
> Not necessairily What patches are you thinking about? A simple class that lets you control the content of web2py_ajax.html itself from the controller. Namely, stylesheets, javascript includes and (more importantly) scripts in the $('document').ready function. I'm also experimenting with multi-

[web2py:16763] Re: Authentication and authorization

2009-02-22 Thread weheh
Hi Massimo, thanks for the reply. 0) I documented improperly before. I typed: from gluon.tools import Recaptcha I treid it again and still get: Traceback (most recent call last): File "/Users/mdipierro/web2py/gluon/restricted.py", line 98, in restricted File "C:/web2py/applications/QTRAX/mod

[web2py:16764] Re: web2py "AJAX" admin editor

2009-02-22 Thread mr.freeze
You wouldn't want to submit any data for the keep alive, right? This grabs the 'action' of the form and does a simple ajax post with no vars every 60 seconds: setInterval("$.post(document.forms[0].action);",6); On Feb 22, 10:02 pm, mdipierro wrote: > In principle all we need is something li

[web2py:16765] Re: Hierarchical object

2009-02-22 Thread mdipierro
This is one of the most efficient ways to archive hierarchical objects: http://groups.google.com/group/web2py/browse_thread/thread/70efddab62dfe73/e0bb08c988dca8cd Massimo On Feb 22, 10:59 pm, weheh wrote: > Yarko, thanks, but I'm not sure I understand your answer. Here's what > I want to do.

[web2py:16766] Re: Authentication and authorization

2009-02-22 Thread mdipierro
I cannot reproduce any of these. I am suing the trunk. Please email me your app. Massimo On Feb 22, 11:11 pm, weheh wrote: > Hi Massimo, thanks for the reply. > > 0) I documented improperly before. I typed: > from gluon.tools import Recaptcha > > I treid it again and still get: > Traceback (mos

[web2py:16767] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
I like this On Feb 22, 11:09 pm, "mr.freeze" wrote: > > Not necessairily What patches are you thinking about? > > A simple class that lets you control the content of web2py_ajax.html > itself from the controller.  Namely, stylesheets, javascript includes > and (more importantly) scripts in the $

[web2py:16768] Re: web2py "AJAX" admin editor

2009-02-22 Thread mdipierro
This of a wiki that locks a page as long as a user is looking at it in edit more. You may be looking different pages and thus you need to pass parameters in the keep alive. KPAX does this. Massimo On Feb 22, 11:12 pm, "mr.freeze" wrote: > You wouldn't want to submit any data for the keep alive,

[web2py:16769] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread Jose C
Ok, this issue too seems fixed in ver. 742. Tested the following: [app]/default/user/login [app]/default/user/logout [app]/default/user/register [app]/default/user/retrieve_password [app]/default/user/change_password Thanks for the quick resolution. Regards, Jose --~--~-~--~~--

[web2py:16770] Typo in Auth module setting variable name

2009-02-22 Thread Jose C
occurs twice in tools.py: self.messages.registration_succesful should be: successful Not a biggie but if people are overriding to customise it could bite someone. The above error is propagated in the docs at: http://mdp.cti.depaul.edu/examples/default/tools in line10 of the Custom Authenticati

[web2py:16771] Re: Possible bug with Auth using postgresql and web2py 1.56.2

2009-02-22 Thread mdipierro
Thanks for bringing this up and testing it. Massimo On Feb 22, 11:32 pm, Jose C wrote: > Ok, this issue too seems fixed in ver. 742.  Tested the following: > > [app]/default/user/login > [app]/default/user/logout > [app]/default/user/register > [app]/default/user/retrieve_password > [app]/defau

[web2py:16772] Re: Typo in Auth module setting variable name

2009-02-22 Thread mdipierro
Thanks. Fixed and uploading to trunk now. On Feb 22, 11:48 pm, Jose C wrote: > occurs twice in tools.py: > > self.messages.registration_succesful > should be: successful > > Not a biggie but if people are overriding to customise it could bite > someone. > > The above error is propagated in the d

[web2py:16773] How do I use the Internationalization support?

2009-02-22 Thread Jason Brower
I see the feature, I know the theory, but I can't seem to find documentation on how to start using it in my application. For example, I want to create a menu where I can select the language that the session will use. Regards, Jason Brower --~--~-~--~~~---~--~~ You

[web2py:16774] Re: How do I use the Internationalization support?

2009-02-22 Thread mdipierro
Say you have this action def index(): return(message="Hello world") first you markup the string def index(): return(message=T("Hello world")) then you go the admin|design|languages and you create a language file for every language you want to create. For example for italian, it would b

[web2py:16775] Re: Hierarchical object

2009-02-22 Thread richard_gor...@verizon.net
I'm sorry, I don't think I'm making myself clear. The issue is not with setting up a hierarchy nor with traversing the hierarchy. The issue is with data entry. I want to enter the parent of my object from a pull-down list so that I don't accidentally select the wrong parent (by having to enter a

[web2py:16776] Re: Hierarchical object

2009-02-22 Thread richard_gor...@verizon.net
p.s. Massimo, thanks for the links and the example. Very helpful. --~--~-~--~~~---~--~~ 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 unsubscri

[web2py:16777] Re: Authentication Problem !

2009-02-22 Thread mdipierro
Just set these: auth.messages.invalid_login auth.messages.logged_in Massimo On Feb 22, 9:05 pm, Yannick wrote: > Thanks Massimo and Yarko, > Theproblemhere is the redirect is done implicitly using the > decorator pattern... It is done inside the method "requires_login()" > of tools.py.  I gues

[web2py:16778] Re: Hierarchical object

2009-02-22 Thread mdipierro
The simplest ways (not necessarily the best) are: 1) db.object.oid.requires=IS_NULL_OR(IS_IN_DB(db,'object.id','%(name)s')) or 2) all trees have a root. Create a dummy root object. Massimo On Feb 23, 12:30 am, "richard_gor...@verizon.net" wrote: > I'm sorry, I don't think I'm making myself

[web2py:16780] Re: Typo in Auth module setting variable name

2009-02-22 Thread Jose C
I also just noticed that in the docs, line 11 and line 16 in the custom auth section are duplicates. Again someone might copy the code and change the first line only to have it overridden by the second occurrence. On Feb 22, 9:56 pm, mdipierro wrote: > Thanks. Fixed and uploading to trunk now

[web2py:/] Re: How do I use the Internationalization support?

2009-02-22 Thread Jason Brower
Oh, forgot all about that feature in the browser. Thanks! Regards, Jason Brower On Sun, 2009-02-22 at 22:08 -0800, mdipierro wrote: > Say you have this action > > def index(): return(message="Hello world") > > first you markup the string > > def index(): return(message=T("Hello world")

[web2py:16781] Re: Authentication and authorization

2009-02-22 Thread richard_gor...@verizon.net
OK, problem solved. I just updated my web2py with the latest version and now it all works. Sorry for the false alarm. I thought I had just updated my version, but I guess I was still a little out of date. --~--~-~--~~~---~--~~ You received this message because you a

[web2py:16782] Re: Hierarchical object

2009-02-22 Thread richard_gor...@verizon.net
> all trees have a root. Create a dummy root object. Good answer. --~--~-~--~~~---~--~~ 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 unsubsc