In the validation example, I entered a single character in the Bio
and was allowed to proceed to the next field despite the
db.person.bio.requires = IS_LENGTH(minsize=5, maxsize=200). You made
a note about "Client side validation is not supposed to validate
everything!", is this included in that
Check out CloudFlare which caches all your static files, prevents threats
and more. All for free with a simple setup.
Info on
GAE: http://blog.cloudflare.com/zone-apex-naked-domain-root-domain-cname-supp
Or this if you can get by with them only being available on "localhost":
# by default give a view/generic.extension to all actions from localhost
# none otherwise. a pattern can be 'controller/function.extension'
response.generic_patterns = ['*'] if request.is_local else []
The most recent changeset appears to be the culprit. Probably the copy.copy
thing as shown in the error I suppose.
I'm getting an error on a LOAD(...ajax=False) in trunk. OK in 1.97.1 and OK
when ajax=True.
Traceback (most recent call last):
File "/opt/web2py/gluon/restricted.py", line 192, in restricted
exec ccode in environment
File "/opt/web2py/applications/init/views/checkout/add.html", line 105,
By default, generic views will be disabled, it is a security issue,
but you can active at your own risk.
in any model file include
response.generic_patterns = ['*']
And it will enable all generic views.
Massimo needs to update the example app to get this working again.
On Thu, Jun 30, 201
On Thursday, June 30, 2011 1:33:38 AM UTC-4, Gary wrote:
>
> I'm getting an occasional "invalid view" error since I upgraded to
> 1.97.1. Since it was on a web site I was experimenting/learning with,
> I thought it might be my problem, but I no longer think so.
>
> On controllers with no corr
I did this for web2py.com using request.function, I created a function
tooggle_class which receives request.function and do this job.
here is an example that I use in http://CursoDePython.com.br
The code
https://gist.github.com/1055688
On Wed, Jun 29, 2011 at 5:16 PM, ADE wrote:
> Hello I am
I'm getting an occasional "invalid view" error since I upgraded to
1.97.1. Since it was on a web site I was experimenting/learning with,
I thought it might be my problem, but I no longer think so.
On controllers with no corresponding view, there is supposed to be a
generic view which handles
know if my web2py app is being attacked in the GAE?
The requests have tripled suddenly and very resource consuming is the
outgoing badwidth.
Does anyone have tips to soften it in the GAE?
# ---
# Bruno Barbosa
# Web Developer - Linux user and Free Software En
OK, I forgot the underscore before 'action' (I also forgot to include
request.args in the form action URL) -- I think this should do it:
form.update(_class='no_trap',
_action=URL('default','create_fvte.html',args=request.args))
Note, adding the .html extension to create_fvte above ensures t
Also, I think all the escaping is done by web2py's template engine, so you
could avoid the escaping by skipping use of templates. To do that, have your
controller action return a string of (unsafe) HTML instead of a dictionary
of values to pass to a view -- the HTML string will be returned as th
Anything you put inside XML() will not be escaped (unless you set its
sanitize argument to True). See
http://web2py.com/book/default/chapter/05#XML.
Anthony
On Wednesday, June 29, 2011 3:30:33 PM UTC-4, David Schoenheit wrote:
> Hi,
>
> I am using web2py to write an intentionally vulnerable
It clear validator if they trigger and don't know why the redirection don't
works neither...
Maybe pbreit is right and I should just forget about redirection... It's
probably what I will do for now, cause I can't spend any longer on this
picky stuff for now. It's part of the 20% percent stuff...
I don't find it's that hard... I think it should be as simple to perform
redirection with the components than it is with the standard forms... But
there is a other level of complexity here with the Tabs plugin and it
becomes tricky to test it, I become mix up sometime ;-)
Richard
On Wed, Jun 29,
I switched it to this which saves the data and shows the empty form again:
if table == 'ref_fnaregistry':
redirect(URL('default', 'create_fvte.load',
args='ref_fnaregistry'))
I would very strongly advise simplifying your app. This is far more
complicated than it needs to be
+1
Another golden egg from the proverbial goose ... or gander, in this
case. :P
Thank you Bruno
On Jun 29, 10:33 pm, Bruno Rocha wrote:
> Hi,
>
> I just created a new plugin for stepped form wizards.
>
> I made it last night, so it is not tested very well, I would like your help
> to test it.
>
On Jun 29, 2011, at 1:18 PM, Richard Arts wrote:
>
> Can somebody point out to me how to use the request.env.http_referrer
> to link to the previous page?
>
> So far I have tried the following in the template file:
> {{=A('Back', _href=URL(request.env.http_referrer))}}
> but it links to the curre
Hi,
I am using web2py to write an intentionally vulnerable web app in
order to demonstrate basic cross site request forgery and cross site
scripting attacks for educational purposes. I'm running into some
problems where web2py is automatically html encoding my output and
preventing the intended at
Hello,
Can somebody point out to me how to use the request.env.http_referrer
to link to the previous page?
So far I have tried the following in the template file:
{{=A('Back', _href=URL(request.env.http_referrer))}}
but it links to the current page.
Trying to supply the http_referrer through a d
Sorry for the repeat question, but I'm trying to figure out how to
create a calculated field that only populates when the record is
originally created (i.e. calculate on create, but do not recalculate
on update). Same question as here:
http://groups.google.com/group/web2py/browse_thread/thread/1b2
This is my first post here. Hopefully I'm posting where I should and
that this hasn't been covered already. I am hoping that someone else
has a better solution.
Using eclipse to edit .html files that have embedded python can be a
little frustrating if you (like me) have a habit of pressing ctrl+sh
Hello I am trying to figure out how to check if the current page is
active in web2py
I have my navigation as follows
Home
What's On
About PSTV
Blog
Episodes
Trailers
http://shop.pstv.tv";>Shop
Sorry, the **dict() isn't really needed -- you can just do:
form.element('form').update(_class='no_trap',
action=URL('default','create_fvte'))
Actually, in the URL() call above, you might be better off doing
'create_fvte.html' to ensure it doesn't use the .load extension, which would
then
I just ran into a problem with the Ebay API that does not accept image URL
lengths over 150 chars. Is the only immediate fix to make that edit to
gluon/sql.py? Maybe it should be even shorter of configurable? Is that much
entropy needed?
The filename that Web2py is giving my uploaded images is too long. Is it
possible to make it shorter?
For example (i need them to be under 150 chars):
item.image.8651e61b27b66998.6974656d2e696d6167652e396363373962663466616535313834392e3533353434313566333233323331333432653461353034375f646973706c61
On Wednesday, June 29, 2011 5:08:26 PM UTC-4, Richard wrote:
>
> It the app associate to the slice... I made a comment. If the
> product/create.load view was not created the page at app/product/create will
> be blank... Create the product/create.load view fix it and may be it
> requires to crea
Try this:
form = crud.create(db[table])
form.element('form').update(**dict(_class='no_trap',
action=URL('default','create_fvte')))
The _class='no_trap' should turn off the trapping of the form, and the
action=URL('default','create_fvte') should ensure that the untrapped form
gets s
I will try to make a demo app to reproduce the wrong behavior and you could
maybe have a look at it...
I am not sure to know how to implement what you suggest...
Richard
On Wed, Jun 29, 2011 at 4:48 PM, Anthony wrote:
> On Wednesday, June 29, 2011 4:11:23 PM UTC-4, Richard wrote:
>>
>> ajax_tr
It the app associate to the slice... I made a comment. If the
product/create.load view was not created the page at app/product/create will
be blank... Create the product/create.load view fix it and may be it
requires to create product/create.html too since I create both... But didn't
test if only o
Changes to web2py are supposed to be backward compatible (at least changes
to the documented API) -- what specifically isn't working? Was it working in
1.96 (or previous), but not in 1.97?
On Wednesday, June 29, 2011 3:43:42 PM UTC-4, Richard wrote:
> Hello,
>
> With the last update I presume
I tested with Eventlet and Gunicorn with Eventlet workers, and both
can be made to work. I loaded the page in two web browsers
concurrently rather than calling from the console, but I think I can
assume that this is immaterial?
Eventlet monkey patching only works if it is called before any imports
On Wednesday, June 29, 2011 4:11:23 PM UTC-4, Richard wrote:
>
> ajax_trap is ignored and assumed to be True if ajax=True.
>
> Earlier tests with orther versions had a different behavior and I
> conceived ajax_trap=False as a kind of two purposes option. On one hand when
> ajax=False it could
Hi All,
is there an easy way to create a popup like dialog for logins ? I mean using
web2py auth
something like this: http://web2py.uservoice.com/forums/42577-general when
you click on "like"
thanks
--
Sebastian E. Ovide
I think in web2pyslices2 will need to have some editors.
By now we can use the comments for this.
http://zerp.ly/rochacbruno
Em 29/06/2011 16:43, "Richard Vézina"
escreveu:
> Hello,
>
> With the last update I presume that many slice (app) are not working
anymore
> for example : http://www.web2py
ajax_trap is ignored and assumed to be True if ajax=True.
Earlier tests with orther versions had a different behavior and I conceived
ajax_trap=False as a kind of two purposes option. On one hand when
ajax=False it could be use to keep the next form into ajax... And when
ajax=True it works as a me
I don't understand that from the book :
ajax_trap=True means that any form submission in the DIV must be captured
and submitted via Ajax, and the response must be rendered inside the DIV.
ajax_trap=False indicates that forms must be submitted normally, thus
reloading the entire page. ajax_trap is
Hello,
With the last update I presume that many slice (app) are not working anymore
for example : http://www.web2pyslices.com/main/slices/take_slice/121
The app coming from here not working before I create "product/create.load"
view :
https://bitbucket.org/bmeredyk/web2py-select_or_add_option-wid
On Wednesday, June 29, 2011 3:29:33 PM UTC-4, Richard wrote:
>
> Could it be possible that my compoenent ajax_trap=False option is not
> considering??
ajax_trap isn't related to redirects -- it only applies when ajax=False --
in that case, when ajax_trap=True, it tells web2py to trap form sub
Could it be possible that my compoenent ajax_trap=False option is not
considering??
Richard
On Wed, Jun 29, 2011 at 3:27 PM, Richard Vézina wrote:
> No still propagate... It trap the whole site if use for example
> : redirect(URL(request.application,c='default',f='index.html'))
>
> Richard
>
>
No still propagate... It trap the whole site if use for example
: redirect(URL(request.application,c='default',f='index.html'))
Richard
On Wed, Jun 29, 2011 at 3:07 PM, pbreit wrote:
> Either of these should work:
> redirect(URL('default', 'home', extension=''))
> redirect(URL('default', 'home.
To follow up, if I were to go about this in a brute force manner, by
simply saving the dynamically generated figure to a randomly generated
file and then passing that file to an AREA MAP / IMG tag, where in the
web2py directory structure would be the recommended place to do so? I
suppose using the
Oh, good point, my bad.
Either of these should work:
redirect(URL('default', 'home', extension=''))
redirect(URL('default', 'home.html'))
On Wednesday, June 29, 2011 2:44:40 PM UTC-4, pbreit wrote:
>
> I usually just do {{if form:}}{{=form}}{{pass}}
He was doing that, but that will throw an error if the action doesn't return
an object with a 'form' key in the dict.
Anthony
Hello,
I have problem with propagation of load extension I think with redirect that
not reload nav pages and the redirect to URL in nav box stay the same... +
Calendar plugin not working correctly on redirected pages...
Here what I found about my problem :
http://groups.google.com/group/web2py/br
On Wednesday, June 29, 2011 1:08:19 PM UTC-4, Nick Arnett wrote:
>
> I'm just getting to know Web2Py after working with Django a fair bit. I
> have robots that gather data that I would like to insert using the Web2Py
> ORM, but I can't quite figure out the right way to do that. If I put the
>
Yeah;
I a using latest trunk;
I will try again.
Perhaps I am making a mistake? like I said it worked with Bruno's
suggestion.
On 6/29/11 2:33 PM, Anthony wrote:
Hmm, it works fine for me. Did you do:
{{if 'form' in response._vars:}}
{{=form}}
{{pass}}
For me, if my controller returns dict
I usually just do {{if form:}}{{=form}}{{pass}}
Hmm, it works fine for me. Did you do:
{{if 'form' in response._vars:}}
{{=form}}
{{pass}}
For me, if my controller returns dict(..., form=some_form_object), the form
gets displayed, but if the dict does not include a 'form' key, nothing is
displayed, and there is no error.
Anthony
On Wednes
I'm just getting to know Web2Py after working with Django a fair bit. I
have robots that gather data that I would like to insert using the Web2Py
ORM, but I can't quite figure out the right way to do that. If I put the
bot scripts in the modules directory, I don't seem to have access to the
ORM.
On Jun 29, 2011, at 9:40 AM, Bruno Rocha wrote:
> In default.py just create a function called default.
>
> def default():
> if request.args(0):
> redirect(URL("default", request.args(0))
>
> This will act as a proxy.
>
>
This depends on which router you use. The parametric router w
yes! awesome!
just came to my mind having such a system for multiple forms/wizards
managed by the db. So you could easily add forms like that in your app
and manage them. Good for more complex apps like SAP.
On Jun 29, 5:17 pm, GoldenTiger wrote:
> iujuu
>
> Bruno, it`s the best web2py plugi
Strange this did not work.
But Bruno's solution did.
if 'form' in globals():
{{= form }}
On 6/29/11 11:40 AM, Anthony wrote:
If you want to test specifically whether 'form' was returned in the
dict of the controller action (as opposed to possibly being defined in
a model file), you can a
In default.py just create a function called default.
def default():
if request.args(0):
redirect(URL("default", request.args(0))
This will act as a proxy.
http://zerp.ly/rochacbruno
Em 29/06/2011 13:27, "elffikk" escreveu:
> how is reacting google (and other search engines) at urls
iujuu
Bruno, it`s the best web2py plugin for me
congratulations + thanks
No
On Jun 29, 10:39 am, Ed Greenberg wrote:
> Looking at the code to gluon.dal.Rows.export_to_csv(), it does not
> seem possible to suppress the header on the first line. Is there a
> way to do this?
IS_DECIMAL_IN_RANGE and IS_FLOAT take a an attribute called dot="."
which you can internationalize
IS_DECIMAL_IN_RANGE(dot=T("."))
On Jun 29, 5:39 am, tomtom5 wrote:
> I'm currently diving into web2py and got a problem localising input/
> output of Decimal/Double form fields according to the us
Try use the latest web2py with
Auth(cas_provider='http://default/user/cas')
and it should be smart about passing over field values.
Ina ny case CAS can be customized a lot. Loot at the code examples in
gluon/contrib/login_methods/cas_auth.py
On Jun 29, 3:28 am, sagar wrote:
> Hi,
>
> I h
If you want to test specifically whether 'form' was returned in the dict of
the controller action (as opposed to possibly being defined in a model
file), you can also do:
{{if 'form' in response._vars:}}
On Wednesday, June 29, 2011 11:02:06 AM UTC-4, rochacbruno wrote:
> {{if 'form' in glo
Looking at the code to gluon.dal.Rows.export_to_csv(), it does not
seem possible to suppress the header on the first line. Is there a
way to do this?
Adding to the plugins thread...
PowerFormWizard:
https://groups.google.com/d/msg/web2py/VOlroPs5Gyo/5khwrMTjwz0J
http://labs.blouweb.com/powerformwizard
Thanks, Bruno.
This is great! Thanks for contributing. :-)
On Wednesday, June 29, 2011 10:33:10 AM UTC-4, rochacbruno wrote:
> Hi,
>
> I just created a new plugin for stepped form wizards.
>
> I made it last night, so it is not tested very well, I would like your help
> to test it.
>
> web2py PowerFormWizard
{{if 'form' in globals():}}
{{=form }}
{{pass}}
On Wed, Jun 29, 2011 at 12:00 PM, David J. wrote:
> I am wondering why if I dont return anything in my dict and in my view
>
> {{if form:}}
> {{= form }}
> {{pass}}
>
> I get an exception.
>
>
> S'Traceback (most recent call last):\n File "/apps
On Wed, Jun 29, 2011 at 11:55 AM, Tito Garrido wrote:
> This is awesome! Really cool plugin ;)
>
Thanks, I did for use in one of my systems, and I like to share cool stuff.
That is based on great jquery libs made by @wbotelhos
>
> Is there a way to change the next step based on choices of a pre
I am wondering why if I dont return anything in my dict and in my view
{{if form:}}
{{= form }}
{{pass}}
I get an exception.
S'Traceback (most recent call last):\n File
"/apps/www/web2py.trunk/gluon/restricted.py", line 192, in
restricted\nexec ccode in environment\n File
"/apps/www/w
This is awesome! Really cool plugin ;)
Is there a way to change the next step based on choices of a previous step?
Regards,
Tito
On Wed, Jun 29, 2011 at 11:33 AM, Bruno Rocha wrote:
> Hi,
>
> I just created a new plugin for stepped form wizards.
>
> I made it last night, so it is not tested v
Hi,
I just created a new plugin for stepped form wizards.
I made it last night, so it is not tested very well, I would like your help
to test it.
web2py PowerFormWizard Plugin - based on Jquery Stepy
- Steps
- Customizable titles
- Server side validation
- Client side validation (with jquery va
Hello,
I tried what Jonathan suggested in the threads : request.extension=None but
it seems that .load still propagate... First the url that I pass in my
redirect should appear in the navigation address bar. Second the validator
don't show up on a redirected form that fail...
Richard
On Tue, Jun
Helpers are callable objects that take arguments, and you cannot use an if
statement as an argument in Python. However, you can use a conditional
expression, so the following should work:
*[TR(TD(row.DBQuery.ExampleName), _class='Test1' if row.DBQuery.Value==1
else 'Test2') for row in query]
well, I have to disagree.
Not that I wouldn't think like with your experience. I just have to
say that I have a webfaction account with around 3-4 apps at the most
cheap plan which is really low and It's working very well. Until now,
I had a great experience with them, almost 2 years have passed. N
Hi
is it possible to use conditions in HTMl Helpers like TABLE()?
for example I build a HTML table with
tablehelper = TABLE(
TR( TD(TD(B("Example"))),
*[ TR( TD( row.DBQuery.ExampleName) ) for row in query]
)
now is it possible to do something li
I'm currently diving into web2py and got a problem localising input/
output of Decimal/Double form fields according to the users (browsers)
locale. I understand the mechanism of internationalising messages with
T(..), but that doesn't seem to help me further. What I need is, that
for example a germ
The default, if not specified is always None (NULL). Some DBAs will argue
for and against storing NULL values in a database, but I personally use
NULLs simply because they allow more flexibility. For example, say you have
a text field in one of your tables. This text field should be set by the
This is interesting. Could you tell me how to use this in Web2py?
On Jun 29, 4:10 pm, Bruno Rocha wrote:
> if want an easy way...
>
> http://easyframework.com/+ web2py
>
> --
> Bruno Rocha
> [ About me:http://zerp.ly/rochacbruno]
>
>
>
>
>
>
>
> On Tue, Jun 28, 2011 at 5:32 AM, niknok wrote:
> >
Hi,
I have to use CAS for two of my apps.
Its working fine when both having default same registration process.
Here one of my app has some extra fields in registration like mobile
no etc what is ideal way to deal with it in such a cases.
Is there any documentation about CAS to get good understa
if want an easy way...
http://easyframework.com/ + web2py
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
On Tue, Jun 28, 2011 at 5:32 AM, niknok wrote:
> **
> Hello all.
>
> How can I create a web2py interface similar to that of the Chromium Browser
> when you need to change the b
77 matches
Mail list logo