[web2py:37152] check_credentials not working (for me)

2009-12-14 Thread selecta
if not gluon.fileutils.check_credentials(request): redirect(URL(a='admin', c='default', f='index')) Whenever this line is in my code I always get redirected, I have no idea what to do to avoid that (other than commenting out this line). I access the server from localhost with an normal http reque

[web2py:37153] Re: HELP with new DAL

2009-12-14 Thread DenesL
About uploads folder, is the problem that hg does not allow empty folders? None of the apps in the hg repository (including welcome) have an uploads folder. With rev.30: Traceback (most recent call last): File "C:\web2py\hg\gluon\restricted.py", line 173, in restricted exec ccode in environ

[web2py:37154] Oddity with crm applicance (?)

2009-12-14 Thread Miguel Lopes
I'm posting this reluctantly, because I would expect to be doing something wrong. However I can't figure out what is wrong. Playing around with the CRM appliance I introduced a simple ajax search. Strangely the target div gets loaded with a copy of the entire page. My view is as simple as it could

[web2py:37155] Re: Oddity with crm applicance (?)

2009-12-14 Thread Miguel Lopes
On Mon, Dec 14, 2009 at 12:58 PM, Miguel Lopes wrote: > I'm posting this reluctantly, because I would expect to be doing > something wrong. However I can't figure out what is wrong. > > Playing around with the CRM appliance I introduced a simple ajax > search. Strangely the target div gets loaded

[web2py:37156] Re: check_credentials not working (for me)

2009-12-14 Thread mdipierro
I am not sure the behavior you experience is wrong. Is this about appadmin? Did you try after login in admin? can you show us the workflow you experience and what you expect? Which web2py version? Massimo On Dec 14, 4:06 am, selecta wrote: > if not gluon.fileutils.check_credentials(request): > r

[web2py:37157] Re: HELP with new DAL

2009-12-14 Thread DenesL
Also, testing DB2: Traceback (most recent call last): File "C:\web2py\hg\gluon\restricted.py", line 173, in restricted exec ccode in environment File "C:/web2py/hg/applications/nav3/models/db.py", line 5, in dot4=SQLDB('db2:DSN=dot4;UID=web2py;PWD=xxx') File "C:\web2py\hg\gluon\sql

[web2py:37158] Re: Oddity with crm applicance (?)

2009-12-14 Thread mdipierro
The view of the action served via ajax should NOT {{extend 'layout.html'}}. On Dec 14, 6:58 am, Miguel Lopes wrote: > I'm posting this reluctantly, because I would expect to be doing > something wrong. However I can't figure out what is wrong. > > Playing around with the CRM appliance I introduce

Re: [web2py:37159] Re: Oddity with crm applicance (?)

2009-12-14 Thread Miguel Lopes
On Mon, Dec 14, 2009 at 2:29 PM, mdipierro wrote: > The view of the action served via ajax should NOT {{extend > 'layout.html'}}. I suppose / expect this is only the case with the crm appliance? And, that the wiki example provided in the book correctly extends layout, as if this is not the case h

[web2py:37160] Re: HELP with new DAL

2009-12-14 Thread mdipierro
Can you reproduce this with the latest trunk? Is SQLAdapter.represent_exception being called? What does it return? On Dec 14, 5:51 am, DenesL wrote: > About uploads folder, is the problem that hg does not allow empty > folders? > None of the apps in the hg repository (including welcome) have an

[web2py:37161] Re: HELP with new DAL

2009-12-14 Thread mdipierro
This I fixed, please try again. Thanks Denes. Your tests help a lot. On Dec 14, 8:27 am, DenesL wrote: > Also, testing DB2: > > Traceback (most recent call last): >   File "C:\web2py\hg\gluon\restricted.py", line 173, in restricted >     exec ccode in environment >   File "C:/web2py/hg/applicatio

[web2py:37162] Re: Oddity with crm applicance (?)

2009-12-14 Thread mdipierro
The page has layout. pieces of the page loadad via ajax do not need to declare {{extend 'layout.hml'}} but they do have automatically the same look and feel because they are embedded in the same page that has the layout. On Dec 14, 8:37 am, Miguel Lopes wrote: > On Mon, Dec 14, 2009 at 2:29 PM,

