Re: [web2py] Re: navbar in sqlform.grid

2015-01-12 Thread Alex Glaros
I'm a beginner who is guessing, but I don't see the IS_IN_DB in the requires clauses. Can you try that? db.yourTable.yourField.requires = IS_NULL_OR(IS_IN_DB(db, db.otherTable.otherField, '%(fieldName)s',zero=T('choose one'))) -- Resources: - http://web2py.com - http://web2py.com/book (Docume

[web2py] Re: lazy tables & auth_event

2015-01-12 Thread Paolo Valleri
Hi, by default auth_event doesn't have a created_on column. Can you provide some code to reproduce the issue? Paolo On Sunday, January 11, 2015 at 10:54:26 PM UTC+1, Louis Amon wrote: > > Hello, > > I'm trying to optimize the performance of my website by using lazy tables. > > When I do so, every

Re: [web2py] Re: webfaction nginx uwsgi install

2015-01-12 Thread Paolo Valleri
I haven't run that script but as far as I can get your are referring to the wrong file. The correct file should be placed in ~/webapps/${webfaction_app_name}/uwsgi/uwsgi.xml . Check there, otherwise it would be better to re-run the script to double check that everything has been installed/configure

[web2py] Re: Why is the default form enctype multipart/form-data?

2015-01-12 Thread Paolo Valleri
Hi, According to http://www.w3.org/TR/html4/interact/forms.html#adef-enctype we should avoid to set enctype when the form method is not POST. Actually, we should set it only when the form contains an input type="file". I don't know if this will break the backward compatibility Paolo On Monday, J

Re: [web2py] lazy tables & auth_event

2015-01-12 Thread Louis Amon
Indeed you are right Thanks to your hint, I found my issue lies in the improper use of « _common_fields ». I wanted to use it to add a few fields to all my tables except the ones generated by Auth, so I had a code like this : auth.define_tables() db._common_fields.append(my_fields) I thought

[web2py] Re: Updated appliances or web2py blog?

2015-01-12 Thread Paolo Valleri
Have a look at http://www.web2pyslices.com/home It is built on top of https://github.com/rochacbruno/Movuca Paolo On Sunday, January 11, 2015 at 10:12:08 PM UTC+1, LoveWeb2py wrote: > > Hello, > > I'm looking to implement a nice blog for my site. I'd like to use a web2py > appliance if there is

Re: [web2py] Re: Daily task on production: scheduler or cron?

2015-01-12 Thread Lisandro Rostagno
Sorry for the delay (I was on vacations). Thanks Niphlod, I actually forgot that I would finally have to use OS cron to keep the scheduler running, so, taking into account all the tips and suggestions, I will use OS cron to start the scheduler every half hour, and I will instantiate the scheduler

Re: [web2py] Re: webfaction nginx uwsgi install

2015-01-12 Thread Richard Baron Penman
it's the correct file, run it and you would see. As mentioned this worked fine for me with previous versions of web2py! Anyone else? On Mon, Jan 12, 2015 at 4:37 PM, Paolo Valleri wrote: > I haven't run that script but as far as I can get your are referring to the > wrong file. > The correct fil

[web2py] Re: Orderby on reference table

2015-01-12 Thread Gael Princivalle
Thanks a lot Massimo, that's perfect. Il giorno lunedì 12 gennaio 2015 05:07:21 UTC+1, Massimo Di Pierro ha scritto: > > How about this? > > L1, L2 = db.l1_categories, db.l2_categories > categories=db(L2.l1_categories==L1.id).select(L2.ALL, orderby=L1.name >

[web2py] on user registration insert user id into referenced table

2015-01-12 Thread Yebach
Hello I would like to insert a new registered user Id into another table. What would be the easiest way without controller code? thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2

Re: [web2py] Re: webfaction nginx uwsgi install

2015-01-12 Thread Willoughby
If you read the discussion on the webfaction community link in your first post, you'll see someone else is having same issue with uwsgi. One of the other users said he created a new script - you might want to look into that. On Monday, January 12, 2015 at 8:23:16 AM UTC-5, Richard Penman wrote:

[web2py] Re: on user registration insert user id into referenced table

2015-01-12 Thread Leonel Câmara
The easiest is to append a function to auth.settings.register_onaccept the functions you append here receive the form you can get the new user's id in form.vars.id. Make sure adding extra fields to auth is not easier for your use case than keeping another table. -- Resources: - http://web2py

[web2py] Re: Problem migrating field type from 'string' to 'text' (postgresql)

2015-01-12 Thread Ian W. Scott
Thanks Paolo. That was it. I forgot that I had set migrate to False. I really feel foolish, but thanks for pointing me in the right direction. Ian On Friday, January 9, 2015 at 4:23:27 PM UTC-5, Paolo Valleri wrote: > > Hi, > I've checked and web2py trunk works as expected (both directions namel

[web2py] Creating a rows object which only contains rows with a unique value for a given field

2015-01-12 Thread Spokes
I'm attempting to create a set of rows containing items (t_table1) which have an image (t_table1_image) associated with them, or which are referenced by an entry in another table (t_table2), with an image (t_table2_image) associated with that entry. I would like the corresponding rows obje

Re: [web2py] Re: Please help us test the 2.9.12 binaries

2015-01-12 Thread Dave S
On Friday, January 9, 2015 at 1:31:00 PM UTC-8, Dave S wrote: > > > On Thursday, January 8, 2015 at 12:18:35 PM UTC-8, Niphlod wrote: >> >> all working fine in Windows . >> >> > For me, also, but my test case is still a toy app: local access only, > sqlite database, a few hundred entries. B

[web2py] Re: [solved] Weird 'Row' object has no attribute 'id' and Ñ error

2015-01-12 Thread Dave S
On Saturday, January 10, 2015 at 5:20:39 AM UTC-8, Carlos Kitu wrote: > > Hi, just for other developers sake to save some time. > [...] > I'm quite a new user of web2py, and as I'm dealing with the ins and outs > of web2py, I repeatedly skipped such an obvious question and was looking > for a

[web2py] Re: Login to web2py from external script

2015-01-12 Thread Niphlod
why it shouldn't be ? it's just different encodings to send the same data over the wire. On Monday, January 12, 2015 at 3:36:12 AM UTC+1, Richard Penman wrote: > > Strangely I found that the login forms works even when encode the data as > usual for application/x-www-form-urlencoded: > > cj = co

[web2py] dropdown text too long

2015-01-12 Thread Alex Glaros
drop down text is so long, it is cut off on right side. Text comes from "requires = IS_IN_DB" how to let user see all of the text? thanks, Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

[web2py] Re: [solved] Weird 'Row' object has no attribute 'id' and Ñ error

2015-01-12 Thread Cássio Botaro
Show us your model. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-use

Re: [web2py] Re: does cache decorator work for services ?

2015-01-12 Thread Stef Mientki
thanks Massimo, but ... when I use the suggested order, I get Traceback(most recent call last): File"gluon\restricted.pyc",line217,inrestricted File"P:/web2py_2_8_2/applications/SolarPower_Molenhoek/controllers/default.py"

Re: [web2py] Re: Updated appliances or web2py blog?

2015-01-12 Thread Austin Taylor
Hi Paolo, Thank you for the recommendation. I followed the instructions on the Movuca web page, but this install fails right out of the box File "applications\at_blog\modules\movuca.py", line 51, in define_classes obj = cls(self) File "applications\at_blog\modules\basemodel.py", line 51,

[web2py] Re: Problem using grid after crud

2015-01-12 Thread Cássio Botaro
> > Grid when you click on add record or other function you call > this: http://127.0.0.1:8000/teste/default/test_bug/new/t_test > when you do this, the request.args(0) is new then the crud fails. grid uses vars keywords = "query here" example: keywords=id="1" -- Resources: - http:/

[web2py] Speeding up access of remote database from localhost?

