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

2009-12-15 Thread Alex Fanjul
Forget my last sentence, Slimmer seems much better solution as Jonathan point us. Alex F El 15/12/2009 8:59, Alex Fanjul escribió: > 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, s

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

2009-12-15 Thread Alex Fanjul
MongoDB nicee!!! I'm willing to see it! Alex F El 15/12/2009 5:34, mdipierro escribió: > 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:

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

2009-12-15 Thread villas
@Thadeus Thanks for raising this topic. Tables don't seem correct for laying out forms any more. So, should we assume that we're all heading in the direction of fieldsets? Surely fieldsets should eventually be the default. Maybe one way forward to is introduce a new option: renderfieldset=Fals

Re: [web2py:37222] Re: Markdown problem

2009-12-15 Thread Johann Spies
2009/11/26 mdipierro : > I took a second look. > WIKI('this is a test').xml() > 'this is a test\n' WIKI('this is a test',safe_mode=True).xml() > 'this [HTML_REMOVED]is[HTML_REMOVED] a test\n' WIKI('this is a test',safe_mode=False).xml() > 'this is a test\n' WIKI('this is

[web2py:37223] IronPython 2.6 Final is out

2009-12-15 Thread mr.freeze
http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=12482 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsub

[web2py:37224] Hosting at Webfaction

2009-12-15 Thread annet
I am planning to sign up for a Plan Shared 1 hosting account at WebFaction for production purposes. So far, I have been developing an application on my Mac, on which the web2py source code runs out of the box, and testing it on a Mac Server which I access using Apple Remote DeskTop. I read the post

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

2009-12-15 Thread selecta
I just tried again, here are the steps that i did downloaded web2py Version 1.74.1 logged into the admin created a new application "test" edited the db.py of test to contain db.define_table('mytable',Field('myfield','string')) then i click in the edit interface "database administration" (http:// 1

[web2py:37226] Multi language site, long texts

2009-12-15 Thread Arowana
Hello, I am constucting a multilanguage side, and for singe words and small sentaces the T("blablabla") works fine. But what to do about longer texts? Right now I am using this solution: {{extend 'layout.html'}} {{ if not (T.accepted_language == "fi-fi"): =XML('''Language 1 html in this stri

[web2py:37227] Translation issue

2009-12-15 Thread Andrea Cappelli
Hi List, I'm a web2py user since few months and now I'm dealing with 2 problems regarding translations 1) With latest release (1.74.1) I get no sentence translated. I have 2 files in languages/ (en.py and it.py) and some symlink (en-us.py, en- gb.py, it-it.py), but i receive always the text in ita

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

2009-12-15 Thread Alex Fanjul
Very good patch for tableless forms @Thadeus, I think it's a must for web2py to be tableless for at least to accomplish AA accesibility w3c. Alex F El 15/12/2009 0:00, Thadeus Burgess escribió: > Take, for example: http://jeffhowden.com/code/css/forms/ > > With a form design as such, you can tur

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

2009-12-15 Thread mdipierro
There is no reason to make SQLFORM more complex than it is. Why not move some of the SQLFORM logic into a new object SMARTFORM(?) and behaves like FORM but accepts Fields as helpers and processes them like SQLFORM? parhaps SQLFORM could be derived from such a beast. Massimo On Dec 15, 6:06 am, vi

[web2py:37230] Re: Markdown problem

2009-12-15 Thread mdipierro
XML(gluon.contrib.markdown.WIKI (page.body,safe_mode=False),sanitize=True)}} should be XML(gluon.contrib.markdown.WIKI(page.body,safe_mode=False).xml (),sanitize=True)}} On Dec 15, 7:31 am, Johann Spies wrote: > 2009/11/26 mdipierro : > > > > > I took a second look. > > WIKI('this is a tes

[web2py:37231] Re: Hosting at Webfaction

2009-12-15 Thread mdipierro
would you post a slice? On Dec 15, 8:55 am, annet wrote: > I am planning to sign up for a Plan Shared 1 hosting account at > WebFaction for production purposes. So far, I have been developing an > application on my Mac, on which the web2py source code runs out of the > box, and testing it on a Ma

[web2py:37232] Re: Multi language site, long texts

2009-12-15 Thread mdipierro
What is wrong with? {{=T("your long text")}} why does it matter if the text is long? Is it because you have HTML in the translation? Massimo On Dec 15, 4:18 am, Arowana wrote: > Hello, > I am constucting a multilanguage side, and for singe words and small > sentaces the T("blablabla") works fi

[web2py:37233] Re: Translation issue

2009-12-15 Thread mdipierro
On Dec 15, 8:56 am, Andrea Cappelli wrote: > Hi List, > I'm a web2py user since few months and now I'm dealing with 2 problems > regarding translations > > 1) With latest release (1.74.1) I get no sentence translated. I have 2 > files in languages/ (en.py and it.py) and some symlink (en-us.py, e

[web2py:37234] news blobstore on gae

2009-12-15 Thread mdipierro
This is a good time to be rewriting the DAL: http://googleappengine.blogspot.com/2009/12/app-engine-sdk-130-released-including.html We should take advantage of this. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send e

[web2py:37235] Re: Excess whitespace in html

2009-12-15 Thread kbochert
Jonathon wrote: > 2x seems like an awful lot, since a newline is only one byte. Are you sure? The output typically has multiple leading spaces on those blank lines, presumably driven by the indenting of the original html. DenesL wrote: > Do you want you view or your final output to be legible an

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

2009-12-15 Thread Jonathan Lundell
On Dec 15, 2009, at 8:13 AM, kbochert wrote: > Jonathon wrote: >> 2x seems like an awful lot, since a newline is only one byte. Are you sure? > > The output typically has multiple leading spaces on those blank > lines, presumably driven by the indenting of the original html. I finally noticed t

[web2py:37237] Re: Hosting at Webfaction

2009-12-15 Thread Mengu
dear annet, when you start web2py with the command python web2py.py, it outputs something like this: "please visit: http://127.0.0.1:8000 use "kill -SIGTERM 9813" to shutdown the web2py server " so basically, you need to fire up another terminal window to ssh into your webfaction account a

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

2009-12-15 Thread Fred
The Auth.login() method in tools.py is causing my grief. It's setting a temporary IS_EMAIL() validator on the auth_user.email field during login. I've been using the standard Auth tables along with LDAP authentication successfully, in production, for months. That scheme stores the LDAP username

[web2py:37239] Re: sign in form , email field validation problem

2009-12-15 Thread Fred
This patch seems to be causing me grief with LDAP authentication. See http://groups.google.com/group/web2py/browse_thread/thread/043083b6ae706f22 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@google

Re: [web2py:37240] Re: Translation issue

2009-12-15 Thread Andrea Cappelli
Il giorno mar, 15/12/2009 alle 07.37 -0800, mdipierro ha scritto: > We had a long discussion about this. We had a minor change of behavior > that basically assumes the default language is English. We did not > make such assumptions before. I opposed such change but apparently I > was the only one

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

2009-12-15 Thread mdipierro
I'd say it is a big that is stores username in the email field. It should use a 'username' field. I will look into this but for now my suggestion is edit tools and change if 'username' in table_user.fields: username = 'username' tmpvalidator = IS_NOT_EMPTY(self.mes

[web2py:37242] Re: sign in form , email field validation problem

2009-12-15 Thread mdipierro
I agree. The problem is that LDAP should be using the email field to get a username. On Dec 15, 11:23 am, Fred wrote: > This patch seems to be causing me grief with LDAP authentication.   > Seehttp://groups.google.com/group/web2py/browse_thread/thread/043083b6ae... -- You received this message

[web2py:37243] pyforum vulnerabilities?

2009-12-15 Thread mdipierro
There are a number of security advisory reports online about pyforum, some from reputable sources. They report two vulnerabilities: 1) What they refer to as a backdoor but they describe as a different problem: an attacker can force pyforum to email a new password to the administrator (not to the

[web2py:37244] Using db in uploaded modules

2009-12-15 Thread Hillman
I have a module that I uploaded to an application, and I was wondering if there is a way that I can access my databases within the module. I imagine it is just a matter of importing the right things, but I don't know what all I need to import. -- You received this message because you are subscrib

[web2py:37245] Re: Using db in uploaded modules

2009-12-15 Thread mdipierro
Is the module imported by web2py? If not you need to pass the db to thsoe functions/classes defined in the module that need to use it. Else you should probably run web2py -S app -M -R yourmodule.py On Dec 15, 12:28 pm, Hillman wrote: > I have a module that I uploaded to an application, and I was

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

2009-12-15 Thread Yarko Tymciurak
On Dec 15, 9:04 am, selecta wrote: > I just tried again, here are the steps that i did > > downloaded web2py Version 1.74.1 > logged into the admin > created a new application "test" > edited the db.py of test to contain > db.define_table('mytable',Field('myfield','string')) > then i click in the

[web2py:37247] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread mr.freeze
This just added: column filtering! You can now set filters per column. This will render dropdowns of all of the possible values for your field. The slice has been updated with screenshot and usages instructions. On Dec 12, 7:32 am, villas wrote: > On Dec 11, 10:13 pm, "mr.freeze" wrote: > > >

[web2py:37248] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread mr.freeze
And here's the link again: http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 15, 1:03 pm, "mr.freeze" wrote: > This just added: column filtering!  You can now set filters per > column. This will render dropdowns of all of the possible values for > your field. The slice has been updated

Re: [web2py:37249] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread Alexandre Andrade
I need to personalize edit link to a custom page, where I use request.arg(0) http://localhost/default/custo/11 but i need to know what form to use and the id of row. The link would be like: http://localhost/default/custo/11/custo_pessoal/12 how personalize it in grid.edit_link = lambda row:

[web2py:37250] Re: Translation issue

2009-12-15 Thread Yarko Tymciurak
On Dec 15, 11:23 am, Andrea Cappelli wrote: > Il giorno mar, 15/12/2009 alle 07.37 -0800, mdipierro ha scritto: > > > We had a long discussion about this. We had a minor change of behavior > > that basically assumes the default language is English. We did not > > make such assumptions before. I o

[web2py:37251] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread mr.freeze
If your datasource is not a join: grid.edit_link = lambda row: A('edit', _href=self.crud.url(f='custo', args= [request.args(0), self.tablenames[0], row['id']])) If it is a join: grid.edit_link = lambda row: A('edit', _href=self.crud.url(f='cus

[web2py:37252] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread mr.freeze
Looks like filters and paging aren't working together. I should have it fixed soon. On Dec 15, 1:32 pm, "mr.freeze" wrote: > If your datasource is not a join: > grid.edit_link = lambda row: A('edit', _href=self.crud.url(f='custo', >                                                        args= > [

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

2009-12-15 Thread Fred
That IS_EMAIL() temporary validator is exactly what I *don't* want for LDAP authentication. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email

[web2py:37254] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread mr.freeze
Fixed! On Dec 15, 1:43 pm, "mr.freeze" wrote: > Looks like filters and paging aren't working together. I should have > it fixed soon. > > On Dec 15, 1:32 pm, "mr.freeze" wrote: > > > If your datasource is not a join: > > grid.edit_link = lambda row: A('edit', _href=self.crud.url(f='custo', > >  

Re: [web2py:37255] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread Alexandre Andrade
I had put a workaround in comments at http://www.web2pyslices.com/main/slices/take_slice/39, and now I see you updated it. Thanks 2009/12/15 mr.freeze > Fixed! > > On Dec 15, 1:43 pm, "mr.freeze" wrote: > > Looks like filters and paging aren't working together. I should have > > it fixed soon

[web2py:37256] Form element definition & examples

2009-12-15 Thread waTR
Is there a definition of all possible arguments for form.element and some examples somewhere? I am mainly looking to use it with SQLForm and factory(). Specifically, I want to create a form with SQLForm & factory, and then modify some of the elements to be things other than text boxes, i.e. to cha

Re: [web2py:37257] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread Alexandre Andrade
I get a error: Error traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/web2py/applications/convenios/controllers/default.py"

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

2009-12-15 Thread Alex Fanjul
Hello Kbochert, it seems you found out a way to make cleaner output, do you get it working automatically? (ie. with out manual action for output clean process) I'm thinking in alway pass dictionaris throught filter function so instead of return dict we'd return filter(dict) but I'm not sure if i

[web2py:37259] Re: Translation issue

2009-12-15 Thread Yarko Tymciurak
On Dec 15, 8:56 am, Andrea Cappelli wrote: > Hi List, > I'm a web2py user since few months and now I'm dealing with 2 problems > regarding translations > > 1) With latest release (1.74.1) I get no sentence translated. I have 2 > files in languages/ (en.py and it.py) and some symlink (en-us.py, en-

[web2py:37260] Re: new on web2pyslices.com: WebGrid

2009-12-15 Thread mr.freeze
My bad, please download again. On Dec 15, 2:04 pm, Alexandre Andrade wrote: > I get a error: > > Error traceback > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > 10. > 11. > 12. > 13. > 14. > > Traceback (most recent call last): >   File "gluon/restricted.py", line 173, in restricted >     exec c

[web2py:37261] Re: pyforum vulnerabilities?

2009-12-15 Thread Julio
Massimo, I also received the email from a Vietnamese (or chinese, can't remember) "security" firm that basically told me the exact same thing as you are writing, they basically wanted me to "sign an agreement" with them in order to not disclose the "vulnerability" otherwise they would disclose to

[web2py:37262] Re: GAE mkdir error

2009-12-15 Thread Vidul Petrov
GAE does not allow write access to the file system. On Dec 15, 2:59 am, Richard wrote: > 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 a

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

2009-12-15 Thread Jonathan Lundell
On Dec 15, 2009, at 12:08 PM, Alex Fanjul wrote: > Hello Kbochert, it seems you found out a way to make cleaner output, do > you get it working automatically? (ie. with out manual action for output > clean process) > I'm thinking in alway pass dictionaris throught filter function so > instead

Re: [web2py:37264] Re: Translation issue

2009-12-15 Thread Andrea Cappelli
2009/12/15 Yarko Tymciurak : > > If the string argument of T is Italian, then how I expect this to work > is this: [.] That is all. This is clear, I have sentences in italian and i have 2 files --> it.py 'Ciao Mondo':'Ciao Mondo' --> en.py 'Ciao Mondo':'Hello World' and in some view I have

Re: [web2py:37265] Re: Translation issue

2009-12-15 Thread Andrea Cappelli
2009/12/15 Yarko Tymciurak : > > On Dec 15, 11:23 am, Andrea Cappelli wrote: >> Il giorno mar, 15/12/2009 alle 07.37 -0800, mdipierro ha scritto: >> >> > We had a long discussion about this. We had a minor change of behavior >> > that basically assumes the default language is English. We did not >

[web2py:37266] Re: pyforum vulnerabilities?

2009-12-15 Thread mdipierro
Thank you Julio. This is what I wanted to hear. It would still be good to have the forum audited by a few members of the group. Somehow their behavior does not surprise me. Massimo On Dec 15, 2:47 pm, Julio wrote: > Massimo, > > I also received the email from a Vietnamese (or chinese, can't > r

[web2py:37267] Re: GAE mkdir error

2009-12-15 Thread mdipierro
yes but this folders should be created locally, then uploaded. Web2py check for existance before trying to create them. On Dec 15, 2:48 pm, Vidul Petrov wrote: > GAE does not allow write access to the file system. > > On Dec 15, 2:59 am, Richard wrote: > > > I uploaded an app to GAE and it trigg

[web2py:37268] r1433 breaks app: GET vars no longer processed on POSTs

2009-12-15 Thread Fran
In r1432 (Bzr) & earlier, GET vars are added to request.vars even on POST as per the comments: "parse GET vars, even if POST" In r1433, this changes so that these are only available in request.get_vars for POSTs. Why this incompatible change? Surely a POST can explicitly check just post_vars if d

[web2py:37269] Re: Using db in uploaded modules

2009-12-15 Thread Hillman
Thanks - Passing db into the module works as I wanted it to. On Dec 15, 11:45 am, mdipierro wrote: > Is the module imported by web2py? If not you need to pass the db to > thsoe functions/classes defined in the module that need to use it. > > Else you should probably run web2py -S app -M -R yourm

[web2py:37270] Re: GAE mkdir error

2009-12-15 Thread howesc
I had the same problem running the dev_appserver (the latest release 1.3.0). it was trying to create: /web2py/applications//errors which existed in my file system. I wrapped the entire for loop in: if not request.env.web2py_runtime_gae: and it works fine. thanks, christian On Dec 15, 1:27 pm

[web2py:37271] Re: Form element definition & examples

2009-12-15 Thread Mengu
yes, this is possible. lets say you created a form like this: form = SQLFORM(db.post) and your post have two fields title and body. the form will be like this: title - input for title body - textarea for body you can make it like this: form[0][1][1] = TD(INPUT(_type="text", _name="body", _size=5

[web2py:37272] Re: r1433 breaks app: GET vars no longer processed on POSTs

2009-12-15 Thread mdipierro
This may be a bug. Which python version do you use? Both get_vars and post_vars should be added to vars. Can you provide an example to make sure I understand? Massimo On Dec 15, 3:35 pm, Fran wrote: > In r1432 (Bzr) & earlier, GET vars are added to request.vars even on > POST as per the comments

[web2py:37273] Re: Form element definition & examples

2009-12-15 Thread mr.freeze
element and elements take any combination of args and keywords and cycle through the form components looking for match(es) form.element('input',_type='text')# grabs the first text input form.elements('input',_type='text')# grabs all text inputs form.elements('input','textarea') # grabs all inputs

[web2py:37274] Re: pyforum vulnerabilities?

2009-12-15 Thread Richard
I'm curious, where did you find these reports? On Dec 16, 5:17 am, mdipierro wrote: > There are a number of security advisory reports online about pyforum, > some from reputable sources. > > They report two vulnerabilities: > > 1) What they refer to as a backdoor but they describe as a different

[web2py:37275] Re: news blobstore on gae

2009-12-15 Thread Richard
keep in mind that currently it is only for applications that have enabled billing. On Dec 16, 2:43 am, mdipierro wrote: > This is a good time to be rewriting the DAL: > > http://googleappengine.blogspot.com/2009/12/app-engine-sdk-130-releas... > > We should take advantage of this. -- You recei

[web2py:37276] Re: r1433 breaks app: GET vars no longer processed on POSTs

2009-12-15 Thread Fran
On Dec 15, 10:11 pm, mdipierro wrote: > This may be a bug. That would better than a policy change :) I tried seeing if line 295 should be pvalue = pvalue + gvalue instead of value = pvalue + gvalue but no joy >Which python version do you use? 2.5.4 > Both get_vars and post_vars should be adde

[web2py:37277] Re: r1433 breaks app: GET vars no longer processed on POSTs

2009-12-15 Thread mdipierro
I need a concrete example of URL and what you find in vars, get_vars and post_vars This is because the code attempts to go around incompatibilities between different python versions and does not behave in the same way on all versions. Massimo On Dec 15, 4:19 pm, Fran wrote: > On Dec 15, 10:11 p

[web2py:37278] Re: GAE mkdir error

2009-12-15 Thread mdipierro
Did you run the app first locally without dev_appserver? That should have created the missing folders. No? On Dec 15, 4:06 pm, howesc wrote: > I had the same problem running the dev_appserver (the latest release > 1.3.0).  it was trying to create: >  /web2py/applications//errors which existed in

[web2py:37279] Re: GAE mkdir error

2009-12-15 Thread mdipierro
PS. Damn Mercurial! On Dec 15, 4:42 pm, mdipierro wrote: > Did you run the app first locally without dev_appserver? That should > have created the missing folders. No? > > On Dec 15, 4:06 pm, howesc wrote: > > > I had the same problem running the dev_appserver (the latest release > > 1.3.0).  it

[web2py:37280] Re: r1433 breaks app: GET vars no longer processed on POSTs

2009-12-15 Thread Fran
On Dec 15, 10:40 pm, mdipierro wrote: > I need a concrete example of URL and what you find in vars, get_vars > and post_vars Model: db.define_table('atable', Field('afield')) Controller: def test(): form = crud.create(db.atable) return dict(form=form) URL: http://127.0.0

[web2py:37281] Re: GAE mkdir error

2009-12-15 Thread howesc
yes i did. :( i was a bit surprised that it finds some folders, but not the one named 'errors'. On Dec 15, 2:42 pm, mdipierro wrote: > Did you run the app first locally without dev_appserver? That should > have created the missing folders. No? > > On Dec 15, 4:06 pm, howesc wrote: > > > I had t

[web2py:37282] Re: r1433 breaks app: GET vars no longer processed on POSTs

2009-12-15 Thread mdipierro
Definitively a bug. Will fix it tonight. Massimo On Dec 15, 4:52 pm, Fran wrote: > On Dec 15, 10:40 pm, mdipierro wrote: > > > I need a concrete example of URL and what you find in vars, get_vars > > and post_vars > > Model: > db.define_table('atable', >                 Field('afield')) > > Con

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

2009-12-15 Thread Thadeus Burgess
I still do not see how field sets and legends could be determined by a SMARTFORM using the current way web2py HELPERS work. If you look at ruby on rails, this is why their forms require you to explicitly define your forms. Django has sort of what I would like, however lacks fieldsets. django's fo

[web2py:37284] Re: Excess whitespace in html

2009-12-15 Thread kbochert
def filter(d): import re if isinstance(d,dict): return re.compile('\n\s\s+\n').sub('\n',response.render(d)) return re.compile('\n\s\s+\n').sub('\n',response.render(d())) response._caller=filter Just place the snippet above in your controller code or in your model code. If in t

[web2py:37285] Re: news blobstore on gae

2009-12-15 Thread mdipierro
It will be optional. Anyway, it will not happen tonight (I think). On Dec 15, 4:18 pm, Richard wrote: > keep in mind that currently it is only for applications that have > enabled billing. > > On Dec 16, 2:43 am, mdipierro wrote: > > > This is a good time to be rewriting the DAL: > > >http://goo

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

2009-12-15 Thread mdipierro
No. I django's form.as_p, form.as_ul, form.as_table are not an option for web2py. Each of them is a specific solution. I think we are looking for a general solution instead. I think this takes two steps: order 0) SMARTFORM = FORM order 1) Fields get an .xml() attributes that serializes them using

[web2py:37287] Re: Excess whitespace in html

2009-12-15 Thread mdipierro
You may also want to look into scripts/cleanhtml.py and scripts/ cleancss.py. The only problem is that it breaks flash. On Dec 15, 5:16 pm, kbochert wrote: > def filter(d): >     import re >     if isinstance(d,dict): >          return re.compile('\n\s\s+\n').sub('\n',response.render(d)) >     re

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

2009-12-15 Thread Thadeus Burgess
It messes up my tags. However this helps in cleaning up bad html generated from WYSIWYG editors. -Thadeus On Tue, Dec 15, 2009 at 5:16 PM, kbochert wrote: > def filter(d): >    import re >    if isinstance(d,dict): >         return re.compile('\n\s\s+\n').sub('\n',response.render(d)) >    

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

2009-12-15 Thread Thadeus Burgess
I wouldn't be so quick to dismiss as_p as_ul and as_table. As they offer pre-defined templates. Also, I am quickly playing aroudn with your suggestion. I added .forform() (that just returns self.widget(self, self.default) to field objects, and I am using FORM. The problem with this approach is it

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

2009-12-15 Thread Thadeus Burgess
customizable csv has been in the dev since 1.73.1 but didn't actually make it into stable until 1.74.1, just an fyi. ( ran into this issue on my dev server, trying to use 1.73.1 had to revert to dev for the time being) -Thadeus On Mon, Dec 14, 2009 at 10:40 PM, DenesL wrote: > 1.74.1 -- Yo

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

2009-12-15 Thread Thadeus Burgess
The real problem is the cohesion between Models and Views within the "internal" aspects of web2py. SQLFORM is way too cohesive between validation and rendering. In my opinion, this is why I suggested separate classes, one for the form model, and another for the form rendering(view). You solution,

[web2py:37292] Re: Excess whitespace in html

2009-12-15 Thread kbochert
On Dec 15, 3:24 pm, Thadeus Burgess wrote: > It messes up my tags. > > However this helps in cleaning up bad html generated from WYSIWYG editors. > > -Thadeus > Works fine for my 's. Just have to keep in mind the difference between abc def which works as expected, and: abc

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

2009-12-15 Thread Thadeus Burgess
My pre tags are generated by a WYSIWYG editor. It would be highly inconvenient to edit the source it generates, just for pre tags to render correctly -Thadeus On Tue, Dec 15, 2009 at 6:10 PM, kbochert wrote: > > On Dec 15, 3:24 pm, Thadeus Burgess wrote: >> It messes up my tags. >> >>

[web2py:37294] Re: Excess whitespace in html

2009-12-15 Thread kbochert
On Dec 15, 3:23 pm, mdipierro wrote: > You may also want to look into scripts/cleanhtml.py and scripts/ > cleancss.py. The only problem is that it breaks flash. > So flash passes through the renderer, AND is sensitive to blank lines ?! And people complain about Python being indentation sensiti

[web2py:37295] Auth-Login : Backward compatibility with the new release 1.74.1

2009-12-15 Thread Yannick
This is a follow up of this thread: http://groups.google.com/group/web2py/browse_thread/thread/f6899f258368382f/761a94c588521b8c#761a94c588521b8c Basically now when I migrate my application with this new release and trying to login an user with a fake password I'm expecting to have a feedback mes

[web2py:37296] ¿Too much Tricky?

2009-12-15 Thread Alex Fanjul
Very good trick that I had forgotten Mr.Freeze!!! Massimo, (all), let me please do some meditation... Even though I really think web2py its by far the best and rising python framework outhere, many times it comes to my mind one word: "tricky". Let me explain, tricky (in the good sense), because t

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

2009-12-15 Thread Yannick
Hmmm Think there is an issue with this release... Please take a look to the ticket generated after a user tried to login using a fake password: Traceback (most recent call last): File "/Users/OnemeWs/App Serve

[web2py:37298] Dynamic CSS

2009-12-15 Thread kbochert
Just a thought--- Is it possible to serve a css file through the template system? It might be very useful to be able to use css like: {{ # define the colors }} {{primary_color = "0xff3366"}} body { color: {{=primary_color}} ; background-color: {{= response.users_background}} ; ... }

Re: [web2py:37299] Dynamic CSS

2009-12-15 Thread Jonathan Lundell
On Dec 15, 2009, at 4:38 PM, kbochert wrote: > Just a thought--- > Is it possible to serve a css file through the template system? Yes, I've been doing it for a while now, both for fonts and colors. I pass them in as a dict, though. There were a couple of minor problems initially; I don't reca

[web2py:37300] Re: Dynamic CSS

2009-12-15 Thread Mengu
karl, what makes you think that's not possible? :) On Dec 16, 2:38 am, kbochert wrote: > Just a thought--- > Is it possible to serve a css file through the template system? > > It might be very useful to be able to use css like: > > {{ # define the colors }} > {{primary_color = "0xff3366"}} > >

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

2009-12-15 Thread Thadeus Burgess
This does allow for custom form design, as web2py could never know what a developer "intends" without him/her explicitly declaring it so. I do think that .as_p, as_table..etc should be considered as a default form view that could be a one liner call. Massimo you say we need a generic solution, but

[web2py:37302] TypeError: 'NoneType' object is not iterable error when inserting on GAE

2009-12-15 Thread Hillman
I get the following error: Traceback (most recent call last): File "C:\DropBox\My Dropbox\Programming Projects\Python \google_appengine\hillmanwork\gluon\restricted.py", line 173, in restricted exec ccode in environment File "C:\DropBox\My Dropbox\Programming Projects\Python \google_appeng

[web2py:37303] Re: Excess whitespace in html

2009-12-15 Thread kbochert
Amazingly enough, the following snippet appears to filter excess lines while leaving blocks unchanged!! import re def remove_line(mo): s = mo.group() if s.startswith(''): return s return '\n' def filter(d): if not isinstance(d,dict): d = d() pat = re.compile(r'(\n\s\s+\n

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

2009-12-15 Thread Jonathan Lundell
On Dec 15, 2009, at 5:11 PM, kbochert wrote: > Amazingly enough, the following snippet appears to filter excess lines > while leaving blocks unchanged!! You might want .*? > > import re > def remove_line(mo): >s = mo.group() >if s.startswith(''): return s >return '\n' > > def

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

2009-12-15 Thread mdipierro
are you sating there is a backward incompatibility problem in this? Can you tell us more? On Dec 15, 6:05 pm, Thadeus Burgess wrote: > customizable csv has been in the dev since 1.73.1 but didn't actually > make it into stable until 1.74.1, just an fyi. ( ran into this issue > on my dev server, t

[web2py:37306] Re: Auth-Login : Backward compatibility with the new release 1.74.1

2009-12-15 Thread mdipierro
Yes. This is a bug in tool. I will fix it shortly. Massimo On Dec 15, 6:26 pm, Yannick wrote: > This is a follow up of this > thread:http://groups.google.com/group/web2py/browse_thread/thread/f6899f2583... > > Basically now when I migrate my application with this new release and > trying to log

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

2009-12-15 Thread mdipierro
fixing this tonight On Dec 15, 6:28 pm, Yannick wrote: > Hmmm Think there is an issue with this release... Please take a look > to the ticket generated after a user tried to login using a fake > password: > > > >

[web2py:37308] Re: Dynamic CSS

2009-12-15 Thread mdipierro
yes. Nothing special. Just make a view.css file and include it in the layout. On Dec 15, 6:38 pm, kbochert wrote: > Just a thought--- > Is it possible to serve a css file through the template system? > > It might be very useful to be able to use css like: > > {{ # define the colors }} > {{primary

[web2py:37309] Re: TypeError: 'NoneType' object is not iterable error when inserting on GAE

2009-12-15 Thread mdipierro
This line db(db.word.insert(word = 'aa')) is not a valid DAL syntax. db.word.insert(word = 'aa') is correct and db(query).select() is correct but the result of the insert is not a query. Massimo On Dec 15, 7:11 pm, Hillman wrote: > I get the following error: > > Traceback (most recent call

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

2009-12-15 Thread Thadeus Burgess
No. I mean that the custom csv patch (to allow custom definition of delimiter) has been in SVN since the 1.73.1 release. however it was not included in the 1.73.1 release, so downloading src from web2py.com/downloadsdid not include this patch (necessary for my app). The reasoning is if you are runn

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

2009-12-15 Thread mdipierro
I think this is now fixed in trunk. Can you confirm? On Dec 15, 8:04 pm, mdipierro wrote: > fixing this tonight > > On Dec 15, 6:28 pm, Yannick wrote: > > > Hmmm Think there is an issue with this release... Please take a look > > to the ticket generated after a user tried to login using a fake >

[web2py:37312] Re: r1433 breaks app: GET vars no longer processed on POSTs

2009-12-15 Thread mdipierro
I think this is now fixed in trunk. can you confirm? massimo On Dec 15, 4:52 pm, Fran wrote: > On Dec 15, 10:40 pm, mdipierro wrote: > > > I need a concrete example of URL and what you find in vars, get_vars > > and post_vars > > Model: > db.define_table('atable', >                 Field('afiel

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

2009-12-15 Thread mdipierro
Please check out trunk and do auth.settings.login_email_validate = False does it solve your problem? This is a temporary solution. ldap module needs to be changed to use username and not email. The current use of email should be considered a bug. On Dec 15, 1:44 pm, Fred wrote: > That IS_EMAIL

[web2py:37314] web2py blog screencast

2009-12-15 Thread Mengu
hi everyone, i have recorded a blog screencast which i think may help many web2py beginners. it includes: - how to use sqlform, - how to customize sqlform, - how to use DAL, - how to use joins, - how to create categories - how to implement tagging - how to add new menus i tried to be clean on the

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

2009-12-15 Thread DenesL
On Dec 15, 7:49 pm, Thadeus Burgess wrote: > > class PRenderer(FormRenderer): >    def __init__(form): >        ... >    def __call__(): >        return FORM( >        for field in self.form.fields >         P( >             LABEL(field.label+":"), >                 field.widget, >                

[web2py:37316] Re: Excess whitespace in html

2009-12-15 Thread DenesL
Looking good.. On Dec 15, 8:11 pm, kbochert wrote: > Amazingly enough, the following snippet appears to filter excess lines > while leaving blocks unchanged!! > > import re > def remove_line(mo): >     s = mo.group() >     if s.startswith(''):     return s >     return '\n' > > def filter(d): >

Re: [web2py:37317] web2py blog screencast

2009-12-15 Thread Alex Fanjul
Downloading!!! does it include any new feature Mengu? or are the book standard ones? Thanks a lot! Alex F El 16/12/2009 4:01, Mengu escribió: > hi everyone, > > i have recorded a blog screencast which i think may help many web2py > beginners. it includes: > - how to use sqlform, > - how to custom

[web2py:37318] Re: TypeError: 'NoneType' object is not iterable error when inserting on GAE

2009-12-15 Thread Hillman
Thanks. I am not sure where I got the syntax I was using. Also, I find it odd that the syntax that shouldn't work actually does when working with a sqlite db. On Dec 15, 7:09 pm, mdipierro wrote: > This line > > db(db.word.insert(word = 'aa')) > > is not a valid DAL syntax. > > db.word.insert(wo

  1   2   >