Re: [web2py] Re: Legacy table with reserved keyword in column name

2017-10-27 Thread Fabiano Almeida
Wow, thanks! The rname parameter of Field solved the problem. 2017-10-27 6:14 GMT-02:00 Nico de Groot : > No, that just changes how the DAL checks for conflicts with reserved SQL > words. It depends on the backend which words are problematic. See the book. > If you really want to use a reserved

[web2py] Legacy table with reserved keyword in column name

2017-10-26 Thread Fabiano Almeida
Hi! How to put in the DAL a legacy table whose column name matches reserved SQL words? Traceback: SyntaxError: invalid table/column name "Message" is a "ALL" reserved SQL/NOSQL keywor thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2p

Re: [web2py] Re: HTML5 widgets on SQLFORM.factory

2017-09-12 Thread Fabiano Almeida
Great Anthony! Field('year', 'integer', label='Year', widget=lambda f, v: SQLFORM.widgets.string.widget(f, v, _type='number' )) worked perfectly! Thanks! 2017-09-11 19:59 GMT-03:00 Anthony : > On Monday, September 11, 2017 at 4:30:40 PM

[web2py] HTML5 widgets on SQLFORM.factory

2017-09-11 Thread Fabiano Almeida
Hi @ll! How to use HTML5 widgets on SQLFORM.factory? I have this peace of code: form = SQLFORM.factory(Field('year', 'integer', label='Year')) I like use this HTML5 input type="number" widget. Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.c

[web2py] How to install NLTK?

2017-08-15 Thread Fabiano Almeida
Hi all, How to install NLTK on web2py? Thanks, Fabiano. -- 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 subsc

Re: [web2py] Sites Powered by web2py

2017-04-05 Thread Fabiano Almeida
Thanks Alex! 2017-04-05 11:43 GMT-03:00 Alex : > Thanks Fabiano. > > Each subdomain refers to an own application, each with it's own database > since the breeds are not related to each other. > > Alex > > On Wednesday, April 5, 2017 at 2:52:00 AM UTC+2, Fabiano

Re: [web2py] Sites Powered by web2py

2017-04-04 Thread Fabiano Almeida
Hi Alex! Great design ! Congratulations! I see use of subdomain to breeds, how do you do it? thx, Fabiano. 2017-04-02 17:58 GMT-03:00 Alex : > The section for "Sites Powered by web2py" does not look very promising and > also seems outdated. Most pages don't have a screenshot and some of them >

Re: [web2py] Re: edit or delete child or detail table on SQLFORM.grid with left join

2017-03-20 Thread Fabiano Almeida
Thanks Massimo, I will try this. 2017-03-20 11:41 GMT-03:00 Massimo Di Pierro : > Unfortunately not out of the box. You need a custom button that does a > ajax query. > > > On Friday, 3 March 2017 17:52:30 UTC-6, 黄祥 wrote: >> >> is it possible to edit or delete child or detail table on SQLFORM.gr

[web2py] Radius Authentication

2017-03-14 Thread Fabiano Almeida
Hi All! Is it possible to authenticate web2py users through the freeradius server? Thx -- 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

Re: [web2py] Re: Open Sourced dating website

2017-02-27 Thread Fabiano Almeida
Wow! Thanks for sharing! New ideas! New features! Thanks a lot and best regards! Fabiano 2017-02-26 21:03 GMT-03:00 Jaimee S : > Yea, dude. There definitely aren't ‎many new ideas under the sun so its > always best to find one and improve it a little. > > David Shavers > Founder, Just Betwe

Re: [web2py] Re: Non-Editable field in SQLFORM

2016-12-12 Thread Fabiano Almeida
db.table.field.writable = False -> don't write db.table.field.readable = False -> don't show (hide) 2016-12-12 14:17 GMT-02:00 lyn2py : > It will always be allowed to take a value in insert, a value that you > assign it to, for example, via "default", like so: > db.table.field.default = some_val

[web2py] treat url error

2016-07-22 Thread Fabiano Almeida
How to capture and treat the url before displaying error? For example, the User entered the url with a controller that does not exist, and the application takes the url points to an existing controller for any action to be done. Thanks, Fabiano. -- Resources: - http://web2py.com - http://web2py

Re: [web2py] WEB2PY Creating Controls Dynamically