Re: [web2py:37163] Re: Oddity with crm applicance (?)

2009-12-14 Thread Miguel Lopes
On Mon, Dec 14, 2009 at 2:41 PM, mdipierro wrote: > The page has layout. pieces of the page loadad via ajax do not need to > declare {{extend 'layout.hml'}} but they do have automatically the > same look and feel because they are embedded in the same page that has > the layout. I have no page ass

[web2py:37164] Re: Oddity with crm applicance (?)

2009-12-14 Thread mdipierro
I am sorry I misunderstood the problem. The {{extend 'layout.html'}} goes in the master page, the one doing the ajax call. I still do not understand the problem. I tried you code and it worked as I would expect, no page in page. Can you send me a screenshot? Massimo On Dec 14, 8:58 am, Miguel Lo

[web2py:37165] Re: HELP with new DAL

2009-12-14 Thread DenesL
That one seems fixed, but on insert: Traceback (most recent call last): File "C:\web2py\hg\gluon\restricted.py", line 173, in restricted exec ccode in environment File "C:/web2py/hg/applications/nav3/controllers/appadmin.py", line 305, in File "C:\web2py\hg\gluon\globals.py", line 96, i

[web2py:37166] Re: HELP with new DAL

2009-12-14 Thread DenesL
represent_exception is not called: Traceback (most recent call last): File "C:\web2py\hg\gluon\restricted.py", line 173, in restricted exec ccode in environment File "C:/web2py/hg/applications/nav3/controllers/appadmin.py", line 305, in File "C:\web2py\hg\gluon\globals.py", line 96, in

[web2py:37167] Re: HELP with new DAL

2009-12-14 Thread Yarko Tymciurak
On Dec 14, 5:51 am, DenesL wrote: > About uploads folder, is the problem that hg does not allow empty > folders? > None of the apps in the hg repository (including welcome) have an > uploads folder. > ... the problem is that web2py assumed the existence of these folders, and did not handle it if t

[web2py:37168] Re: Oddity with crm applicance (?)

2009-12-14 Thread mdipierro
Thanks for sending me the screenshots. Now I see the problem: search_input=INPUT(_id='keyword', _onkeyup="ajax('bg_find', ['keyword'], 'target_div');") should be search_input=INPUT(_id='keyword', _onkeyup="ajax('%s',['keyword'], 'target_div');" % URL(r=request,f='bg_find')) else it inte

[web2py:37169] Re: HELP with new DAL

2009-12-14 Thread Fran
On Dec 13, 5:27 am, mdipierro wrote: > I am rewriting the DAL to make more modular. 75% is done and it is in > trunk. > Please take a look. I need one official tester for each supported > database backend (except sqlite since I can do that) Am using sqlite with r1455, the below code breaks when t

Re: [web2py:37170] Re: Oddity with crm applicance (?)

2009-12-14 Thread Miguel Lopes
Thanks for the help and solution! How did you manage to see the difference in the call? I can see it using Firebug? I will post it on the group for the benefit of others. br, Miguel On Mon, Dec 14, 2009 at 3:56 PM, mdipierro wrote: > Thanks for sending me the screenshots. Now I see the problem:

[web2py:37171] Re: HELP with new DAL

2009-12-14 Thread Fran
On Dec 13, 5:27 am, mdipierro wrote: > Comments are appreciated. Hope this is going in the direction that > people expect. Yes, I like the idea of this :) I am keen to add some support for spatial queriesusing spatial functions where supported at the back-end (PostGIS & Spatialite), but fall

[web2py:37172] Re: HELP with new DAL

2009-12-14 Thread mdipierro
For now I have reverted trunk to the old DAL. The new DAL has moved in dal.py. I will post this as 1.74.1 stable since there are some old fixes collected over time. If you want to test the new DAL do cp gluon/dal.py gluon/sql.py Completing the new DAL will take another week or two probably. 1.

[web2py:37173] Re: Oddity with crm applicance (?)

