Re: [web2py] Re: web2py database migration workflow

2014-09-02 Thread Diogo Munaro
Hey guys, I updated developers readme: https://github.com/dmvieira/web2py-migrate/blob/master/README.md#for-developers 2014-09-02 17:29 GMT-03:00 Diogo Munaro : > Thank you Dave! > > Hey!! The project have an issue about mercurial [1] and you can help a lot > with sqlite too! >

Re: [web2py] Re: web2py database migration workflow

2014-09-02 Thread Diogo Munaro
GMT-03:00 Dave S : > > On Saturday, August 30, 2014 9:15:37 PM UTC-7, Diogo Munaro wrote: >> >> Hey guys, I was thinking about web2py migrates and how control database >> version. >> >> I did a workflow that take care of database version control and it's &g

[web2py] web2py database migration workflow

2014-08-30 Thread Diogo Munaro
Hey guys, I was thinking about web2py migrates and how control database version. I did a workflow that take care of database version control and it's extensible for a lot of version controls (like git or mercurial, but by now only git) and databases (by now only mysql and postgres, but extensib

[web2py] Re: MySQL will never migrate this way (not alter table problem)

2014-08-22 Thread Diogo Munaro
Summary: We can't make some database migrates on MySQL because we can't DROP column with foreign key. Suggestions? Em segunda-feira, 18 de agosto de 2014 09h46min49s UTC-3, Diogo Munaro escreveu: > > Hey guys, I'm trying to do CI (continuous integration) on web2py > a

[web2py] MySQL will never migrate this way (not alter table problem)

2014-08-18 Thread Diogo Munaro
Hey guys, I'm trying to do CI (continuous integration) on web2py application. I really need automatic database migration and web2py is really good with it, but using MySQL I notice that we have some caveats

[web2py] Re: web2py 2.6.4 mysql migration problem

2014-08-18 Thread Diogo Munaro
You have a lot of indexes into one table Em segunda-feira, 23 de setembro de 2013 08h47min08s UTC-3, frasse escreveu: > > Hi All > I try to follow migration recommendation for mysql in web2py 2.6.4 . as > follow > >1. I am setting migrate_enabled=False >2. everything is ok >3. len

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-07-10 Thread Diogo Munaro
It's working now with '3º fail' that I describe. I'm using fake_migrate_all with previews version and migrate with new version Thx for all helpers! Em quarta-feira, 9 de julho de 2014 19h00min33s UTC-3, Diogo Munaro escreveu: > > I'm with some problems her

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-07-09 Thread Diogo Munaro
I'm with some problems here... I really hate .table files. That's my deploy routine: 1. download web2py from src 2. get my application from git and put inside web2py 3. remove some unused folders 4. backup my database 5. migrate my database structure *(that's the point!!)* 6. if

[web2py] Re: [web2py-users-brazil:6353] Is This Web2py

2014-06-10 Thread Diogo Munaro
Nossa, parabéns a toda a equipe! Eles estão na comunidade? Em 10/06/2014 16:43, "Ovidio Marinho" escreveu: > http://sentibol.com/ > > Congratulations http://sentibol.com/ourteam > > Universidade de Lavras - Minas Gerais - Brasil. > > > > > > Ovidio Marinho Falcao Neto >

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-27 Thread Diogo Munaro
; > your script anyscript.py will run as if it were a controller. > > > > > On Monday, 26 May 2014 10:54:38 UTC-5, Diogo Munaro wrote: >> >> Thx Massimo, but I need other .tables inside deploy version? >> i.e: I have my production version with x db structure, but my

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-26 Thread Diogo Munaro
ain to users. > > > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=migrate_enabled%3DFalse > > > On Saturday, 24 May 2014 10:47:38 UTC-5, Diogo Munaro wrote: >> >> But how could I manage migrates? How could I make migrates on deploy? &g

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-24 Thread Diogo Munaro
But how could I manage migrates? How could I make migrates on deploy? Em 24/05/2014 04:02, "Massimo Di Pierro" escreveu: > There is nothing equivalent to this in web2py. You just remove that line. > > On Thursday, 22 May 2014 12:43:59 UTC-5, Diogo Munaro wrote: >> &

[web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-22 Thread Diogo Munaro
Hey Massimo, and how could I replace command: "django-admin.py syncdb --noinput" ? I need migrate=False because I have a loadbalancer with elastic beanstalk Em quinta-feira, 25 de julho de 2013 11h45min05s UTC-3, Aladdin Teng escreveu: > > Thank you very much. > > On Thursday, July 25, 20

Re: [web2py] Re: Removing all tables filter_out. before_inset and before_update works?

2014-05-07 Thread Diogo Munaro
t]: remove_filters( > table)) > db[t]._before_update.insert(0, lambda s, f, table=db[t]:remove_filters > (table)) > > Instead, though, it might be worth figuring out why you're getting the > errors and seeing if that can be fixed. > > Anthony > > > On Wednesday, Apr