2016-06-02 Thread Fabiano Almeida
Hi! See http://www.web2pyslices.com/slice/show/1724/cascading-dropdowns-simplified 2016-05-25 14:43 GMT-03:00 Venkat : > Hi > > I have a requirement of displaying data from database from 4 tables i used > join to pull all the data but i should display that data in dropdown for > each column, h

Re: [web2py] Re: random generator of stupid pages

2016-03-07 Thread Fabiano Almeida
Great work! 2016-03-07 3:24 GMT-03:00 Dave S : > On Sunday, March 6, 2016 at 8:49:15 PM UTC-8, Massimo Di Pierro wrote: >> >> http://mdipierro.github.io/stupid.css/themes/random.html >> > > > Nice! Thank you! > > /dps > > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Docume

Re: [web2py] custom form no submiting

2016-03-03 Thread Fabiano Almeida
*view:* {{extend 'layout.html'}} {{=form.custom.begin}} {{=db.stud_person.first_name .label}} {{=form.custom.widget.first_name}} {{=db.stud_person.middle_name .label}} {{=form.cus

Re: [web2py] Re: How to install web2py on CentOS 6.5 with Apache?

2016-02-25 Thread Fabiano Almeida
ou have to sign-in. > > I think You have to checkscripts/setup-web2py-centos7.sh > > good lock > > > El viernes, 19 de febrero de 2016, 9:48:59 (UTC-5), Fabiano Almeida > escribió: >> >> Hi all, >> >> How to install web2py on CentOS 6.5 wi

Re: [web2py] Re: Rich Text

2016-02-24 Thread Fabiano Almeida
Thanks Leonel! 2016-02-24 7:33 GMT-03:00 Leonel Câmara : > Use Tim's plugin it works great > > https://github.com/timrichardson/web2py_ckeditor4 > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.

[web2py] Rich Text

2016-02-23 Thread Fabiano Almeida
Hi all, How field type is used to store rich text (with formatting, table, figure) in db? How to use ckEditor or other rich text editor in web2py? Thanks, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http

Re: [web2py] Re: How to install web2py on CentOS 6.5 with Apache?

2016-02-19 Thread Fabiano Almeida
> -Jim > > > On Friday, February 19, 2016 at 8:48:59 AM UTC-6, Fabiano Almeida wrote: >> >> Hi all, >> >> How to install web2py on CentOS 6.5 with Apache? >> >> Tks! >> >> Fabiano. >> > -- > Resources: > - http://web2p

[web2py] How to install web2py on CentOS 6.5 with Apache?

2016-02-19 Thread Fabiano Almeida
Hi all, How to install web2py on CentOS 6.5 with Apache? Tks! Fabiano. -- 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 becaus

Re: [web2py] Re: A guide how to install your web2py app on your own server (using DigitalOcean droplets)

2016-02-15 Thread Fabiano Almeida
Great! Thanks for sharing! 2016-02-15 9:30 GMT-02:00 'M Bailey' via web2py-users < web2py@googlegroups.com>: > Wow just read your blog. Really useful, clear instructions - thank you. > > > On Monday, 15 February 2016 10:54:01 UTC, Dragan Matic wrote: >> >> Hey guys, I wrote a guide for beginners

Re: [web2py] Re: web2py included on Synology DSM

2016-02-10 Thread Fabiano Almeida
+1 2016-02-10 13:16 GMT-02:00 Ron Chatterjee : > +1 > > > On Wednesday, February 10, 2016 at 8:44:46 AM UTC-5, xmarx wrote: >> >> +1 >> >> 10 Şubat 2016 Çarşamba 15:32:24 UTC+2 tarihinde Gerd yazdı: >>> >>> Hi! >>> >>> I would like to see web2py as a package for the Synology NAS, so i wrote >>> a

Re: [web2py] Virtual field in SQLFORM.grid

2016-01-19 Thread Fabiano Almeida
Hi Marcello, Can you see your tables in appadmin? And your lambda, you can create and call function to count in konsulta's table and return the number. Field.Virtual('total', lambda row: kontagem(row.id)) Att., Fabiano. 2016-01-19 15:09 GMT-02:00 Marcello : > Hello, > > I have a one to many

Re: [web2py] Re: multi tenant

2016-01-18 Thread Fabiano Almeida
> ['/$domain/$c/$f/$anything','/yourapp/$c/$f/$domain/$anything']] > > routes_out = [(a,b) for (b,a) in routes_in] > > then you have to handle in code where the domain is now in request.args(0). > > > > > > On Friday, 15 January 2016 13:48:43 UTC-6,

Re: [web2py] Re: web3py

2016-01-15 Thread Fabiano Almeida
2016-01-15 17:29 GMT-02:00 Carlos Cesar Caballero Díaz < desarro...@spicm.cfg.sld.cu>: > Hi, I have written about my opinion before. The backward compatibility > should never affect the system maintenance, sometimes is better just remove > the old functionalities to make way for the new ones, the

[web2py] multi tenant

2016-01-15 Thread Fabiano Almeida
Hi All! In the book shows multi tenant based on subdomain, with code : > db._common_fields.append(Field('request_tenant', > default=request.env.http_host,writable=Fals

Re: [web2py] Re: what is difference between ajax() and web2py_component() ?

2016-01-07 Thread Fabiano Almeida
Great! Can you show me examples of using web2py_component? thanks! Fabiano. 2016-01-07 13:57 GMT-02:00 Anthony : > The ajax() function provides basic functionality for making an Ajax > request, with some additional features, such as automatically sending > values from named input fields and in

[web2py] Re: Role of users

2015-12-02 Thread Fabiano Almeida
for g in users_and_groups.select(db.auth_group.role, orderby=db.auth_membership.group_id): groups.append(g.role) # [...] Em quarta-feira, 2 de dezembro de 2015 14:31:14 UTC-2, Fabiano Almeida escreveu: > > Hi! > > I'm trying to create a list of roles for each user: >

[web2py] Re: Role of users

2015-12-02 Thread Fabiano Almeida
the keys being the group IDs and the values being the roles, so for just a > list of the roles: > > auth.user_groups.values() > > Anthony > > On Wednesday, December 2, 2015 at 11:31:14 AM UTC-5, Fabiano Almeida wrote: >> >> Hi! >> >> I'm trying

[web2py] Role of users

2015-12-02 Thread Fabiano Almeida
Hi! I'm trying to create a list of roles for each user: for x in db(db.auth_user.id>0).select(db.auth_user.id): groups = [] for g in db(db.auth_membership.id > 0).select(db.auth_group.role, join=[db.auth_group.on(db.auth_group.id==db.auth_membership.group_id), db.auth_user.on(db.auth_user

Re: [web2py] Re: record versioning

2015-12-01 Thread Fabiano Almeida
> > See > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Combining-rows > . > > Anthony > > > On Monday, November 30, 2015 at 12:31:46 PM UTC-5, Fabiano Almeida wrote: >> >> Hi All! >> >> I need create a repor

[web2py] record versioning

2015-11-30 Thread Fabiano Almeida
Hi All! I need create a report with record versioning. How to union table with table_archive? Thanks! -- 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) --- Yo

Re: [web2py] Re: new connection string in scaffold

2015-11-13 Thread Fabiano Almeida
thanks! 2015-11-13 23:13 GMT-02:00 黄祥 : > please take a look at appconfig.ini file in private folder and change the > uri value with your own settings : > e.g. > private/appconfig.ini > [db] > uri = mysql://MySQLUser:MySQLPassword@MySQLHost/MySQLDatabase > > best regards, > stifan > >> -- >

[web2py] new connection string in scaffold

2015-11-13 Thread Fabiano Almeida
Hi all, I will create a new app in web2py 2.12.3, and I see: db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', cast=int), check_reserved=['all']) How to configure this to connect with remote mysql database ? Thx! Fabiano -- Resources: - http://web2py.com - http://web2

[web2py] Indexes

2015-11-12 Thread Fabiano Almeida
Hi All! In book I see example how to create index with executesql . How to use indexes in querys? Thx, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - htt

Re: [web2py] its possible get mac address?

2015-11-05 Thread Fabiano Almeida
Cesar > Caballero wrote: > > >> El 04/11/15 a las 14:30, Fabiano Almeida escribió: >> >> Hi! >> >> Web2py can obtain mac address from user? >> >> > Bassicly, the MAC address don't cross the routers, so, you can't get > the mac address

[web2py] its possible get mac address?

2015-11-04 Thread Fabiano Almeida
Hi! Web2py can obtain mac address from user? Thanks in advance, Fabiano. -- 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 beca

[web2py] How to filter table data in field of SQLFORM.factory?

2015-10-21 Thread Fabiano Almeida
Hi, How to filter table data in field of SQLFORM.factory? my code: form = SQLFORM.factory( Field('cbPerson', label='Person', requires=IS_IN_DB(db,' auth_user.id','%(first_name)s %(last_name)s', zero=None), default= auth.user.id)) need show only db.auth_user.id == auth.user.i

[web2py] Re: How to show query on a grid?

2015-10-19 Thread Fabiano Almeida
Delete the db before ((db.guest.id>0)... worked query = ((db.guest.id>0) & \ > (db.voucher.disp == False) & \ > (db.voucher.guest == db.guest.id) & \ > (db.auth_user.id == db.guest.fnd)) \ > .select(db.voucher.voucher, db.guest.name, db.auth_user.id , > db.auth_user

[web2py] How to show query on a grid?

2015-10-15 Thread Fabiano Almeida
Hi! I try to show query on a SQLFORM.grid, but returns error: AttributeError: 'Rows' object has no attribute '_db' My code: query = db((db.guest.id>0) & \ (db.voucher.disp == False) & \ (db.voucher.guest == db.guest.id) & \ (db.auth_user.id == db.guest.fnd)) \

Re: [web2py] Re: qrcode

2015-10-14 Thread Fabiano Almeida
Hi Michael, 2015-10-14 16:00 GMT-03:00 Michael M : > {{=XML(img_tag)}} It worked! Grateful for all! Fabiano. -- 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 Issue

Re: [web2py] Re: qrcode

2015-10-14 Thread Fabiano Almeida
Hi Richard, elaphe worked! thank you! How to show a text message with qrcode on same page? Thx 2015-10-13 21:07 GMT-03:00 Richard Vézina : > You can have a look on the side of elaphe : > https://bitbucket.org/whosaysni/elaphe/ > > For most type of code it works... But there were issue with bou

Re: [web2py] Re: qrcode

2015-10-14 Thread Fabiano Almeida
et the string > img_tag = '' % > output.getvalue().encode('base64').replace('\n', '') > return locals() > > > On Tuesday, October 13, 2015 at 2:05:23 PM UTC-7, Fabiano Almeida wrote: >> >> Hi all! >> >> How to dyn

Re: [web2py] Re: qrcode

2015-10-14 Thread Fabiano Almeida
Hi Niphlod, I trying to generate qr code with built-in feature, for local use, mobile for reading. thx 2015-10-13 18:20 GMT-03:00 Niphlod : > with any qrcode library or qrcode ondemand service out there ? What did > you try ? > > > On Tuesday, October 13, 2015 at 11:05:23 PM

Re: [web2py] Re: qrcode

2015-10-14 Thread Fabiano Almeida
Hi Stifan I installed the semanticwebexample and not found reference to qr code on it. thx 2015-10-13 18:28 GMT-03:00 黄祥 : > i think there is web2py appliances that create some thing like this before > : semanticwebexample > > best regards, > stifan > > -- > Resources: > - http://web2py.com > -

[web2py] qrcode

2015-10-13 Thread Fabiano Almeida
Hi all! How to dynamically generate qr code in web2py? grateful, Fabiano. -- 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 bec

[web2py] Authenticate with Radius Server

2015-09-17 Thread Fabiano Almeida
Hi @ll! I have an pfSense server with FreeRadius. Can I log in web2py app with users from FreeRadius? How? thx! -- 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 Issue

Re: [web2py] To display random questions one by one

2015-08-05 Thread Fabiano Almeida
Hi Sai, Can you try this: import random ## first option to select question s = number of lines of your table i = random.randint(0,s) ## second option to select question - best: no broke if delete any record on table s = db(db.ins_ques.id > 0).select(db.ins_ques.id) i = random.sample(s,1) ## h

Re: [web2py] Re: module vs plugin

2015-07-17 Thread Fabiano Almeida
mple would be: Lets say you are selling a base product to all > your customer at a price X. Now, based on customer requirement, specify > features/plugins can be added or attached to this base system. > > > > Regards, > Vikash Sharma > vikash0...@gmail.com > > On Wed

Re: [web2py] Re: module vs plugin

2015-07-15 Thread Fabiano Almeida
Hi Anthony, I think add plugins to build a system. Eg customer registration, product registration, shopping trolley, service order, reports, etc. thks Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] module vs plugin

2015-07-15 Thread Fabiano Almeida
Hi @ll! I think about modularize my aplication. Then the question is: module or plugin? What's the difference? Thanks! Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/l

Re: [web2py] Re: does every controller function require a view?

2015-06-24 Thread Fabiano Almeida
or init function name with double underscore: def __test(): pass the __ make function usable in your code, but not visible in browser. Fabiano. 2015-06-23 15:30 GMT-03:00 Niphlod : > if you plan to use functions in controllers that MAY NOT be seen by users, > just define them with a parame

[web2py] Convert picture to pdf

2015-06-23 Thread Fabiano Almeida
Hi! It's possible convert one or many pictures in unique pdf file in web2py? USer select one or more pictures stored in app and download a pdf file with selected images. Thanks, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2p

Re: [web2py] Re: How to register custom events in auth_event?

2015-06-11 Thread Fabiano Almeida
Great! Thanks a lot! Fabiano. 2015-06-11 15:56 GMT-03:00 黄祥 : > please take a look at this discussion : > https://groups.google.com/forum/#!topic/web2py/sp4fpYz36HI > > best regards, > stifan >> >> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://githu

[web2py] Re: How to register custom events in auth_event?

2015-06-11 Thread Fabiano Almeida
origin = '' description='' db.auth_event.insert(time_stamp=request.now, client_ip=request.client, user_id=auth.user.id, origin=origin, description=description) Em quinta-feira, 11 de junho de 2015 13:20:29 UTC-3, Fabiano Almeida escreveu: > > Hi @ll! >

[web2py] How to register custom events in auth_event?

2015-06-11 Thread Fabiano Almeida
Hi @ll! After performing a specific operation system, I need the record in auth_event. How to do? thanks in advance, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Redirect page after submit load form

2014-09-30 Thread Fabiano Almeida
Hello, I am using the LOAD to load a SQLFORM.factory another function as test. Works correctly, except that does the redirect that has the function call. My code: def index(): user = db(db.auth_user.id == auth.user.id).select().first() if not user.job: form = LOAD('ponto', 'function1.loa

Re: [web2py] foreign key constraint failed

2014-09-24 Thread Fabiano Almeida
If your table definitions are right, try delete database and run your app again... 2014-09-22 18:01 GMT-03:00 Anna Kostikova : > Hi everyone, > > I am having an issue when editing content of one of the tables in my > database. When I try to edit a record in the table I have an error message > " f

Re: [web2py] SQLFORM.factory fails to save to database, id is null

2014-09-24 Thread Fabiano Almeida
try: db.table.insert(f_name=form.vars.f_name) 2014-09-23 6:10 GMT-03:00 Andy Joel : > I have a very simple form processing page in my controller: > > def new(): > form = SQLFORM.factory( > Field('f_name', label='Your name', requires=IS_NOT_EMPTY()), > ) > if form.process(

Re: [web2py] Recompute all instances of a computed field

2014-07-10 Thread Fabiano Almeida
Hi Johann, I recently update manually compute field. You have presented a better way, and still counter to monitor the process. Very nice! Congratulations! Fabiano. 2014-07-10 10:39 GMT-03:00 Johann Spies : > Sorry, I sent it before finishing > > > #!/usr/bin/python > # -*- coding: utf-8 -*-

Re: [web2py] Re: Virtual Fields in auth_user?

2014-07-10 Thread Fabiano Almeida
ct has no attribute 'dept_name' Can I use virtual field to display information from another table? Thanks, Fabiano. 2014-07-10 3:55 GMT-03:00 Massimo Di Pierro : > auth.settings.extra_fields['auth_user'] = [Field.Virtual(), ... ] > > > On Wednesday

Re: [web2py] Re: How to mark mandatory fields in SQLFORM.grid?

2014-07-09 Thread Fabiano Almeida
style the comment (e.g., make the text red). >> >> Anthony >> >> On Wednesday, July 9, 2014 4:08:00 PM UTC-4, Fabiano Almeida wrote: >>> >>> Hi @all! >>> >>> I am using SQLFORM.grid extensively in my application. How to visually >>&g

[web2py] How to mark mandatory fields in SQLFORM.grid?

2014-07-09 Thread Fabiano Almeida
Hi @all! I am using SQLFORM.grid extensively in my application. How to visually mark the required fields on the form when the user adds record? Thanks in advance, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] Virtual Fields in auth_user?

2014-07-09 Thread Fabiano Almeida
Hi again, It's possible insert virtual field in auth_user? how? thanks, Fabiano. -- 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 mess

Re: [web2py] Re: help with join

2014-07-09 Thread Fabiano Almeida
Great Leonel! Thanks a lot! Fabiano. 2014-07-09 13:31 GMT-03:00 Leonel Câmara : > list_of_users_in_all_groups = db( (db.auth_membership.group_id.belongs([2, > 3, 4])) & (db.auth_membership.userd_id == db.auth_user.id) > ).select(db.auth_user.ALL) > > -- > Resources: > - http://web2py.com > - h

[web2py] help with join

2014-07-09 Thread Fabiano Almeida
Hi, I'm trying to do a join table auth_user and auth_membership. I need the list of users with membership.group_id in [2,3,4]. I tried to create a query for membership before the join, but it did not work. Is to make this join? How? Thanks in advance, Fabiano. -- Resources: - http://web2py.c

Re: [web2py] Re: query with multiple values

2014-07-09 Thread Fabiano Almeida
Hi Leonel, belongs solve my question. Thanks. Fabiano. 2014-07-09 13:02 GMT-03:00 Leonel Câmara : > q = db(db.auth_membership.group_id.belongs([2,3,4]).select() > > Also see: > > http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#belongs > > -- > Resources: > - h

Re: [web2py] query with multiple values

2014-07-09 Thread Fabiano Almeida
th--contains--upper--lower > > On Wed, Jul 9, 2014 at 12:47 PM, Fabiano Almeida > wrote: > > Hi, > > > > How to make a query with multiple values to field? > > > > > > q = db(db.auth_membership.group_id in [2,3,4]).select() > > > > thank

Re: [web2py] Re: SQLEDITABLE: redirect after submit

2014-07-09 Thread Fabiano Almeida
le = SQLEDITABLE(db.employee_sheet, showid=False, maxrow=5) >> if editable.process().accepted: >> response.flash = T('editable accepted') >> elif editable.errors: >> response.flash = T('editable has errors') >> else

[web2py] query with multiple values

2014-07-09 Thread Fabiano Almeida
Hi, How to make a query with multiple values to field? q = db(db.auth_membership.group_id in [2,3,4]).select() thanks, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2p

Re: [web2py] Re: SQLEDITABLE: redirect after submit

2014-07-09 Thread Fabiano Almeida
E(db.employee_sheet, showid=False, maxrow=5) > if editable.process().accepted: > response.flash = T('editable accepted') > elif editable.errors: > response.flash = T('editable has errors') > else: > response.flash = T('pleas

Re: [web2py] Re: SQLEDITABLE: redirect after submit

2014-07-09 Thread Fabiano Almeida
lso. > > > On Wednesday, July 9, 2014 4:30:59 AM UTC+5:30, Fabiano Almeida wrote: >> >> Hi, >> >> Has like 'accepted' attribute in SQLEDITABLE? >> >> I need redirect to other page after 'ok' click. >> >> Thanks, >&

[web2py] SQLEDITABLE: redirect after submit

2014-07-08 Thread Fabiano Almeida
Hi, Has like 'accepted' attribute in SQLEDITABLE? I need redirect to other page after 'ok' click. Thanks, Fabiano. -- 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

[web2py] Re: SQLEDITABLE : writable=False dosen't work

2014-07-08 Thread Fabiano Almeida
Sorry, my fault I configured writable = False for wrong field o.O thanks, Fabiano. Em terça-feira, 8 de julho de 2014 18h16min06s UTC-3, Fabiano Almeida escreveu: > > Hi!, > > I'm trying to use SQLEDITABLE plugin with readable and writable attributes. > > readable

[web2py] SQLEDITABLE : writable=False dosen't work

2014-07-08 Thread Fabiano Almeida
Hi!, I'm trying to use SQLEDITABLE plugin with readable and writable attributes. readable = False, hide the field. OK. writable = False, the field remains editable. How to leave only a few editable fields? Thanks, Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Document

Re: [web2py] SQLEDITABLE plugin

2014-07-07 Thread Fabiano Almeida
ssible to pass a query currently. >> But "record" parameter is so callable, please set there. >> Please see to the demo5 >> <http://docs1.erp2py.com/sqleditable/demo/demo_en.html#demo5> . >> >> thanks. >> >> 2014年7月6日日曜日 15時19分04秒 UTC-3 Fabiano Almeid

Re: [web2py] SQLEDITABLE plugin

2014-07-06 Thread Fabiano Almeida
Hi kato! How to use SQLEDITABLE with a query? If I try this in your first example: query = db.employee_sheet.resigned == True editable = SQLEDITABLE(query, showid=False, maxrow=5).process() Return error: AttributeError: 'Query' object has no attribute '_id' How to filter table? Than

Re: [web2py] How to choose a subcategory to create a post

2014-07-04 Thread Fabiano Almeida
Can you try use plugin: http://dev.s-cubism.com/plugin_lazy_options_widget 2014-07-03 6:53 GMT-03:00 Капылов Данил : > 1) Post created in a particular category. - > http://hostname/app/default/created_ad/ > > 2)The category tied subcategories. > > How to make that SQLFORM display only radio butt

Re: [web2py] create an update page (similar to profile page in default application)

2014-07-02 Thread Fabiano Almeida
Need convert request to int: int(request.post_vars.pid) Fabiano. 2014-07-02 8:05 GMT-03:00 Shubham Jain : > I want to create an update page just like profile page in default > application. Actually I am passing the primary key of a table by a button > click to the product_update page. In the co

Re: [web2py] SQLEDITABLE plugin

2014-07-01 Thread Fabiano Almeida
Very Nice! Thank you very much! 2014-07-01 10:12 GMT-03:00 'kato' via web2py-users : > Hi. > > I tried to make SQLEDITABLE plugin. > > demo-page: http://docs1.erp2py.com/sqleditable/demo/demo_en.html > > It is similar as gluon/contrib/spreadsheet. But, it is easy to use more. > If you are inte

Re: [web2py] Re: lambda cannot contain assignment

2014-06-13 Thread Fabiano Almeida
Hi Anthony, It worked! Now I understand better how to use callback. Thank you very much!! Fabiano. 2014-06-12 16:13 GMT-03:00 Anthony : > lambda qset, f: > f.update(cadastro=request.now if f['status'] in ['Edição', 'Enviado'] > else None) -- Resources: - http://web2py.com - http://web2py

[web2py] lambda cannot contain assignment

2014-06-12 Thread Fabiano Almeida
Hi, In a table I need to change the field value (name: cadastro, type: datetime) to request.now depending on the value assigned to another field (name: status) of the same record. I thought of using the _before_update callbcak for this purpose: db.solicitacao._before_update.append(lambda f: f.ca

Re: [web2py] Uploading a Package

2014-06-11 Thread Fabiano Almeida
Hi, If you have application in tgz, unpack and copy to web2py_folder/application/your_application. 2014-06-10 6:26 GMT-03:00 Priyank Yadav : > Hello, > I am new to web2py. Somebody sent me a tgz file which contained the source > code. > I am trying to upload thar code in my admin interface but

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-09 Thread Fabiano Almeida
Hi, Good! db.table1.id.default = session.table1.id > This line is used to insert new record automatically by SQLFORM. For the id field is unnecessary, it is useful when you want to set a default value, eg FK. All beers!! -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-09 Thread Fabiano Almeida
My db.py: Almoxarifado = db.define_table('almoxarifado', Field('name')) Objeto = db.define_table('objeto', Field('name'), Field('almoxarifado_id', db.almoxarifado)) Objeto.almoxarifado_id.requires=IS_IN_DB(db, 'almoxarifado.id', '%(nome)s') 2014-06-09 17:09 GMT-03:00 LoveWeb2py : > Hi Fabian

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-09 Thread Fabiano Almeida
def query_table2(): table1_inv_record = None table2_records = [] if request.args: try: session.table1_id = int(request.args(0)) except: pass row = db(db.table1.id==session.table1_id).select() for line in row: joined_records = line.inv_id query=d

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-09 Thread Fabiano Almeida
.almoxarifado_id > > > On Monday, June 9, 2014 1:30:49 PM UTC-4, Fabiano Almeida wrote: > >> Hi, >> >> Sorry for my poor english, by lazy, sometimes I use google translate >> (portuguese -> english), and don't check the translation. >> >> table1_in

Re: [web2py] Re: Adding information to certain input before added to db?

2014-06-09 Thread Fabiano Almeida
Other way is before and after callbacks http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks If necessary, you can call function: db.table1._before_insert.append( lambda f: my_function(f)) This way you do not need to manually enter the registry

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-09 Thread Fabiano Almeida
n row: > joined_records = line.inv_id >query=db.table1.id.belongs(joined_records) >grid=SQLFORM.grid(query, user_signature=False) >return dict(grid=grid) > > view for query_table2.html: >{{=grid}} > > > > On Friday, June 6, 2014 3:43:12 PM UTC-4, F

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread Fabiano Almeida
y...except to resolve this. 2014-06-06 15:29 GMT-03:00 Fabiano Almeida : > Show your code > > > 2014-06-06 15:18 GMT-03:00 LoveWeb2py : > > Now I get this error when I try to click edit on the query database: >> >> invalid literal for int() with base 10: >>

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread Fabiano Almeida
problem. > > > On Friday, June 6, 2014 1:17:39 PM UTC-4, LoveWeb2py wrote: > >> yes >> >> >> On Fri, Jun 6, 2014 at 1:09 PM, Fabiano Almeida >> wrote: >> >>> Are you logged in your app? >>> >>>> >>>&

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread Fabiano Almeida
Are you logged in your app? 2014-06-06 14:07 GMT-03:00 LoveWeb2py : > That was it! THANK YOU! Why does it work without a signature though? > > > On Friday, June 6, 2014 1:03:35 PM UTC-4, Fabiano Almeida wrote: >> >> Try: >> >> grid = SQLFORM.grid(db.table,

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread Fabiano Almeida
How do you define tables? 2014-06-06 14:03 GMT-03:00 Fabiano Almeida : > Try: > > grid = SQLFORM.grid(db.table, user_signature=False) > > Em sexta-feira, 6 de junho de 2014 13h10min34s UTC-3, LoveWeb2py escreveu: > >> Hi Fabiano, >> >> I actually

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread Fabiano Almeida
ething in my model messing it up? > > On Friday, June 6, 2014 12:02:05 PM UTC-4, Fabiano Almeida wrote: >> >> Hi, >> >> You send var grid (see: return dict(grid=grid)). The first var grid is a >> send var to your view, de second var grid is a local var of you

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread Fabiano Almeida
Hi, You send var grid (see: return dict(grid=grid)). The first var grid is a send var to your view, de second var grid is a local var of your function. Then, in controller use: grid = SQLFORM.grid(db.new_table) return dict(grid=grid) in the view use: {{=grid}} Fabiano. 2014-06-06 12:45 GMT-03

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-05 Thread Fabiano Almeida
I use this: grid for table1 def index(): return dict(grid=SQLFORM.grid(Almoxarifado, links = [lambda row: A('Listar Objetos',_href=URL('objeto','index',args=[row.id]))], user_signature=False, csv=False)) grid for table2 def index(): if (not request.args) and (not request.vars): redirect(

[web2py] Re: How to use createargs in SQLFORM.grid?

2014-06-03 Thread Fabiano Almeida
In manual dont have example of createargs: while createargs, editargs and viewargs are passed only to the specific > create, edit and details SQLFORMs this is the only reference manual Em quarta-feira, 4 de junho de 2014 00h43min27s UTC-3, Fabiano Almeida escreveu: > > Hi, >

[web2py] How to use createargs in SQLFORM.grid?

2014-06-03 Thread Fabiano Almeida
Hi, How to use creatargs in SQLFORM.grid? Table: Objeto = db.define_table('objeto', SQLField('almoxarifado_id', db.almoxarifado, notnull=True, readable=True, writable=True, label='Almoxarifado'), SQLField('nome', 'string', length='50', notnull=True, label='Nome'), SQLField('qua

Re: [web2py] Re: How to add button on SQLFORM.grid?

2014-06-03 Thread Fabiano Almeida
th the "links" argument, go to step 1) > > ^_^ > > > On Tuesday, June 3, 2014 9:24:26 PM UTC+2, Fabiano Almeida wrote: >> >> Hi, >> >> How to add button/field on SQLFORM.grid? I need create link to edit slave >> table with row id. >> &g

Re: [web2py] Re: web2py CMS

2014-06-03 Thread Fabiano Almeida
Plone +1 2014-06-03 15:52 GMT-03:00 Derek : > I would recommend Plone (http://plone.org/). It's a very good Python CMS > with a 13 year history. There's also Tactic ( > http://community.southpawtech.com/get-started) which is good, if you > handle digital assets like video files. > > > On Friday,

  1   2   >