2009-12-14 Thread mdipierro
I just saw the effect and reminded of a similar problem in the past. On Dec 14, 10:03 am, Miguel Lopes wrote: > Thanks for the help and solution! > How did you manage to see the difference in the call? I can see it > using Firebug? > > I will post it on the group for the benefit of others. > br,

Re: [web2py:37174] Re: Oddity with crm applicance (?)

2009-12-14 Thread Miguel Lopes
On Mon, Dec 14, 2009 at 4:14 PM, mdipierro wrote: > I just saw the effect and reminded of a similar problem in the past. Txs for the help. I was going nuts! Miguel -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send ema

Re: [web2py:37175] CRYTICAL: Contributor Agreement

2009-12-14 Thread Wes James
Here are some examples of how django and plone do this: http://plone.org/foundation/contributors-agreement/agreement.pdf/view http://www.djangoproject.com/foundation/cla/ Do you need to request more specific permissions by the company if it is done on company time? I'm not sure if just putting d

[web2py:37176] Re: CRYTICAL: Contributor Agreement

2009-12-14 Thread mdipierro
You have to put the name of the company only of it is the company that is contributing and you are signing on behalf of the company. If this is your contribution, there is no need to say who your employer is. If this is good enough for SUN, it must be good enough for us. Massimo On Dec 14, 10:18 

[web2py:37177] web2py 1.74.1 is OUT

2009-12-14 Thread mdipierro
New features: - Moved to mercurial - Default validators use the new define_table(,format='...') - New get_vars and post_vars compatible in 2.5 and 2.6 (thanks Tim) - Major rewrite of gql.py extends DAL syntax on GAE, supports belongs - No more *.w2p, welcome.w2p is create automatically, base ap

Re: [web2py:37178] web2py 1.74.1 is OUT

2009-12-14 Thread Jonathan Lundell
On Dec 14, 2009, at 8:33 AM, mdipierro wrote: > - Moved to mercurial http://www.web2py.com/examples/default/download still says SVN. -- 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.

[web2py:37179] Re: web2py 1.74.1 is OUT

2009-12-14 Thread mdipierro
I fixed it on the web site On Dec 14, 10:35 am, Jonathan Lundell wrote: > On Dec 14, 2009, at 8:33 AM, mdipierro wrote: > > > - Moved to mercurial > > http://www.web2py.com/examples/default/downloadstill says SVN. -- You received this message because you are subscribed to the Google Groups "w

[web2py:37180] updated update script

2009-12-14 Thread Jonathan Lundell
Trivial change: remove update logic. #!/bin/bash # # update-web2py.sh # 2009-12-14 # # install as update-web2py.sh and make executable: # chmod +x web2py.sh # # save a snapshot of current web2py/ as web2py-version.zip # download the current released version of web2py # unzip downloaded vers

[web2py:37181] Re: updated update script

2009-12-14 Thread mdipierro
email it to me. Please thank you. Massimo On Dec 14, 11:11 am, Jonathan Lundell wrote: > Trivial change: remove update logic. > > #!/bin/bash > # > #  update-web2py.sh > #  2009-12-14 > # > #  install as update-web2py.sh and make executable: > #  chmod +x web2py.sh > # > #  save a snapshot of cu

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