[web2py] Re: Removing all tables filter_out. before_inset and before_update works?

2014-05-06 Thread Diogo Munaro
No answer? Em quarta-feira, 30 de abril de 2014 11h03min48s UTC-3, Diogo Munaro escreveu: > > Hey guys! Nowadays I'm using a some filter_outs but they got update and > insert erros on record versioning. > > I'm solving update issue using before_update like this: &g

[web2py] Removing all tables filter_out. before_inset and before_update works?

2014-04-30 Thread Diogo Munaro
Hey guys! Nowadays I'm using a some filter_outs but they got update and insert erros on record versioning. I'm solving update issue using before_update like this: def remove_filter(s,field): field_obj = s.query.db[str(s.query).split('.')[0][1:]][field] field_obj.filter_out = '

[web2py] Re: pyfilesystem support (store uploads in S3)

2014-01-08 Thread Diogo Munaro
Hey guys! I know this topic is old, but here it's *working great* with mysql or sqlite on web2py 2.7.4. Just install: pip install fs Then on model: import fs.s3fs myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_key, aws_secret_key) db.define_table('image',Field('image','upload',uploadfs = myfs)

Re: [web2py] Re: Web2py crash if i define model with function

2013-11-12 Thread Diogo Munaro
Hey Michele! Now it's working... The indexes are crashing web2py on apache. With a list of indexes I can execute sql in a for: for i in indices: try: db.executesql(i) except:pass Thx for all help! 2013/11/12 Diogo Munaro > It's not working... &

Re: [web2py] Re: Web2py crash if i define model with function

2013-11-12 Thread Diogo Munaro
_size=n option with different values of n > 2) use preforking instead of threading in apache configuration > > > > > 2013/11/12 Diogo Munaro > >> Yes, thanks Michele! >> >> Omg, I was using web2py with apache. With the same code and using rocket >> server no

Re: [web2py] Re: Web2py crash if i define model with function

