Ok Thank you Niphlod, just found in manual this:
If you want the field validated, but you do not want a drop-down, you must
put the validator in a list.db.dog.owner.requires = [IS_IN_DB(db,
'person.id', '%(name)s')]
hahaha sorry I was desperate to solve my problem..
Thanks!
On Sunday, Feb
Oh ok I got it...
I just forgot about this b/c I use a manual autocomplete function...
I was using IS_IN_DB just as a validator to make sure user don't try to
input wrong value
I think I`ll make one validator just for validate user...
Do you think this is a good idea to add to the framework?
Hi,
I made some tests with lots of data on some tables.
In some tests I was using:
SQLFORM(db.table, record=rc)
But it became very slow after putting data
When I was debugging I found that if you use IS_IN_DB() it searches the
other table even if you are selecting one existing record or inse
Please add us Massimo:
Company: NRG Internet Solutions
Incorporated: Brazil
website: http://www.nrg.com.br
On Sunday, February 15, 2015 at 8:21:36 PM UTC-2, Massimo Di Pierro wrote:
>
> We need to update the list of companies that provide web2py consulting.
> This list is obsolete:
>
> http://w
application/json'
return json(data, default=default or custom_json)
On Wednesday, January 21, 2015 at 5:04:31 PM UTC-2, André Kablu wrote:
>
> Hi all,
>
> I just updated one of my projects to 2.9.12 and after that all views that
> have a code like this does not
Hi all,
I just updated one of my projects to 2.9.12 and after that all views that
have a code like this does not work:
SCRIPT('somecode(' + response.json + ')')
the response.json is changing the content-type of the page to json...
if we use:
return response.json
there will be no problem,
b
-bit Python, 2gb seems to be the largest amount of data you can send in
>>> one sendall.
>>>
>>> On Tuesday, October 28, 2014 10:35:10 AM UTC-7, André Kablu wrote:
>>>>
>>>> Thanks Derek,
>>>>
>>>> But seems this bug in the
27;s the issue as it relates to OSX and Python...
>
> http://bugs.python.org/issue8493
>
>
> On Monday, October 27, 2014 12:38:02 PM UTC-7, André Kablu wrote:
>>
>> Hi all,
>>
>> Anyone can tell me if there are any limitations on response buffer size?
>>
>&g
Hi all,
Anyone can tell me if there are any limitations on response buffer size?
I created a proccess that generates 6000 lines, when I try to output them
to browser1 i got the error from Rocket:
File "/web2py/gluon/rocket.py", line 152, in _sendall_darwin
sent = self.socket.send(buf[offset:])
it should be a recurrent question, but I could not find anything related...
I have two domains using the same web2py:
routes.py
# -*- coding: utf-8 -*-
routers = dict(
# base router
BASE=dict(
default_application='app1',
domains = {
'py.test.com': 'app1',
Sure. Did you pushed it? I cannot find it there...
Many thanks!
On Friday, June 13, 2014 1:45:44 PM UTC-3, Massimo Di Pierro wrote:
>
> I have a possible fix in trunk. Can you help test it?
>
> On Wednesday, 11 June 2014 23:06:44 UTC-5, André Kablu wrote:
>>
>>
>&g
I have a mysql database and created a LIST:INTEGER field
It is created in MYSQL as LONGTEXT type of data
In one of my queries I have received an error:
*WEB2PY QUERY:*
db.table.id_field_list.contains(db.table2.id)
*MYSQL QUERY:*
SELECT * FROM table, table2 WHERE (table.id_field_list LIKE
(CO
Yes just migrated to mongodb, and there really exist some issue.
using CASCADE or SET NULL, it does not matter, web2py does not respect and
remove the reference from the referencing collection or delete the
reference...
Em quinta-feira, 20 de março de 2014 16h16min43s UTC-3, André Kablu
you can do it by using
FORM(_class='yourclass', _role='role')
Em quinta-feira, 20 de março de 2014 13h14min17s UTC-3, Leonel Câmara
escreveu:
>
> {{form['_class'] = 'service-form'}}
> {{form['_role'] = 'form''}}
> {{=form.custom.begin}}
>
>
> The generated html was:
>
>
> Is this the supposed
I have 2 tables, using sqlite:
db.define_table('color',
Field('color', 'string'))
db.define_table('tshirt',
Field('name', 'string'),
Field('colors', 'list:reference color',
ondelete="SET NULL"))
When I delete a color, all ts
I have 2 tables, using sqlite:
db.define_table('color',
Field('color', 'string'))
db.define_table('tshirt',
Field('name', 'string'),
Field('colors', 'list:reference color',
ondelete="SET NULL"))
When I delete a color, all ts
just found the answer
multiple=(1,x)
anyway would be good if the notnull param works
Em domingo, 2 de março de 2014 16h34min35s UTC-3, André Kablu escreveu:
>
> I am using version 2.9.1 beta
>
> When creating a db, if I use this:
>
> Field('product_ids', '
I am using version 2.9.1 beta
When creating a db, if I use this:
Field('product_ids', 'list:reference product')
Does not force user to fill the field (not null).
Even if I put notnull=True, the user can bypass the field and left it
blank.
Any ideas?
--
Resources:
- http://web2py.com
-
Or you could automatically check for auth.user_id right after the
validation.
Em domingo, 16 de fevereiro de 2014 12h39min40s UTC-3, Anthony escreveu:
>
> I suppose you could do:
>
> if response.flash == auth.messages.invalid_login:
>
> Otherwise, you can create an auth.settings.login_onfail ca
Here is what I have:
I have a legacy db in mysql named cep, so I'd created two dbs in my
application, one for the app and one for this legacy table:
db = DAL('sqlite://storage.sqlite', pool_size=1, check_reserved=['all'])
db_endereco = DAL('mysql://user:pass@localhost/cep')
db_endereco.define_
Hi all,
I'd created one application that loads 15 lines of a mysql database.
Then I put all 150k lines in a list(), doing many math calculations.
The results are displayed to the user and process is finished.
It is a very simple select, and a for loop to put values on the array and
do math ca
Done. +1
Em sábado, 24 de agosto de 2013 20h26min03s UTC-3, Massimo Di Pierro
escreveu:
>
> web2py has many users but few github followers. This is a problem because
> the number of followers is a metric that can be used to guess popularity.
>
> You can help.
>
> Get a github account and click
If you use IS_IN_DB it will automatically check if is not empty.
The function IS_IN_DB, if used inside list brackets [IS_IN_DB(...,...)]
will not show the dropdown. This is the correct behavior.
Em quarta-feira, 24 de julho de 2013 20h19min18s UTC-3, Antonis
Konstantinos Tzorvas escreveu:
>
>
Is there a way to not display None in not filled date fields when
displaying in SQLFORM.grid?
I tried to use represents but I cannot change type to string to show '' or
a message.
Thanks!
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
Ok just got it... I replaced static folder and it worked...
Something that was changed in there will not accept backward compatibility.
Em quinta-feira, 4 de julho de 2013 16h22min10s UTC-3, André Kablu escreveu:
>
> Hi,
>
> I just updated my web2py to last GIT version, and
;second_frame', ajax=True)}}
Any ideas?
Thanks!
André Kablu
--
---
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 it, send an email
to web2py+unsubscr...@googleg
Hi,
The best way to do this is to create subdomains.
So you will have:
/home/user/www
/home/user/phpapp
and you can create a subdomain this way:
php.mydomain.com (that refers to /home/user/phpapp)
to call it directly using your main www.mydomain.com you can create a
redirect app.
in web2py
e 2013 20h36min24s UTC-3, André Kablu
escreveu:
>
> Hi all,
>
> I am trying to create a grid with a query for auth_user table doing this:
>
> def controller1():
>
> query = ((db.auth_user.id == db.auth_membership.user_id) &
> (db.auth_
Hi all,
I am trying to create a grid with a query for auth_user table doing this:
def controller1():
query = ((db.auth_user.id == db.auth_membership.user_id) &
(db.auth_membership.group_id == 1))
grid = SQLFORM.smartgrid(db.auth_user,
constraints
Hi,
I don`t know why you are referencing another table, but if this is only for
populate that field and you know that those values will not change or
increase, you may consider using lists:
METALS = (
(1, 'silver'),
(2, 'gold'),
(3, 'iron'),
(4, 'zinc')
)
db.table.field1.require
Nevermind... found that this is no bug...
need to add
auth.settings.controller = 'x'
;)
Em segunda-feira, 10 de junho de 2013 23h17min49s UTC-3, André Kablu
escreveu:
>
> I wrote some code here extending auth to create different sessions...
>
> Then I could create here
ply to see if anything else would be
> required, but feel free to give it a shot.
>
> Anthony
>
> On Monday, June 10, 2013 1:04:29 AM UTC-4, André Kablu wrote:
>>
>> Thanks again Anthony! It is a good alternative. ..
>>
>> However It would be very good if we cou
Thanks again Anthony! It is a good alternative. ..
However It would be very good if we could use 2 auth...
As you can see I'd changed table names...
I'll study auth class in deep to see if i can extend it and change some
function to make it accept some parameter so it would be possible to set w
I build a application that have 2 AUTH objects...
I use 1 Auth object for the main site functionality that contains many
levels of users (using default tablename settings for auth)
and I made 1 more Auth table to use as SITE ADMIN, just to control main
site admin functions on a separated contro
well, just to understand better
lets say I have this:
def test(var):
if var:
redirect('x')
"other code"...
return
def test2():
Em domingo, 9 de junho de 2013 18h53min41s UTC-3, André Kablu escreveu:
>
> just a question
>
> if I have this c
just a question
if I have this code:
def test(var):
if var:
redirect('x')
"other code"...
return
if I do test(true) will "other code" run or the function just exits?
thanks!
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users"
This works fine for defining another class like:
But not for defining size manually like:
Anyway we can change fields using classes now!
Thanks!!!
Em domingo, 9 de junho de 2013 12h26min04s UTC-3, Massimo Di Pierro
escreveu:
>
> Thanks! In trunk.
>
> On Sunday, 9 June 2013 07:06:25 UTC-5, An
web2py.css?
Thanks!
Em sexta-feira, 7 de junho de 2013 17h02min25s UTC-3, André Kablu escreveu:
>
> one more information...
> if I put on my html file a html code like this:
>
>
> it also does not change the css effect to the correct class "input-small"
>
>
one more information...
if I put on my html file a html code like this:
it also does not change the css effect to the correct class "input-small"
Em sexta-feira, 7 de junho de 2013 16h51min36s UTC-3, André Kablu escreveu:
>
> Hi all,
>
> I am trying to change a
Hi all,
I am trying to change a class of a field using form.element on my user.html
view:
{{=form.custom.begin}}
Name: {{
form.element('input',_name='first_name')['_class']='input-medium'
=form.custom.widget.first_name
}}
{{=form.custom.end}}
It changes the HTML on the source code:
Hi all,
I am creating a new app using MYSQL... and many times I needed to change
the fields, including keys, foreign keys, etc...
And I always get many mysql errors of not possible to rename, not possible
to delete, not possible to create, etc...
So what I need to do is to copy all my files to
is the source of the web2py recipes book.
>
> On Monday, 27 May 2013 20:50:08 UTC-5, André Kablu wrote:
>>
>> O I got that... thanks for the response...
>>
>> However I still miss some details...
>>
>> like for an example
>>
>> I was looking some way
with any dictionary -- the first argument is the key you want to
> retrieve from the dictionary, and the second is a default value to return
> in case the key does not exist.
>
> Anthony
>
> On Sunday, May 26, 2013 3:38:17 PM UTC-4, André Kablu wrote:
>>
>> Hi all,
&g
Hi all,
I have been adventuring myself with web2py for some months now, just to
learn it, and I am enjoying very much. web2py is an awesome MVC.
However it is my first time with python (yes I am only using python now b/c
of web2py :D ), and I am missing so much some kind of "functions index" fo
44 matches
Mail list logo