2015-01-12 Thread Spokes
I'm initializing my db in the following way. if request.env.HTTP_HOST == '127.0.0.1:8000': db = DAL("postgres://...server details...", pool_size = 1, check_reserved=['postgres'], lazy_tables=True, fake_migrate_all=False) else:

[web2py] Spinning my wheels on custom validator

2015-01-12 Thread Dave S
I'm trying to write a custom validator to use in a form, and I'm thinking it should be simple but the brick wall is leaving dents on my forehead. Except for getting the occasional "pretty please fill the form" (as when reloading the page with F5), I get "congratulations" in the flash, and neithe

[web2py] Re: Spinning my wheels on custom validator

2015-01-12 Thread Anthony
Has your app been compiled? On Monday, January 12, 2015 at 8:45:43 PM UTC-5, Dave S wrote: > > I'm trying to write a custom validator to use in a form, and I'm thinking > it should be simple but the brick wall is leaving dents on my forehead. > > Except for getting the occasional "pretty please f

[web2py] Re: Spinning my wheels on custom validator

2015-01-12 Thread Dave S
On Monday, January 12, 2015 at 6:02:49 PM UTC-8, Anthony wrote: > > Has your app been compiled? > Not intentionally. The only .pyc file I see around my app is __init__.pyc in the app-level directory. /dps > > On Monday, January 12, 2015 at 8:45:43 PM UTC-5, Dave S wrote: >> >> I'm trying

[web2py] Re: What is the best way to add an extra input on the client side?

2015-01-12 Thread Przemysław Loesch
Partially solved. Manually added field of the reference type now has a drop down list. The field is defined and set properly before SLQFORM.factory in this way: pt = Field('phone_type', 'reference phone_types') pt.requires=IS_IN_DB(db, db.phone_types.id, '%(type)s') Then it is used in SQLFORM.fac

[web2py] how to compare dates with dal

2015-01-12 Thread Rohit Raj Sharma
i am trying to compare date with database. i am not able to get record. nov_pending = c_pcdt= db( (db.tracker.client_owner==auth.user.email ) &(db.tracker.Compliance_Area == 1)& (db.tracker.periodicity_due_date >= '2014-11-01')& (db.tracker.periodicity_due_date <= '2014-11-30')&(db.tracker.Comp

[web2py] Re: Spinning my wheels on custom validator

2015-01-12 Thread Dave S
On Monday, January 12, 2015 at 5:45:43 PM UTC-8, Dave S wrote: > > I'm trying to write a custom validator to use in a form, and I'm thinking > it should be simple but the brick wall is leaving dents on my forehead. > > [...] > In my controller: > def activate(): > form = FORM('Activation cod

[web2py] Re: [solved] Weird 'Row' object has no attribute 'id' and Ñ error

2015-01-12 Thread Massimo Di Pierro
Thank you. We all appreciate it. we put lots of work in it. On Monday, 12 January 2015 13:00:13 UTC-6, Dave S wrote: > > > > On Saturday, January 10, 2015 at 5:20:39 AM UTC-8, Carlos Kitu wrote: >> >> Hi, just for other developers sake to save some time. >> > [...] > >> I'm quite a new user of we

[web2py] Re: Spinning my wheels on custom validator

2015-01-12 Thread Dave S
On Monday, January 12, 2015 at 7:26:42 PM UTC-8, Dave S wrote: > > > > On Monday, January 12, 2015 at 5:45:43 PM UTC-8, Dave S wrote: >> >> I'm trying to write a custom validator to use in a form, and I'm thinking >> it should be simple but the brick wall is leaving dents on my forehead. >> >> [

Re: [web2py] Re: Login to web2py from external script

2015-01-12 Thread Richard Baron Penman
Yeah same data of course, but different encoding than form specifies so I expected back end to reject it. why it shouldn't be ? it's just different encodings to send the same data over the wire. On Monday, January 12, 2015 at 3:36:12 AM UTC+1, Richard Penman wrote: > > Strangely I found that the