2013-11-12 Thread Diogo Munaro
o force db.commit/rollback in different > places to see where you start see errors. > > > > 2013/11/12 Diogo Munaro > >> The error continues, but without index :( >> >> The indexes are successful created >> >> >> 2013/11/11 Michele Comitini &

Re: [web2py] Re: Web2py crash if i define model with function

2013-11-11 Thread Diogo Munaro
The error continues, but without index :( The indexes are successful created 2013/11/11 Michele Comitini > What happens if you remove the index creation inside the try/except block? > > > 2013/11/11 Diogo Munaro > >> It's not a simple function, but putting the m

[web2py] Web2py crash if i define model with function

2013-11-11 Thread Diogo Munaro
Hi guys, first the problem: I need some databases with identical structure, but with different data. These databases must be stored with the clients because they want (different locations), but the auth system is unique. So, my structure by now is: a centralized auth system and some disyributed d

Re: [web2py] Javascript event onchange with Calendar

2013-11-05 Thread Diogo Munaro
No jose, try use .on instead of .change as the example Em 05/11/2013 16:19, "José Luis Redrejo" escreveu: > 2013/11/5 Diogo Munaro : > > Hi josé, you tried handle onchange with jquery on function? Phehaps some > js > > after declared is changing you handle. So, try

Re: [web2py] How to build a SQLFORM for relational database? Beginner in need of help.

2013-11-05 Thread Diogo Munaro
Form = SQLFORM.factory(db.author,db.link,db.post) if form.process().accepted: ... return dict(form=form) Em 05/11/2013 14:59, "Noah" escreveu: > I have a relational database structure containing 3 tables, set up in the > model as follows: > > db.define_table('author', > Field('name', 'str

Re: [web2py] Javascript event onchange with Calendar

2013-11-05 Thread Diogo Munaro
Hi josé, you tried handle onchange with jquery on function? Phehaps some js after declared is changing you handle. So, try: $(item).on("change", function(){}); Em 05/11/2013 15:52, "José Luis Redrejo" escreveu: > Hi, > I'm having problems with the Calendar used for date fields in an SQLFORM. > I

Re: [web2py] aplicação com calculo de campos

2013-11-05 Thread Diogo Munaro
adores trabalharem. >> >> O Web2py não é: >> - um CMS >> - um conjunto de componentes com regras de negócio >> >> Talvez você esteja procurando algum sistema iniciado ou já pronto. >> >> >> 2013/11/4 Diogo Munaro : >> > Usa o openerp &

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
bug. It's designed to work this way. > > [1] https://github.com/web2py/web2py/blob/master/gluon/validators.py#L2229 > > > > > On Mon, Nov 4, 2013 at 2:11 PM, Diogo Munaro > wrote: > > No, the problem is that the form get accepted only if the browser > language >

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
Thx for help Richard, but the problem persist It should be a bug or there is a trick? 2013/11/4 Diogo Munaro > No, the problem is that the form get accepted only if the browser language > is english. > > Otherwise, if the browser is in portuguese it's change the validatio

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
the error message? > > This should work : > > IS_DATE(format=T('%Y-%m-%d'), error_message=T('Valid date of format : > -MM-DD')) > > Notice the T() above... > > Richard > > > On Mon, Nov 4, 2013 at 10:19 AM, Diogo Munaro wrote: > >>

[web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
Hi, I'm using web2py 2.7.2 and date fields on DAL are translating your validate. Example: I have in model: product = db.define_table('product', Field('expiration','date')) db.product.expiration.requires = IS_DATE(format('%Y-%m-%d')) T.force(None) When I insert a date like this: *2013-11-19*

Re: [web2py] aplicação com calculo de campos

2013-11-04 Thread Diogo Munaro
Usa o openerp Em 03/11/2013 14:08, "Hermano Ponce" escreveu: > Valeu Diogo. Já procurei por ali. Web2py é muito ágil e bom pra algumas > coisas mas tem suas limitações. Estou a procura de App tipo estoque de > produtos. Mesmo valeu e estamos aí. > Em 03/11/2013 10:37, &q

Re: [web2py] how do i return several rows from json using ajax?

2013-11-04 Thread Diogo Munaro
Try: return response.json(yourjson) Em 03/11/2013 08:13, "Ricardo Pedroso" escreveu: > > Try change the response content-type, see below: > > > On Sun, Nov 3, 2013 at 6:28 AM, Mihir Lade wrote: > >> hi, >> >> i have a function in a controller which queries the database if the user >> is logged i

Re: [web2py] aplicação com calculo de campos

2013-11-03 Thread Diogo Munaro
Oi Hermano, tem alguns exemplos aqui de aplicações: http://www.web2py.com/appliances Veja o que mais se parece com o que deseja. Abraços! Em 2 de novembro de 2013 17:00, Ovidio Marinho escreveu: > Hermano boa tarde faz isso no python: > > >>>a =0 > >>>b =1 > >>>c=2 > >>>a=b+c > > e ve o result

Re: [web2py] form without errors and not accepted

2013-11-01 Thread Diogo Munaro
ard Vézina > I don't see you models for the differents dbs, so can't say how validation > should occure. > > But, it should use the same requires as are the set on these dbs... > > Richard > > > > > On Fri, Nov 1, 2013 at 12:50 PM, Diogo Munaro wrote: >

Re: [web2py] form without errors and not accepted

2013-11-01 Thread Diogo Munaro
anage the data input by yourself... search > the book with filter_field... > > You have to process you form after > > if form.process().accepted: > id = db.table.field.insert(field=form.vars.field) > ... > > Richard > > > On Fri, Nov 1, 2013 at 10:44 AM,

[web2py] form without errors and not accepted

2013-11-01 Thread Diogo Munaro
Hi again guys, I'm using SQLFORM.factory and the form returned without errors and without been accepted. *Controller*: def product(): db.product_inventory.researcher_id.default = researcher_id() form = SQLFORM.factory(db.item,db.item_image,db.product,db.product_inventory) if form.pro

Re: [web2py] Regarding checkbox implementation in web2py??

2013-10-31 Thread Diogo Munaro
Hi Akash! Use: db.Field('category','list: reference Category',requires=IS_IN_DB(db,'Category.id','Category.Name',multiple=True), *widget=SQLFORM.widgets.checkboxes.widget*) I think it works 2013/10/31 Akash Agrawall > Hie guys I am a newbie in web2py > I have added a Field in the ta

Re: [web2py] SQLFORM.factory same table twice or more...

2013-10-31 Thread Diogo Munaro
x27;t have field names in common. > > But you can .clone() your field : > > https://groups.google.com/d/msg/web2py/FAvjWNUiC3Y/gV_4BPXZkw4J > > Hope it helps > > Richard > > > > > On Thu, Oct 31, 2013 at 5:05 PM, Diogo Munaro wrote: > >> Hey g

[web2py] Multiple dbs foreign key

2013-10-31 Thread Diogo Munaro
Hello guys! I'm using web2py to create new dbs automatically for each company that uses my system. It's using a central DB for authentication and some default tables. I heard that somebody was developing an integration to work with these foreign key inter dbs. Here everything is working, except

[web2py] SQLFORM.factory same table twice or more...

2013-10-31 Thread Diogo Munaro
Hey guys, it's possible to use sqlform to generate same table twice or more? example: form = SQLFORM.factory(db.item,db.item_image,db.item_image,db.item_image) Is there exists a best way? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2

Re: [web2py] Re: Join might work? Table limits?

2013-10-31 Thread Diogo Munaro
Yes, web2py is not ok with it. Making 3 or 4 explicit joins and it gets errors 2013/10/31 Vinicius Assef > That was my point, Diogo. > > Is there some fault when we have many explicit joins in DAL? > > > On Wed, Oct 30, 2013 at 4:01 PM, Diogo Munaro > wrote: > >

Re: [web2py] Re: Join might work? Table limits?

2013-10-30 Thread Diogo Munaro
; worked and the complex one (with many joins) didn't? > > On Wed, Oct 30, 2013 at 2:31 PM, Diogo Munaro > wrote: > > Hi Michele, I'm looking here the results... > > > > If I get where and natural join is different. > > > > The explain is like that:

Re: [web2py] Re: Join might work? Table limits?

2013-10-30 Thread Diogo Munaro
_id)(db.researcher.user_id == db.auth_user.id).select(db.groups.name,db.city.name) Thank you guys! 2013/10/30 Michele Comitini > implicit inner join vs explicit should be same in speed terms, but... > > http://stackoverflow.com/questions/5273942/mysql-inner-join-vs-where > > > &

Re: [web2py] Re: Join might work? Table limits?

2013-10-30 Thread Diogo Munaro
tment by myself (is_active). It's a DAL bug? I'm using web2py 2.7.2 2013/10/30 Massimo Di Pierro > What fields do you need to select. We can optimize this. > > > On Wednesday, 30 October 2013 05:17:09 UTC-5, Diogo Munaro wrote: > >> I'ts working, but it's

Re: [web2py] Re: Join might work? Table limits?

2013-10-30 Thread Diogo Munaro
searcher_lab_permission.r**esearcher_id)(db.researcher.us**er_id == > db.auth_user.id).select(db.**groups.name <http://db.groups.name/>, > db.city.name,db.**auth_user.ALL) > > > On Monday, 28 October 2013 21:46:28 UTC-5, Diogo Munaro wrote: > >> Here is the sql generated: &g

Re: [web2py] Re: Join might work? Table limits?

2013-10-28 Thread Diogo Munaro
y_id) JOIN auth_user ON ((researcher.user_id = auth_user.id) AND (auth_user.is_active = 'T')) JOIN `researcher` AS name1 ON (researcher.id = researcher_lab_permission.researcher_id) JOIN `lab` AS name2 ON ((lab.id = researcher_lab_permission.lab_id) AND (lab.is_active = 'T')) Some JOIN

Re: [web2py] Re: Join might work? Table limits?

2013-10-28 Thread Diogo Munaro
I need these joins because I need filter some tables without selecting all the tables and filtering with where. Anyway, I tried: rows = (db.groups.id == db.lab.group_id)(db.lab.id == db.researcher_lab_permission.lab_id)(db.researcher.id == db.researcher_lab_permission.researcher_id)(db.researcher.

Re: [web2py] Re: Join might work? Table limits?

2013-10-28 Thread Diogo Munaro
Yes, thanks Massimo! The first error pass, but now: (1054, u"Unknown column 'researcher.user_id' in 'on clause'") How could I generate sql to debug it? 2013/10/28 Massimo Di Pierro > > groups = db().select(db.groups.name,db.**city.name > ,db.auth_user.email,db.research

[web2py] Join might work? Table limits?

2013-10-28 Thread Diogo Munaro
Hey guys, I'm using web2py with mysql and I can't do a Inner Join When I try: groups = db().select(db.groups.name,db.city.name, join=[db.groups.on(db.groups.id == db.lab.group_id), db.city.on(db.city.id == db.groups.city_id),

Re: [web2py] Re: form.custom usage

2013-10-25 Thread Diogo Munaro
rhaps you could produce a minimal app that replicates > the problem. Include one page that uses form.custom.widget and one that > uses form.element(), and explain how they behave differently. > > Also, note that form.elements()[0][0] is simply equivalent to form[0]. > > Anthony > >

Re: [web2py] Re: form.custom usage

2013-10-24 Thread Diogo Munaro
;s returns a text field before the validation instead of a hidden field. 2013/10/23 Diogo Munaro > Now it's working only with form.element(_name="first_name"). > > The controller is the same for 2 types. Tomorrow I'll post everything, but > now I can post the

[web2py] Re: form.custom usage

2013-10-23 Thread Diogo Munaro
r controller and view code. > > On Tuesday, October 22, 2013 3:18:16 PM UTC-4, Diogo Munaro wrote: >> >> Sorry Antony, I forgot the = here, but the code have it. >> >> The fields are there, but no validators work >> >> Em terça-feira, 22 de outubro de 2

Re: [web2py] Re: DAL and JOINS error

2013-10-22 Thread Diogo Munaro
O...Ok, thanks Anthony! 2013/10/22 Anthony > On Tuesday, October 22, 2013 3:22:09 PM UTC-4, Diogo Munaro wrote: > >> But the book is wrong? >> Here: http://web2py.com/books/**default/chapter/29/06/the-** >> database-abstraction-layer?**search=join#Inner-joins

[web2py] Re: DAL and JOINS error

2013-10-22 Thread Diogo Munaro
But the book is wrong? Here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=join#Inner-joins Em terça-feira, 22 de outubro de 2013 13h09min07s UTC-2, Anthony escreveu: > > db(db.city.name.contains('rio') & db.city.state_id == db.state.id).select( >> db.city.na

[web2py] Re: form.custom usage

2013-10-22 Thread Diogo Munaro
Sorry Antony, I forgot the = here, but the code have it. The fields are there, but no validators work Em terça-feira, 22 de outubro de 2013 12h33min37s UTC-2, Anthony escreveu: > > {{form.custom.begin}} >> >> {{form.custom.widget.first_name}} >> >> {{form.custom.submit}} >> {{form.custom.end}} >>

[web2py] form.custom usage

2013-10-22 Thread Diogo Munaro
Hi, I'm using custom forms because I have a predefined layout. So, in views, if I make: {{form.custom.begin}} {{form.custom.widget.first_name}} {{form.custom.submit}} {{form.custom.end}} The fields comes without validators. Then, it reflect problems with form.process().accepted By now, I'm us

[web2py] DAL and JOINS error

2013-10-22 Thread Diogo Munaro
Hi guy, I'm using web2py version 2.7.2 with ubuntu 12.04. I made a simple db.py: state = db.define_table('state', Field('name','string',label=T('State'))) city = db.define_table('city', Field('name','string',label=T('City')), Field('state_id','reference state',required=True,

Re: [web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Diogo Munaro
alogo_topo_menu li') and you can use the jQuery addClass > method to do it client side. > > Massimo > > On Friday, 11 October 2013 17:19:09 UTC-5, Diogo Munaro wrote: >> >> Thx Massimo, but how could I make it? >> >> It's working with first and last.

Re: [web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Diogo Munaro
. Do you think it has? > > > Massimo > > > On Thursday, 10 October 2013 09:08:42 UTC-5, Diogo Munaro wrote: >> >> Hey guys, I have a menu with 3 elements. >> >> When I try it: >> >> {{=MENU(response.contextmenu,_ >> class="catalogo_topo_

[web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Diogo Munaro
Nobody knows? Em quinta-feira, 10 de outubro de 2013 11h08min42s UTC-3, Diogo Munaro escreveu: > > Hey guys, I have a menu with 3 elements. > > When I try it: > > {{=MENU(response.contextmenu,_ > > class="catalogo_topo_menu",li_class='textcenter

[web2py] li_class on Menu doesn't work

2013-10-10 Thread Diogo Munaro
Hey guys, I have a menu with 3 elements. When I try it: {{=MENU(response.contextmenu,_ class="catalogo_topo_menu",li_class='textcenter',li_first="textcenter",li_last="textcenter")}} only li_first and li_last work... The first and last items ares filled with the class, but the middle item doesn'

[web2py] Re: Install in hostgator

2013-04-17 Thread Diogo Munaro
Thx man! You help me a lot!! Em sábado, 14 de maio de 2011 01h21min13s UTC-3, José Eloy escreveu: > > Hello! > > Recently a customer bought a hosting plan (business) with hostgator. > I'm developing for him a web2py application, I have doubts of how to > deploy it. Somebody can help me? The app