Solved with this "trick"
I edited *gluon/dal.py* adding *try*/*except: pass* code, around the 3
lines where is this self._execute("SET sql_mode='NO_BACKSLASH_ESCAPES';")line.
I'm sure that isnt the correct solution, but helped to see the app running
:)
If someone has a better solution, is welco
Hi All:
I've developed an app, now is time to depoly in production server. In
development stage the app works perfect, using with mysql v5.
Even if access from console, using mysql -u *username* -p *password* -h
*serverIP
... * logged in as expected.
And my production server, cant be upgraded
Hi All:
I've this situation:
Based in a config file, the app must read /modify rows from some table,
i.e. "tableA" BUT if in config file have setted an "test mode" must
read/modify rows from another tables. i.e. "tableA_test"
So, in db.py i read if is setted "test mode" or not, and then initaliz
Do you have enable all the apache modules indicated in web2py book?
look very very very simple! Great!
You win a new Python Roll reader ;)
thanks!
Thanks for the reply!!
I resolved this way:
On the client side:
add one more parameter to the request, the lenght of the array,
( arrayLenght )
On the server side:
get the request.vars.arrayLenght
create an empty list "data"
iterate in range (0 to arrayLenght)
and for each step use:
myKey1
Hi all:
Have a question (possible very simple).
In my view, I've some js code that append data to a js array like this:
myarray.push({someKey: "someValue", anotherKey: "another value"})
after a few pushes, I'm gettin an array like this
myarray[0] : {someKey: "someValue", anotherKey: "another valu
Hi Vinnet:
The easiest way to achive this, is showing a image (http://www.ajaxload.info/
Hi Richard:
I think you need fire the onchange event, in the select tag ( whit
_onchange="yourJSFunction();" if using SELECT helper)
May be you can see this slice (
http://www.web2pyslices.com/slices/take_slice/144) and the working sample
app:
http://ochiba.fluxflex.com/Ajax_Cascading_Drop_Down/
Hi Vineet:
You need to change this line;
for this line:
(change id='name' for name="name")
HTH!!!
Bye
Hi miroslavgojic:
To see html and other things like css, javascript I recomend you use firebug
(a firefox addon) or similar in chrome (getfirebug.com)
Other firefox addon (only useful to see html only) is: view source chart.
Both firebug and view source chart can be found in addons.mozilla.com
T
Hi Vineet:
web2py_component is a javascript function, includede in web2py.
So, there's no necesary to put {{ }} to call him.
You can see examples of web2py_component on the book (search for LOAD
function)
HTH, regards.
Hi Vineet:
I use to get args and form's field whit *request.args(N)* (N integer >= 0)
and *request.vars.fieldname* (where fieldname, is a name of an input in form
submited)
http://www.web2py.com/book/default/docstring/request.args
http://www.web2py.com/book/default/docstring/request.vars
HTH!
Hi Vineet:
First, visit this link: http://labs.blouweb.com/PowerGrid/ and click in
->Docs Icons
Is that the effect what you are lookin for?
So, you can try doing this:
on the view write an anchor A(...) with href="#"
the with jQuery, select this anchor, and override the click event, something
l
Hi all:
I really like tinyMCE, because is very powerful. I'd like to see some plugin
for that.
On the otherside, if what you need is to install an editor very quickly, I
think, you can use this plugin for w2p:
http://dev.s-cubism.com/plugin_elrte_widget
It use elRTE (http://elrte.org/) editor.
Hi:
Are you importing the required files?
Load your view in firefox, and check if firebug show some error loading the
required files or maybe is coding typo.
Then show us the code you use it.
HTH, Bye
Thanks for the mention in the Slice :)
Very clear and helpful example!
Bye
Hi:
I wanna disable some key bindings of editArea editor, only for editing
views, cause, I'm not familiar with some short codes of Zen Coding, and in
my head, some key binding like Ctrl+Shift+Arrow is to do another things, not
zen coding related, and result anoying when cursor jumps to i.e. "Pr
Hi:
I wanna disable some key bindings of editArea editor, only for editing
views, cause, I'm not familiar with some short codes of Zen Coding, and in
my head, some key binding like Ctrl+Shift+Arrow is to do another things, not
zen coding related, and result anoying when cursor jumps to i.e. "Pr
Hi Omi:
I think this should work:
put this in models/menu.py
response.menu = [
('Public', True, URL('index')),
('Member Only', False, URL('member')),
]
if (auth.user_id != None) and ((auth.has_membership(role = 'vip')) :
response.menu
Hi Omi:
I dont get want you're trying do, but may this could help you with the
show/hide actions:
I dont know if is possible to put some javascript code in the controller.
Something like:
response.js ="someJSFunctionInTheView();" #this js function show/hides
element s in the view
If you use t
Hi Omi:
I think you must have a error in this line:
result += " some text maybe
showing id too:"+ *str(*model.id*)* +""
or this one, more pythonic:
result += " some text maybe showing id too:%s" %
(model.id, model.id)
Another thing I use to do, is print variables that I'm using, just to see
Hi Omi:
I think, that you need a jQuery Load http://api.jquery.com/load/
something like
in the view:
jQuery.load( "url to echo function", {params, like category id, if
necesary}, '#jquery selector of second combo' )
In the echo function:
validate that you get a valid category id
do a sel
Thanks for the reply!
Very clear explanation!
So, I'll keep my .load files, for future customization of each components.
Thanks a lot!
I've found the paragraph of the book, that I readed when I'm saying: "...I
read somewhere in the book..."
[http://www.web2py.com/book/default/chapter/13#Components]
If no .load view is specified, there is a generic.load that renders the
dictionary returned by the action without layout. It works
+1 for fully english demo.
Will be appreciated :)
Hi all:
I think this topic is related with backward compatibilty discussed in
another thread, but anyway.
The situation:
I've developed an app using web2py src version 1.95.1, in this app I load a
form, from the view calling web2py_component using extension ".load"
Something like this:
#View:
Some weeks ago, I reported here some typo related with validators. Someone
tell me that the typo has been corrected, but when I check again the book,
the typo still there.
PS: And I see Book (es) but fully english lang
HTH
Bye, and sorry for my bad english
Hi Anthony:
downforeveryoneorjustme tells me that is up, my browser too, with a delay
longer than normal, but loads ok!
I think hosting still with some issues.
Bye
Hi Massimo:
When do you estimate a release date for 1.99.1 ? maybe days, weeks,
hours,...?
Bye
Hi, Villas:
When I report the typo, I was reading the online version of the book.
Also, I'm still reading the typo, (recently refreshed page), maybe
something is caching, I'll retry later.
Bye.
On 7 sep, 12:10, villas wrote:
> You are right, it is really a typo but I see it has already been co
43, Bruno Rocha wrote:
> Both will work.
>
> http://zerp.ly/rochacbruno
> Em 07/09/2011 10:36, "juanduke" escreveu:
>
>
>
>
>
>
>
> > Hi!
> > Reading the validators section, it says:
>
> > IS_NULL_OR
> > Deprecated, an alias for
Hi!
Reading the validators section, it says:
IS_NULL_OR
Deprecated, an alias for IS_EMPTY_OR described below.
IS_EMPTY_OR
Sometimes you need to allow empty values on a field along with other
requirements. For example a field may be a date but it can also be
empty. The IS_EMPTY_OR validator allows
33 matches
Mail list logo