Hi Massimo,
Currently the error_message of all validators are a phrase in English,
such as 'value already in database!' etc. When I gonna do some i18n
for it, I have to do:
db.Field('foo',
requires=IS_NOT_IN_DB(
db,"table.field",
error_message=T('value already in database!')))
I think SQLFORM should be changed to allow for IS_IN_SET with other
validators then you could just do:
requires=[IS_IN_SET(['','English','Chinese','Italian']),IS_NOT_EMPTY
()]
Or you could get fancy:
requires=[IS_IN_SET(['Please
choose...','English','Chinese','Italian']),IS_EXPR("str(value) !=
'P
I think this would do it:
Index: gluon/sqlhtml.py
===
--- gluon/sqlhtml.py(revision 1196)
+++ gluon/sqlhtml.py(working copy)
@@ -167,11 +167,14 @@
:param field: the field needing checking
:returns: True if t
Thanks for the feedback, but I would say:
requires=[IS_IN_SET(['','English','Chinese','Italian']),IS_NOT_EMPTY
()]
is semantically inconsistent and therefore not intuitive. I still
prefer to let the:
requires=IS_IN_SET(['English','Chinese','Italian'])
can generate a drop-down list with ini
On Sep 5, 8:29 am, Iceberg wrote:
> Currently the error_message of all validators are a phrase in English
+1 for getting this fixed in a DRY manner :)
> (1) let the default error_message be i18n-ready:
> or if somehow you don't like validators.py depends on T(), then you
> can:
tools.py does t
On Sep 5, 5:58 am, Iceberg wrote:
> So my proposal is to adjust OptionsWidget to always show up with an
> initial blank (when creating record), but not necessarily accepting
> it. Just change line 198 of sqlhtml.py from:
> opts = []
> to:
> if value:
> opts = []
> else: # To enforce an
On Sep 5, 9:34 am, "mr.freeze" wrote:
> I think this would do it:
Lovely - I like this solution a lot :)
Patch works for me...it's backward-compatible, suggest it goes into
Trunk :)
F
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
On Sep5, 5:25pm, Fran wrote:
> On Sep 5, 5:58 am, Iceberg wrote:
>
> > So my proposal is to adjust OptionsWidget to always show up with an
> > initial blank (when creating record), but not necessarily accepting
> > it. Just change line 198 of sqlhtml.py from:
> > opts = []
> > to:
> > if val
I have in my default controller the "user" action that exposes the
auth object. But I wanted authenticated also in a different
controller, say, second_controller. I decorated one of my action in
the "second_controller" with @auth.requires_login() and it was looking
for a "user" action in "second_c
On Sep 5, 2:16 pm, Yarko Tymciurak wrote:
> Graham -
>
> On Fri, Sep 4, 2009 at 11:08 PM, Graham Dumpleton <
>
>
>
>
>
> graham.dumple...@gmail.com> wrote:
>
> > On Sep 5, 1:19 pm, Wes James wrote:
> > > On Fri, Sep 4, 2009 at 8:21 PM, mdipierro
> > wrote:
>
> > > command-line option
>
> > A c
On Sep 5, 12:10 pm, eddwinston wrote:
> I have in my default controller the "user" action that exposes the
> auth object. But I wanted authenticated also in a different
> controller, say, second_controller. I decorated one of my action in
> the "second_controller" with @auth.requires_login() and
On Sep 5, 11:44 am, Iceberg wrote:
> my proposal does not prevent you from explicitly
> using default value at all. If you insist, you can still define
> default value as always:
> Field('language',
> requires=IS_IN_SET(['English','Chinese','Italian']),
> default='Italian') # the defaul
Thanks Fran
On Sep 5, 2:20 pm, Fran wrote:
> On Sep 5, 12:10 pm, eddwinston wrote:
>
> > I have in my default controller the "user" action that exposes the
> > auth object. But I wanted authenticated also in a different
> > controller, say, second_controller. I decorated one of my action in
> >
Hi Fran,
If I try to access the action with the @auth.requires_login()
decorator in the second controller, it still looks for user action in
the second controller. It does go to the on_failed_authorization url
given.
On Sep 5, 2:20 pm, Fran wrote:
> On Sep 5, 12:10 pm, eddwinston wrote:
>
>
Hi Fran,
I managed to fix the problem I think. When user is not authenticated
the @auth.requires_login() decorator looks for settings.login_url from
the Auth object. But i previously did not have that. After adding it,
it worked fine Thanks
Regards,
Winston
On Sep 5, 3:04 pm, eddwinston wrote:
In gluon/streamer.py there are a number of places were open() call is
made on files. These are within a try block and exceptions are caught
and the specific reason for the error is determined and different HTTP
error returned. For example on such case from that file is:
try:
open(stat
Useful but attention that this will break if you compile the app and
distribute it without source code.
On Sep 5, 1:24 am, "mr.freeze" wrote:
> I use this to dynamically generate a menu from my controllers and
> functions during development. Just replace the existing response.menu
> assignment
I cannot tell which one is line 95. Are you getting this error on the
same or a different machine than the one used for development?
On Sep 5, 1:51 am, Derek wrote:
> Hi All,
>
> I really don't understand what's going on. I've been developing/
> learning in web2py for the past week, and suddenly
I agree with Fran.
On Sep 5, 4:21 am, Fran wrote:
> On Sep 5, 8:29 am, Iceberg wrote:
>
> > Currently the error_message of all validators are a phrase in English
>
> +1 for getting this fixed in a DRY manner :)
>
> > (1) let the default error_message be i18n-ready:
> > or if somehow you don't l
You can already set a default Field(...,requires=IS_IN_SET
(...),default='value')
On Sep 5, 5:44 am, Iceberg wrote:
> On Sep5, 5:25pm, Fran wrote:
>
>
>
> > On Sep 5, 5:58 am, Iceberg wrote:
>
> > > So my proposal is to adjust OptionsWidget to always show up with an
> > > initial blank (when c
Can you explain it?
On Sep 5, 3:34 am, "mr.freeze" wrote:
> I think this would do it:
>
> Index: gluon/sqlhtml.py
> ===
> --- gluon/sqlhtml.py (revision 1196)
> +++ gluon/sqlhtml.py (working copy)
> @@ -167,11 +167,14 @@
>
At a first look I would use SetEnv for this.
On Sep 4, 11:08 pm, Graham Dumpleton
wrote:
> On Sep 5, 1:19 pm, Wes James wrote:
>
> > On Fri, Sep 4, 2009 at 8:21 PM, mdipierro wrote:
>
> > > Sorry Graham. You are right I got confused. Had a long day.
> > > I will add you patch to trunk but, as y
Can you explain it?
On Sep 5, 3:34 am, "mr.freeze" wrote:
> I think this would do it:
>
> Index: gluon/sqlhtml.py
> ===
> --- gluon/sqlhtml.py (revision 1196)
> +++ gluon/sqlhtml.py (working copy)
> @@ -167,11 +167,14 @@
>
So far we use parameters_[] only to store the hashed admin
password.
options.py is used as an alternative way to set command line options
for wsgiserver and only wsgiserver since there are n parameters for
web2py itself.
That is why I think in this case SetEnv is the way to do.
On Sep 4,
On 4 sep, 23:21, Arvind wrote:
> Hello,
>
> I have configured my cherokee server as mentioned
> herehttp://www.web2py.com/AlterEgo/default/show/184
>
> i have defined a virtual host called music and each time, i run this
> urlhttp://music/
> it automatically redirects tohttp://music/welcome/de
Sorry for too much back and forth conversation which distract you from
the original proposal. My point is not about default value, it is
about suggesting to add a blank for OptionsWidget. You can simply try
the patch in my first post (quoted below) and see the effect.
Fran also has some good poin
Thank you Graham. I am making the proposed changes in trunk.
I believe this is the only plane where this is done.
About the stat problem you refer to. Let's say we pass the length to
streamer. How would this affect your patch that uses
request.env.wsgi_file_wrapper instead?
We can change the de
line 95 is the first line: elif request.args[0]=='location':
I'm actually getting this error everywhere. On my development machine
which is running the binary Windows web2py distribution, as well as
both the Google App Launcher and the Google App Engine.
On Sep 5, 8:26 am, mdipierro wrote:
> I
Sounds good. Can you please check I implemented all your patches
correctly in trunk?
It is good about a wsgi expect like you here. The issue with
chunk_size that you discovered may actually have been the cause of a
timeout issue that some users have been having. Time will tell.
I am still uneasy
Does this mean there is no objection, and the i18n-able validators
will soon be available in trunk? :-)
On Sep5, 8:27pm, mdipierro wrote:
> I agree with Fran.
>
> On Sep 5, 4:21 am, Fran wrote:
>
>
>
> > On Sep 5, 8:29 am, Iceberg wrote:
>
> > > Currently the error_message of all validators ar
I think the error is not there but here:
ows = db(db.auth_user.location==request.args
[1],db.auth_user.registration_key=='').select()
because db(... , ...) is not a valid syntax. Should be
ows = db(db.auth_user.location==request.args[1])
(db.auth_user.registration_key=='').select()
or
ows = d
I did not say that but let's all think more how this could be done.
On Sep 5, 8:21 am, Iceberg wrote:
> Does this mean there is no objection, and the i18n-able validators
> will soon be available in trunk? :-)
>
> On Sep5, 8:27pm, mdipierro wrote:
>
> > I agree with Fran.
>
> > On Sep 5, 4:21 a
Sweet! Thanks for the advice, I'll adjust those lines.
On Sep 5, 10:21 am, mdipierro wrote:
> I think the error is not there but here:
>
> ows = db(db.auth_user.location==request.args
> [1],db.auth_user.registration_key=='').select()
>
> because db(... , ...) is not a valid syntax. Should be
>
>
After lots of tests and research of ldap_auth , I have some questions
1. Does the mode="ad" identify the Active directory in ldap_ath_aux?
2. In my active directory server to use "search_ext_s" i need a
administrator account,
What i think is general to all ad servers.
How can i define it in ld
Hi,
With the svn r.1199 (streamer.py) broke something.
File "/usr/home/jose/web2py/gluon/streamer.py", line 49, in
stream_file_or_304_or_206
if e[0] == errno.EISDIR:
NameError: global name 'errno' is not defined
Jose
--~--~-~--~~~---~--~~
You received this m
On Sep 5, 2009, at 8:09 AM, Jose wrote:
> With the svn r.1199 (streamer.py) broke something.
>
> File "/usr/home/jose/web2py/gluon/streamer.py", line 49, in
> stream_file_or_304_or_206
>if e[0] == errno.EISDIR:
> NameError: global name 'errno' is not defined
Try adding 'import errno' to stre
On 5 sep, 15:19, Jonathan Lundell wrote:
> On Sep 5, 2009, at 8:09 AM, Jose wrote:
>
> > With the svn r.1199 (streamer.py) broke something.
>
> > File "/usr/home/jose/web2py/gluon/streamer.py", line 49, in
> > stream_file_or_304_or_206
> > if e[0] == errno.EISDIR:
> > NameError: global name
Massimo,
This patch allows other validators to be used with IS_IN_SET and
still have SQLFORM render a dropdown list:
requires=[IS_IN_SET(['Please
choose...','English','Chinese','Italian']),IS_EXPR("str(value) !
='Please choose...' ")]
...would produce a dropdown list with a the text 'Please
Any thoughts? Google App Engine is giving this error:
_get_table_or_raise
raise SyntaxError, 'Set: no tables selected'
SyntaxError: Set: no tables selected
without the error tickets at my disposal, anyway to track down where
line 96 of default.py is?
--~--~-~--~~~
I expect this is referring to your controller -
applications/[your_app]/contollers/default.py
On Sat, Sep 5, 2009 at 10:39 AM, Derek wrote:
>
> Any thoughts? Google App Engine is giving this error:
>
> _get_table_or_raise
>raise SyntaxError, 'Set: no tables selected'
> SyntaxError: Set: no t
I think we're after the same thing but I'm not convinced that people
should be forced to use a blank item.
The example...
requires=[IS_IN_SET(['','English','Chinese','Italian']),IS_NOT_EMPTY
()]
...was just to show the flexibility that you can use multiple/
different validators and have an unsub
>
> Try adding 'import errno' to streamer.py.
with import errno does not show error, but still not working.
jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send e
I guess I shouldn't ask two questions in a message.
The first being the most important, any ideas why GAE is returning
'set: no tables selected'?
Here's the code it seems to be having a problem with in my default.py:
rows = db(db.auth_user.location==argLocation).select()
locatio
On Sep 5, 2009, at 8:53 AM, Jose wrote:
>> Try adding 'import errno' to streamer.py.
>
>
> with import errno does not show error, but still not working.
What does "not working" mean, exactly?
Jose, are you using wsgi? Until somebody who knows more about it that
I do responds, you might try re
On 5 sep, 16:34, Jonathan Lundell wrote:
> On Sep 5, 2009, at 8:53 AM, Jose wrote:
>
> >> Try adding 'import errno' to streamer.py.
>
> > with import errno does not show error, but still not working.
>
> What does "not working" mean, exactly?
>
I use:
def imgcaptcha():
if session.image is
On Sep5, 11:51pm, "mr.freeze" wrote:
> Perhaps a better solution is checking if the value for 'default'
> argument is *not* in the set and then appending it to the set but not
> allowing it to pass validation if selected. What do you think?
>
You are a genius! This solution reaches the original
+1 for Graham.
Backward compatibility is not broken because relocating the web2py site in
the directory structure is a new feature. If you want to take advantage of
the new feature, you just re-code your URL functions. Old installations
work as they always did. (Also - can we call w2p "enterpri
Thank you Thijis,
and thank you again for pyamf.
Massimo
On Sep 5, 2009, at 11:30 AM, Thijs Triemstra|Collab wrote:
> Hi Massimo,
>
> thanks for your email. I added a reference to web2py on our
> homepage. Thanks for your support!
>
> Cheers,
>
> Thijs
>
> On 2 Sep 2009, at 00:57, Massimo Di
Very cool! The only thing I would change is to add it to the top of
the list of options:
if value not in [k for k,v in options]:
opts.insert(0, OPTION(value,_value=value))
On Sep 5, 12:03 pm, Iceberg wrote:
> On Sep5, 11:51pm, "mr.freeze" wrote:
>
> > Perhaps a better solution is
Hi,
I want a have a case like this, the authentication form will be
displayed on the page at all times if the user is not authenticated
irrespective of controller/action, how do i create such a form since
it wont be controller/action specific? Thanks.
Regards
Winston
--~--~-~--~~
I am not competent on this. Fran is the main author of the ldap
module. I suggest you get together and send me a patch.
On Sep 1, 10:14 pm, Don Lee wrote:
> Agreed.
>
> On Tue, Sep 1, 2009 at 5:34 PM, Ahmed Soliman wrote:
>
> > Sure flexibility is needed but what I've spotted is a 'bug', it won
please email the author in case he is not monitoring the list.
On Sep 2, 12:48 am, "mr.freeze" wrote:
> The openID consumer appliance seems to have a problem. It generates a
> ticket when I try to login:http://w2popenid.appspot.com/oidconsumer
>
> On Sep 2, 12:41 am, Richard wrote:
>
> > I'm a
I am not convinced. I had added this in trunk but I am taking it out
because this is not the right solution to the problem and because it
does break backward compatibility.
1) You can relocate web2py in a subfolder but you must use routes.py
2) The patch does break backward compatibility if a use
I should add that this is not a closed issue.
Graham has a valid point and we need to find a way that makes
everybody happy. I would like to hear an argument about why this does
not break backward compatibility (I think it does if people already
use routes for this purpose) and about what is wro
in layout you can do:
{{if not auth.is_logged_in(): response.write(auth.login())}}
Massimo
On Sep 5, 12:41 pm, eddwinston wrote:
> Hi,
>
> I want a have a case like this, the authentication form will be
> displayed on the page at all times if the user is not authenticated
> irrespective of con
Hi,
If I just use {{if not auth.is_logged_in(): response.write(auth.login
())}}. It displays the form and that is very okay, but what about
customising the form. I would like to specify class name and stuffs
like that. How can I pass in such extra value. Thanks
Regards,
Winston
On Sep 5, 9:05 p
Did you get a chance to look at this? Summary:
The web2py_ajax.html ajax function behaves differently than a normal
submit (only noticeable on controls that have conditional postback
like checkbox). This fixes it and adds the ability to use jQuery
selectors ( if s is a string instead of a list of
Graham what do you think:
file_streamer = (request.env.mod_wsgi and \
request.env.mod_wsgi_version >= (2,4) and
\
request.env.wsgi_file_wrapper) or
streamer
or
file_streamer = (request.env.web2py_user_wsgi_file_wrapper an
Iceberg, do you want to submit a patch? Massimo, do you have any
issues with this change? I verified that it works when multiple=True
as well.
On Sep 5, 12:33 pm, "mr.freeze" wrote:
> Very cool! The only thing I would change is to add it to the top of
> the list of options:
>
> if value not in
I was watching, the error occurs in globals.py:
File "/usr/home/jose/web2py/gluon/globals.py", line 204, in download
return self.stream(stream, chunk_size = chunk_size)
File "/usr/home/jose/web2py/gluon/globals.py", line 172, in stream
file_streamer = (request.env.mod_wsgi and \
Attribu
I thought the change is so obvious that we don't need to "submit" a
patch. But anyway, here it is.
Index: sqlhtml.py
===
--- sqlhtml.py (revision 1196)
+++ sqlhtml.py (working copy)
@@ -200,8 +200,9 @@
else:
Hi,
>From the login form generated by web2py, if I intercept the submit
event so I can make an ajax request to the server, the request URL I
guess will be /[application]/user/login. Then what will be the
possible parameters?
Or should the request URL be something like this: URL(r=request,
c='def
Iceberg, did you see my previous message about inserting the option at
the *top* of the list?:
if value not in [k for k,v in options]:
opts.insert(0, OPTION(value,_value=value))
What do you think?
On Sep 5, 1:46 pm, Iceberg wrote:
> I thought the change is so obvious that we don't
On Sep 5, 2009, at 11:21 AM, Jose wrote:
>
> I was watching, the error occurs in globals.py:
>
> File "/usr/home/jose/web2py/gluon/globals.py", line 204, in download
>return self.stream(stream, chunk_size = chunk_size)
> File "/usr/home/jose/web2py/gluon/globals.py", line 172, in stream
>
On Sep 5, 2009, at 11:13 AM, mdipierro wrote:
>
> Graham what do you think:
request defaults to None here, so that needs to be checked first.
>
>file_streamer = (request.env.mod_wsgi and \
> request.env.mod_wsgi_version >= (2,4) and
> \
>
On 5 sep, 18:50, Jonathan Lundell wrote:
>
> Try this:
>
> file_streamer = (request and request.env.mod_wsgi and \
> request.env.mod_wsgi_version >= (2,4)
> and \
> request.env.wsgi_file_wrapper) or streamer
yes, it works
I did see your message. I just thought my previous patch already take
that into consideration. But since you insist, your wish is
granted. :-)
Index: sqlhtml.py
===
--- sqlhtml.py (revision 1196)
+++ sqlhtml.py (working copy)
@@ -2
Thanks! When I tried it before, it put it at the bottom of the list. I
think this one is a winner!
On Sep 5, 2:08 pm, Iceberg wrote:
> I did see your message. I just thought my previous patch already take
> that into consideration. But since you insist, your wish is
> granted. :-)
>
> Index: sql
Unfortunately not - the both have exactly one space between , and
None.
File "validators.py", line 15, in __main__.IS_NOT_WHITESPACE
Failed example:
IS_NOT_WHITESPACE()(' spaces in between and on end ')
Expected:
('spaces in between and on end', None)
Got:
('spaces in between and on
Unfortunately not - they both have exactly one space between the comma
and
"None".
File "validators.py", line 15, in __main__.IS_NOT_WHITESPACE
Failed example:
IS_NOT_WHITESPACE()(' spaces in between and on end ')
Expected:
('spaces in between and on end', None)
Got:
('spaces in bet
What is the role of routes.py in a production environment? In the book, you
seemed to indicate that routes.py was not the solution of choice:
"All major web servers, for example Apache and lighttpd, also have the
ability to rewrite URLs. In a production environment we suggest having the
web serve
{{if not auth.is_logged_in():}}
{{form=auth.login()}}
{{=form.custom.begin}}
{{=form.custom.end}}
{{pass}}
On Sep 5, 1:30 pm, eddwinston wrote:
> Hi,
>
> If I just use {{if not auth.is_logged_in(): response.write(auth.login
> ())}}. It displays the form and that is very okay, but what about
>
Sorry I forgot. Will do it over the week end.
On Sep 5, 1:31 pm, "mr.freeze" wrote:
> Did you get a chance to look at this? Summary:
> The web2py_ajax.html ajax function behaves differently than a normal
> submit (only noticeable on controls that have conditional postback
> like checkbox). This
Yes the url is
URL(r=request,c='default', f='user', args='login')
or
{{=URL(r=request,c='default', f='user', args='login')}}
if in the view.
On Sep 5, 1:48 pm, eddwinston wrote:
> Hi,
>
> From the login form generated by web2py, if I intercept the submit
> event so I can make an ajax request
Is it ever called with request=None?
On Sep 5, 1:53 pm, Jonathan Lundell wrote:
> On Sep 5, 2009, at 11:13 AM, mdipierro wrote:
>
>
>
> > Graham what do you think:
>
> request defaults to None here, so that needs to be checked first.
>
>
>
> > file_streamer = (request.env.mod_wsgi and \
>
On Sep 5, 2009, at 1:56 PM, mdipierro wrote:
>
> Is it ever called with request=None?
Apparently; Jose was getting a crash to that effect. It's the declared
default.
>
> On Sep 5, 1:53 pm, Jonathan Lundell wrote:
>> On Sep 5, 2009, at 11:13 AM, mdipierro wrote:
>>
>>
>>
>>> Graham what do yo
ok, fixed in trunk
On Sep 5, 2:00 pm, Jose wrote:
> On 5 sep, 18:50, Jonathan Lundell wrote:
>
>
>
> > Try this:
>
> > file_streamer = (request and request.env.mod_wsgi and \
> > request.env.mod_wsgi_version >= (2,4)
> > and \
> >
On Sep 5, 2009, at 2:04 PM, Jonathan Lundell wrote:
> On Sep 5, 2009, at 1:56 PM, mdipierro wrote:
>
>>
>> Is it ever called with request=None?
>
> Apparently; Jose was getting a crash to that effect. It's the declared
> default.
Response.download():
return self.stream(stream, chunk_si
please email me the patch
On Sep 5, 2:14 pm, "mr.freeze" wrote:
> Thanks! When I tried it before, it put it at the bottom of the list. I
> think this one is a winner!
>
> On Sep 5, 2:08 pm, Iceberg wrote:
>
> > I did see your message. I just thought my previous patch already take
> > that into
It must be a doctest then. No idea.
On Sep 5, 3:00 pm, Matthew wrote:
> Unfortunately not - they both have exactly one space between the comma
> and
> "None".
>
> File "validators.py", line 15, in __main__.IS_NOT_WHITESPACE
> Failed example:
> IS_NOT_WHITESPACE()(' spaces in between and on
On Sep 5, 2009, at 2:06 PM, Jonathan Lundell wrote:
> On Sep 5, 2009, at 2:04 PM, Jonathan Lundell wrote:
>
>> On Sep 5, 2009, at 1:56 PM, mdipierro wrote:
>>
>>>
>>> Is it ever called with request=None?
>>
>> Apparently; Jose was getting a crash to that effect. It's the
>> declared
>> default.
If the web server provides the functionality to rewrite the output
URLs, I'd use it.
If not I would use routes.py
What I am not comfortable with (but I may be missing something here)
it implementing the request.env.script_name in URL since the output of
URL is already rewritten by module rewrite
yes it should. uploading to trunk now. Please check it.
On Sep 5, 4:08 pm, Jonathan Lundell wrote:
> On Sep 5, 2009, at 2:06 PM, Jonathan Lundell wrote:
>
> > On Sep 5, 2009, at 2:04 PM, Jonathan Lundell wrote:
>
> >> On Sep 5, 2009, at 1:56 PM, mdipierro wrote:
>
> >>> Is it ever called with re
On Sep 5, 2009, at 2:12 PM, mdipierro wrote:
>
> yes it should. uploading to trunk now. Please check it.
You said:
return self.stream(stream, chunk_size = chunk_size,
response=self)
it should be:
return self.stream(stream, chunk_size = chunk_size,
request=request)
Also,
Thanks Jonathan. Fixed and uploading to trunk now.
On Sep 5, 4:16 pm, Jonathan Lundell wrote:
> On Sep 5, 2009, at 2:12 PM, mdipierro wrote:
>
>
>
> > yes it should. uploading to trunk now. Please check it.
>
> You said:
>
> return self.stream(stream, chunk_size = chunk_size,
> respon
Hi, Ahmed,
I should add that Your patch is for the file gluon/tools.py
and, probably, the last line should be:
> elif self.settings.alternate_requires_registration:
Works for me. My opinion is, that the present shape of ldap_auth.py should be
rethinked. There are so many
Reference field marked with IS_IN_DB(db, ..., ...) is not displayed as
drop-down menu in the admin section.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to
Can you post your table definition and/or 'requires' statement? It
should look something like this:
db.dog.owner.requires = IS_IN_DB(db, 'person.id', '%(name)s')
On Sep 5, 5:16 pm, eddwinston wrote:
> Reference field marked with IS_IN_DB(db, ..., ...) is not displayed as
> drop-down menu in th
Hi mr.freeze
Here it is: http://pastebin.com/d2070a421
On Sep 6, 1:20 am, "mr.freeze" wrote:
> Can you post your table definition and/or 'requires' statement? It
> should look something like this:
>
> db.dog.owner.requires = IS_IN_DB(db, 'person.id', '%(name)s')
>
> On Sep 5, 5:16 pm, eddwinst
I would try changing this line...:
db.post.category.requires=[IS_NOT_EMPTY(), IS_IN_DB(db,
db.category.id, '%(name)s')]
...to this:
db.post.category.requires=IS_IN_DB(db, db.category.id, '%(name)s')
IS_IN_DB won't render a dropdown when it is part of a list of
validators. IS_NOT_EMPTY isn't need
How should the active flag be set? Currently I have:
response.menu = [
['Home', request.controller == 'default', URL(request.application,
'default', 'index'), []],
...
]
The default examples always have 'False' for active.
Richard
On Aug 14, 5:28 pm, mdipierro wrote:
> Now (in trunk)
Hi mr.freeze,
It worked. Thanks.
Regards,
Winston
On Sep 6, 2:07 am, "mr.freeze" wrote:
> I would try changing this line...:
> db.post.category.requires=[IS_NOT_EMPTY(), IS_IN_DB(db,
> db.category.id, '%(name)s')]
>
> ...to this:
> db.post.category.requires=IS_IN_DB(db, db.category.id, '%(name
yes but I do not remember if the default layout would use this or not.
On Sep 5, 6:18 pm, Richard wrote:
> How should the active flag be set? Currently I have:
>
> response.menu = [
> ['Home', request.controller == 'default', URL(request.application,
> 'default', 'index'), []],
> ...
> ]
Hi,
I tried creating the url like this because it is in the view: {{=URL
(r=request,c='default', f='user', args='login')}} but it does not
work.
I used the jquery ajax method: jQuery.ajax("{{=URL
(r=request,c='default', f='user', args='login')}}", {},
success_callback, failure_callback);
I pas
I don't think your options are set correctly. Try this:
jQuery.ajax({
type: "POST",
url: "{{=URL(r=request,c='default', f='user', args='login'}}",
data: {},
success: success_callback,
error: failure_callback
});
On Sep 5, 6:47 pm, eddwinston wrote:
> Hi,
>
> I tried creating
Hi mr freeze,
My bad, I copied the wrong stuff in the previous post. This is
actually how i did it:
jQuery.ajax({
type: "POST",
url: "{{=URL(r=request,c='default', f='user', args='login'}}",
data: {},
success: success_callback,
error: failure_callback
});
But it did not work.
O
I have two tables that I want to partially populate using one form. In
other words, part of table one's fields and part of table two's fields
will be represented in one form.
Is there a way to do this with SQLFORM and dbio=True? Or do I have to
use SQLFORM and dbio=False and then populate the tab
Is there a way to access the file renaming function that creates
random filenames in the uploads directory? I have a nice python
routine of my own that does this from a website I developed a few
years ago, but if there's a built-in routine in web2py I think I'd
rather use that. Also, is there an a
Actually, I guess there's a question as to whether I can even do this
with SQLFORM or if I need to go to SQLFORM.formfactory and do all the
db inserts explicitly thereafter?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
Here is my version of openID for web2py. There are two versions.
http://bitbucket.org/bottiger/web2py-openid/downloads/
CAS 1 is a fixed up version of the one at w2popenid which had some
problems with different providers and python 2.6.
AUTH 1 is the recommended version. It fully replaces the A
1 - 100 of 128 matches
Mail list logo