hello this code
a=form.elements('#trabalhador_val_formacao__label')
a[0]['_class'] = 'label label-warning'
only appends to the existing class in the label.
I want to replace existing label class with another one
how do i do it?
Thank you
António
--
---
You received this message
Hi
No I am not calling it from a component, but from a jQuery post when I
submit a phone number from a post via ajax.
Any ideas?
On Friday, May 10, 2013 2:49:33 PM UTC+8, Niphlod wrote:
>
> if you're using components, use response.js .
> http://web2py.com/books/default/chapter/29/12?search=
Hi
I am having a problem because my forms are getting sent with multiple
values. The issue is that on my page there are multiple places where the
same formnames are used. So the post vars becomes like this:
Parametersapplication/x-www-form-urlencoded
answer280lesson75lesson75lesson75player_answ
We recently updated a somewhat complex app from web2py 1.99.4 to 2.4.2 and
it was pretty straightforward. Going to 2.4.6 should be exactly the same.
Do make backups and test everything before going live.
Things that required intervention were experimental features of web2py that
we used, such a
http://web2py.com/books/default/chapter/29/11#Eval-target
On Friday, May 10, 2013 6:13:23 AM UTC-4, Mika Sjöman wrote:
>
> Hi
>
> No I am not calling it from a component, but from a jQuery post when I
> submit a phone number from a post via ajax.
>
> Any ideas?
>
> On Friday, May 10, 2013 2:49:33
Unless you are using formstyle='bootstrap', web2py does not add any class
at all to elements -- instead, the "w2p_fl' class is added to the
label's parent element (which is a TD, DIV, or LI, depending on the
formstyle). The 'bootstrap' formstyle adds a 'control-label' class directly
to the lab
Some of those rogue robots / harvesters are really damaging. I've seen them
bring entire sites down. We are using mod_evasive and mod_bw for apache and
also permanently ban certain IP ranges. But as you can see, none of this is
web2py specific.
Regards,
Ales
On Thursday, May 9, 2013 8:58:43 P
Hi,
I have implemented a RESTful api in web2py which handle the usual GET,
POST, PUT, DELETE. (using @request.restful())
Is there a standard mechanism in web2py to implement OPTIONS requests?
Thanks,
Daniel
--
---
You received this message because you are subscribed to the Google Groups
"we
the default function that you're using (ajax()) defined in web2py.js can't
handle the "please restrict only to this formname" scenario.
it's a bad design choice to have the same input names for different forms.
It's a bad design choice to have the same formname for different forms
(because of po
Ok, apparently the commenting of
option httpchk GET /
like
#option httpchk GET /
solved the issue, now the logs do not get clogged with useless data.
It was just the haproxy that failed to start.
On Friday, May 10, 2013 1:37:27 AM UTC+1, smoggy wrote:
>
> I've checked ./haproxy-1.4/con
Advice doesn't have to be Web2py specific.
Much appreciated,
Alex
On Fri, May 10, 2013 at 4:43 AM, LightDot wrote:
> Some of those rogue robots / harvesters are really damaging. I've seen
> them bring entire sites down. We are using mod_evasive and mod_bw for
> apache and also permanently ban
True!
Here a post I made with a list of all the files that should be update on
web2py update :
https://groups.google.com/d/msg/web2py/tVyL7z7WHkw/mce13Vh-k3UJ
I think we should create a Slice with it if not already done...
Richard
On Fri, May 10, 2013 at 7:13 AM, LightDot wrote:
> We recent
It's not quite clear what your HTML looks like -- are you saying you have
multiple forms (i.e., ) with the same web2py formname (i.e.,
same value in the hidden _formname field)? Or do you just have multiple
elements with the same names (perhaps in separate forms, or outside
of forms altogether
How do I search for all products of a certain combination of filters in a
many to many relationship? The products returned have to at least have the
filters given.
For example, if I had this many to many relationship:
db.define_table('thefilter_products',
Field('product', db.products),
*Note, form.element() returns the first matching element, so no need to do
form.elements(...)[0].*
*
*
This does not seem true
if i remove [0] like this
a['_class'] = 'label label-warning'
i get the error
TypeError: list indices must be integers, not str
2013/5/10 Anthony
> Unless you are
assuming that your filter is indeed
myfilter = db(db.thefilter.name == 'Tops')
all_products_that_are_tops = db(db.products.thefilter.belongs(myfilter.
_select(db.thefilter.id)))
this basically searches all the ids of the "thefilter" table that have a
"name" == Tops.
Then passes those id to th
Model
db.define_table('content',
Field('username'),
Field('text', 'text'),
Field('file', 'upload'),
Field('userpicture'),
Field('time', 'datetime', update=request.now),
Field('userid', readable=False),
Field('votesup', 'integer', default=0),
Field('votesdown', 'integ
Notice it is form.element(), not form.elements(). The first returns the
first matching element -- the second returns a list (even if it contains
only one match).
Anthony
On Friday, May 10, 2013 11:40:58 AM UTC-4, Ramos wrote:
>
> *Note, form.element() returns the first matching element, so no n
nice point. :)
2013/5/10 Anthony
> Notice it is form.element(), not form.elements(). The first returns the
> first matching element -- the second returns a list (even if it contains
> only one match).
>
> Anthony
>
> On Friday, May 10, 2013 11:40:58 AM UTC-4, Ramos wrote:
>
>> *Note, form.eleme
I'm using "selectable=True" in the sqlform.grid. This shows a checkbox in
first column for all the rows "except the header"
and there is submit button i want to get all the Checked item id
please reply ...
--
---
You received this message because you are subscribed to the Google Groups
"web2
Hi I am new developer with Web2py so getting problem to work on so please
help
I'm using "selectable=True" in the sqlform.grid. This shows a checkbox in
first column for all the rows "except the header" and Submit Button
i want to get all the Selected check box id on clicking on submit button
Hi
you have to use
selectable = lambda ids: function(ids)
def function(ids):
...
...
...
On Fri, May 10, 2013 at 9:14 AM, Pawan Jha wrote:
> Hi I am new developer with Web2py so getting problem to work on so please
> help
>
>
> I'm using "selectable=True" in the sqlform.grid. This shows a che
I'm trying to display ShipQty field value with correct number format such
as 1,500 but it shows 1500. I don't know if my represent statement is wrong
or because I'm using bootstrap table style...
model
db.define_table('shipping',
Field('FullOrderNumber', length=11, label='
Hm.. Maybe I'm not understanding something. I thought the standard way of
creating a many to many relationship was to create a table which holds the
ids of the two things you're creating a relationship with. With this
example,
db.define_table('products',
Field('name'))
db.define_tab
LS
I (am new and) want to develop a web business application. The user
interface (gui) should look like a windows application, just like the
pyside app I've build.
How can this be done ? What library should I use ? Do you know of an
example ?
This library shows that it is possible. Can this libr
I want to develop a business web app. I want the user interface (gui) to be
like a windows interface more or less the same as the app windows version
build with qt (pyside).
What gui library do I need ?
Thanks
Arthur
--
---
You received this message because you are subscribed to the Google G
I need help.
On Friday, 10 May 2013 16:53:23 UTC+1, sasogeek wrote:
>
> Model
> db.define_table('content',
> Field('username'),
> Field('text', 'text'),
> Field('file', 'upload'),
> Field('userpicture'),
> Field('time', 'datetime', update=request.now),
> Field('userid',
What is exactly happening?
The votesup field is not being added or the updated result is not being showed?
Using some inspection tool, is your default/voteup() function being invoked?
What did you already tried?
Help us help you.
On Fri, May 10, 2013 at 3:46 PM, sasogeek wrote:
> I need help.
Hi,
I'm trying to implement a drop-down based on the one at
http://www.web2pyslices.com/slice/show/1467/cascading-drop-down-lists-with-ajax
While the example above works great, I don't seem to be making a successful
ajax call in my adaptation.. Basically, the second dropdown does not reload
sorry, I didn't understood what you model was.
So, let's say you have
products table:
id name
1 "foo"
2 "bar"
and filters table:
id name
1 "top"
2 "sweatshirt"
3 "hoodie"
and a product_filter table
id product_id filter_id
1 1 1
2 1 2
3 2 3
so, basically, wh
represent is used in widgets only, it doesn't get called for "raw"
representations such as {{=record.column}}
if you want to leverage your model's represent, you have to call it
{{=db.table.column.represent(record.column, record)}}
On Friday, May 10, 2013 6:57:48 PM UTC+2, Omi Chiba wrote:
>
> I
Thank you for the info!
I finally solved it by referencing the previous post!!
https://groups.google.com/forum/?fromgroups=#!searchin/web2py/Number$20format$20locale/web2py/51XIw3Lz74c/vLnyxa9gfmgJ
model
--
import locale
locale.setlocale(locale.LC_NUMERIC, 'English')
def number_format(nu
warning... setlocale is NOT threadsafe.
http://docs.python.org/2/library/locale.html
use it wisely.
On Friday, May 10, 2013 9:20:38 PM UTC+2, Omi Chiba wrote:
>
> Thank you for the info!
>
> I finally solved it by referencing the previous post!!
>
> https://groups.google.com/forum/?fromgroups=#!
Maybe try:
onchange="jQuery(district_select).remove(); ajax('%s', ['title_select'],
'shadow_clone');" % URL('default', 'maker')
Anthony
On Friday, May 10, 2013 2:18:55 PM UTC-4, Jordan Ladora wrote:
>
> Hi,
>
> I'm trying to implement a drop-down based on the one at
> http://www.web2pyslices.c
Thanks for your patience. That's neat. I didn't know you could declare a
linkage table like that. I don't think that scenario would fit into what
I'm thinking.
Please let me rephrase my example scenario.
What about this scenario:
id name
1 "foo"
2 "bar"
3 "hello"
4 "world"
and filt
nothing happens, and i think it's because i didn't include layout...
because when i do the exact same thing in the book, it works fine, but with
the same example, when i remove the extend layout line, it doesn't work
anymore i don't want to use the default layout though... what files
should
Looks like a great solution! Thanks!!
// mika
On Friday, May 10, 2013 9:42:46 PM UTC+8, Anthony wrote:
>
> It's not quite clear what your HTML looks like -- are you saying you have
> multiple forms (i.e., ) with the same web2py formname (i.e.,
> same value in the hidden _formname field)? Or do
I have pre-populated a table of types by name:
db.item_type.insert(name='Type1'...)
db.item_type.insert(name='Type2'...)
db.item_type.insert(name='Type3'...)
...
db.item_type.insert(name='Type10'...)
db.item_type.insert(name='Type11'...)
...
I want to use the table as selection in an
There is a nice course on Python, Sqlite, Wsgi, Flask and web2py:
http://www.realpython.com/#pricing
Check it out.
Massimo
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from
Hi Mika,
Have you tried simply retunrning the jQuery string.
I have some ajax calles in my projects and it is working fine for me.
There are two difference I don't use: return false; when calling ajax and
return the jQuery command not a variable
I hope I could help
Regargds
Greg
On Friday, 10
In an application created in a previous version of web2py, the Boostrap
tooltip works fine.
When create an application in web2py 2.4.6 the exact same code no longer
works,
the tooltip defaults to the ugly yellow one.
in the view:
test
in web2py.js:
function web2py_ajax_init(target) {
jQue
41 matches
Mail list logo