2009-12-14 Thread Thadeus Burgess
I would like to accomplish the output of the below, but use SQLFORM, and not mess with sqlform.custom. form = FORM( FIELDSET( LEGEND("Your Information"), LABEL("Name:", _for="name"), INPUT(_name="name"), LABEL("Email:", _for="email"),

[web2py:37183] Re: Python 2.6 Errata

2009-12-14 Thread Timbo
Note to those reading. The fix for this bug was applied and release in 1.74.1 http://groups.google.com/group/web2py/browse_thread/thread/b33cb890cdd0a5a9 -tim On Dec 4, 9:46 am, mdipierro wrote: > Thank you! > > On Dec 4, 9:13 am, Timbo wrote: > > > @Alexandre: I understand that you're trying

[web2py:37184] how to use GAE remote api?

2009-12-14 Thread Dan
I need to do some bulk operations (eg delete) on data in the GAE datastore for a web2py application, and was trying to follow the example in the GAE docs here: http://code.google.com/appengine/articles/remote_api.html I can get the console up and running using the suggested appengine_console.py co

Re: [web2py:37185] Re: web2py 1.74.1 is OUT

2009-12-14 Thread Thadeus Burgess
Also you can specify custom options to the export_to_csv. export_to_csv(delimiter = ',', quotechar = '"', quoting = csv.QUOTE_MINIMAL) On Mon, Dec 14, 2009 at 10:46 AM, mdipierro wrote: > I fixed it on the web site > > > On Dec 14, 10:35 am, Jonathan Lundell wrote: >> On Dec 14, 2009, at 8:33

[web2py:37186] ImportError: No module named _scproxy

2009-12-14 Thread Felix
Hi, I am trying to deploy web2py on Google App Engine. I followed the instructions that were given at this link.http://www.web2py.com/ AlterEgo/default/show/186. I am getting the following error when I tried to run the application in the browser. Can someone please help. Thanks File "/Librar

[web2py:37187] Re: ImportError: No module named _scproxy

2009-12-14 Thread mdipierro
If you use GAE you must use Python 2.5. GAE only supports 2.5. Massimo On Dec 14, 11:42 am, Felix wrote: > Hi, >     I am trying to deploy web2py on Google App Engine. I followed the > instructions that were given at this link.http://www.web2py.com/ > AlterEgo/default/show/186. I am getting the

Re: [web2py:37188] Re: updated update script

2009-12-14 Thread Jonathan Lundell
On Dec 14, 2009, at 9:22 AM, mdipierro wrote: > email it to me. Please thank you. Here you are. I changed the comments to indicate that it should live in the parent of web2py/. I could change it to run as web2py/update-web2py.sh, but that means that it gets overwritten while executing, and in

[web2py:37189] How to implement tagging in web2py

2009-12-14 Thread Pystar
Hi , I am developing an app and i would like to implement tagging in it, how do i go about it? and is there a plugin for this? thanks pystar -- 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

[web2py:37190] Re: how to use GAE remote api?

2009-12-14 Thread Richard
try adding your application directory to sys.path On Dec 15, 5:35 am, Dan wrote: > I need to do some bulk operations (eg delete) on data in the GAE > datastore for a web2py application, and was trying to follow the > example in the GAE docs > here:http://code.google.com/appengine/articles/remot

[web2py:37191] Re: How to implement tagging in web2py

2009-12-14 Thread Mengu
hi, i'm recording a screencast on this, hopefully it would be a guide. On Dec 14, 10:27 pm, Pystar wrote: > Hi , > I am developing an app and i would like to implement tagging in it, > how do i go about it? and is there a plugin for this? > thanks > pystar -- You received this message because

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

2009-12-14 Thread DenesL
Many moons have passed since I last looked at this but if I remember correctly I went for a class that was based on SQLFORM (currently sitting in the back burner). SQLFORM mixes processing and presentation very tightly, which is fine for starters but you soon get to a point where you want to keep

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

2009-12-14 Thread Thadeus Burgess
Take, for example: http://jeffhowden.com/code/css/forms/ With a form design as such, you can turn it easily into http://www.jankoatwarpspeed.com/post/2009/09/28/webform-wizard-jquery.aspx A custom patch seems to be the most appropriate. Create a list, that represents the form, and use a functio

[web2py:37194] ldap authentication stopped working: "enter a valid email address"

2009-12-14 Thread Fred
LDAP authentication has been working fine for my apps up through version 1.72.3. But when I use 1.73.1 I always get a validation error on-screen for my username (a.k.a email) input field saying "enter a valid email address". I see that the Auth define_tables() function puts the IS_EMAIL validator

[web2py:37195] Re: How to implement tagging in web2py

2009-12-14 Thread selecta
if you are looking for tagging for multiple users, multiple records I imporved the basic tagging plugin http://groups.google.com/group/web2py/browse_thread/thread/4f9dfc4e9c4b5b27/8bc6a5909625e2ac?lnk=gst&q=tagging#8bc6a5909625e2ac not perfect yet ... like tag clounds don't have links yet but it's

[web2py:37196] Re: check_credentials not working (for me)

2009-12-14 Thread selecta
Ok sorry for the little info I log into the general admin (http://127.0.0.1:8000/admin/default/ index) I create an application I try to edit the database with appadmin.py but it just redirects me if I do not comment: if not gluon.fileutils.check_credentials (request): redirect(URL(a='admin', c='def

[web2py:37197] Excess whitespace in html

2009-12-14 Thread kbochert
In a view, I have a paginator with code that looks like: {{if ARGS.currentpage == 1:}} {{else:}} Prev {{pass}} {{for i in range(1,ARGS.pagecnt+1):}} {{if i == ARGS.currentpage:}} {{=i}} {{else:}} {{=i}}

[web2py:37198] GAE mkdir error

2009-12-14 Thread Richard
I uploaded an app to GAE and it triggered an error from trying to create a missing directory: File "/gluon/main.py", line 432, in wsgibase os.mkdir(path) AttributeError: 'module' object has no attribute 'mkdir' I have already run the app locally before uploading, so all the directories exist.

[web2py:37199] Re: Excess whitespace in html

2009-12-14 Thread mdipierro
I am open tu suggestions. Right now web2py does not introduce any additional \n. Any new line is already in the original template. You can do something like this in your controller def filter(d): import re if isinstance(d,dict): return re.compile('\n\n').sub('\n',response.render(

[web2py:37200] problem with DAL in shell using 1.74.1

2009-12-14 Thread Jake
I'm reading through the web2py book (second ed), and i've run into an immediate problem using the shell: === web2py Shell Version 1.74.1 (2009-12-14 10:05:21) In[0]: db = DAL('sqlite://storage.db') Out[0]: In[1]: db.define_table('person', Field('

[web2py:37201] Re: problem with DAL in shell using 1.74.1

2009-12-14 Thread mdipierro
Is this the web based shell? On Dec 14, 5:52 pm, Jake wrote: > I'm reading through the web2py book (second ed), and i've run into an > immediate problem using the shell: > > === > web2py Shell Version 1.74.1 (2009-12-14 10:05:21) > In[0]:  db = DAL(

[web2py:37202] Re: problem with DAL in shell using 1.74.1

2009-12-14 Thread Jake
On Dec 14, 8:06 pm, mdipierro wrote: > Is this the web based shell? > Yes, on Windows XP served from localhost with the included web server. ty Jake -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@go

[web2py:37203] Re: check_credentials not working (for me)

2009-12-14 Thread Yarko Tymciurak
On Dec 14, 5:49 pm, selecta wrote: > Ok sorry for the little info > I log into the general admin (http://127.0.0.1:8000/admin/default/ > index) > I create an application > I try to edit the database with appadmin.py but it just redirects me > if I do not comment: if not gluon.fileutils.check_cred

[web2py:37204] Re: how to use GAE remote api?

2009-12-14 Thread Richard
and as you said, you will need the __init__.py files On Dec 15, 8:45 am, Richard wrote: > try adding your application directory to sys.path > > On Dec 15, 5:35 am, Dan wrote: > > > I need to do some bulk operations (eg delete) on data in the GAE > > datastore for a web2py application, and was t

[web2py:37205] Re: problem with DAL in shell using 1.74.1

2009-12-14 Thread mdipierro
This is not a new problem unfortunately. There is some timeout issue with the sqlite diver. The problems is that the connection needs to be open server side for as long as the shell is open but the driver does not allow it. I have not found a way around this yet. If you or anybody has idea of how

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

2009-12-14 Thread DenesL
On Dec 14, 6:00 pm, Thadeus Burgess wrote: > Take, for example:  http://jeffhowden.com/code/css/forms/ Ah yes, that was one of the many pages I saw during my research. But even that is too static for me. I want to change the layout on the fly, even live, and to remember it. Can you see where I am

[web2py:37207] Re: web2py 1.74.1 is OUT

2009-12-14 Thread Yannick
Thanks the double redirect seems to be fixed in this release... On Dec 14, 1:45 pm, Thadeus Burgess wrote: > Also you can specify custom options to the export_to_csv. > > export_to_csv(delimiter = ',', quotechar = '"', quoting = csv.QUOTE_MINIMAL) > > On Mon, Dec 14, 2009 at 10:46 AM, mdipierro

[web2py:37208] Re: Fail login doesn't return an errorm msg

2009-12-14 Thread Yannick
Hello Massimo, Thanks I just test the new release and realized that the double redirect seem to be fixed on the Auth - Login I just wonder what was the root of the issue I got in the previous release... Thanks On Dec 12, 12:31 pm, Yannick wrote: > Hello Massimo, thanks for the note... > i di

Re: [web2py:37209] web2py 1.74.1 is OUT

2009-12-14 Thread Alex Fanjul
Hello Massimo, With the new characteristic of no need to upgrade, (if I didn't any change to admin or welcome) is it safe to just (copy over) overwrite entirely web2py folder and execute "python2.5 web2py.py" at least one time? Thanks Alex F El 14/12/2009 17:33, mdipierro escribió: > New featu

[web2py:37210] Re: Excess whitespace in html

2009-12-14 Thread DenesL
It all comes down to a trade off. Do you want you view or your final output to be legible and aesthetically pleasing according to some subjective human standard?. Don't get me wrong, I dislike the empty lines as much as you do but as Massimo said the view only outputs what it has: this view {{for

Re: [web2py:37211] web2py 1.74.1 is OUT

2009-12-14 Thread Massimo Di Pierro
It will only upgrade admin, welcome, examples and only overwrite those apps. It will not touch the other apps. Anyway. Make a backup first. ;-) Massimo On Dec 14, 2009, at 9:46 PM, Alex Fanjul wrote: > Hello Massimo, > With the new characteristic of no need to upgrade, (if I didn't any > cha

[web2py:37212] Re: Fail login doesn't return an errorm msg

2009-12-14 Thread mdipierro
I do not know. Glad it is fixed anyway. On Dec 14, 9:19 pm, Yannick wrote: > Hello Massimo, > Thanks I just test the new release and realized that the double > redirect seem to be fixed on the Auth - Login I just wonder what > was the root of the issue I got in the previous release... > > Tha

[web2py:37213] Re: web2py 1.74.1 is OUT

2009-12-14 Thread mdipierro
I made more changes in new DAL. It is broken badly now because it is in a the middle of a major change so that GAE and MongoDB can become simple adapters. Anyway, it passes some tests. You can try: cd gluon python dal.py Preliminary tests of the functions that work show that selects are 10

[web2py:37215] New features not documented in Book 2nd edition

2009-12-14 Thread DenesL
New features not documented in Book 2nd edition 1.74.1 * Moved to mercurial * Default validators use the new define_table(,format='...') http://groups.google.com/group/web2py/browse_thread/thread/35298fa6005a3a5b * New get_vars and post_vars compatible in 2.5 and 2.6 (thanks Tim) * Major rew

[web2py:37216] Re: Excess whitespace in html

2009-12-14 Thread mdipierro
The problem who is web2py supposed to know which spaces to keep and which to remove? To do it, it would need to "understand" the html by parsing and then re-writing it. First of all it is slow. Second, it can break the css since whitespaces affect css behavior. On Dec 14, 10:39 pm, Alex Fanjul

Re: [web2py:37217] Re: Excess whitespace in html

2009-12-14 Thread Jonathan Lundell
On Dec 14, 2009, at 8:39 PM, Alex Fanjul wrote: > But... what about pages size? > Doing some very basic test with Denes Example show us that including > blank lines increase the output page size by *x2 factor* at least (ie. > 67KB vs 130KB). > Maybe I'm wrong, but, forgetting server deflating (w

Re: [web2py:37218] Re: Excess whitespace in html

2009-12-14 Thread Alex Fanjul
Hi Jonathan, I attatched both html with a very simple example in the email showing double in size. Doesn't appear attached? I always write from Thunderbird, so let me know. Massimo, ,maybe not whitespaces but strip more than one consecutive blank lines? Alex F El 15/12/2009 7:37, Jonathan Lund