[web2py] how to make Query, without redundance

2016-11-25 Thread Áureo Dias Neto
Hello guys, I'm making a search form, and i need to verify, if, a table is referenced in another table, that's two have a relationship one-to-many. My asking is, i'm make it with a for loop, and it's return a maximum recursion of python objet.. How to dow, a search, in all the table, to check

Re: [web2py] Subscription table

2016-11-25 Thread Áureo Dias Neto
Good morning bro, U can use this: Where 'd2' is 'request.now' to get today date and 'd1' is your 'creation_date' variable from datetime import datetime def days_between(d1, d2): d1 = datetime.strptime(d1, "%Y-%m-%d") d2 = datetime.strptime(d2, "%Y-%m-%d") return abs((d2 - d1).days)

Re: [web2py] Re: how to make Query, without redundance

2016-11-28 Thread Áureo Dias Neto
L Table objects) that > have fields referencing tableA (note, I used set() in order to de-duplicate > in case a given table has more than one field referencing tableA). > > Anthony > > > On Friday, November 25, 2016 at 11:11:41 PM UTC-5, Áureo Dias Neto wrote: >> >> Hel

Re: [web2py] Re: how to make Query, without redundance

2016-11-28 Thread Áureo Dias Neto
have some record in the table referenced this record of *B* 2016-11-28 8:12 GMT-02:00 Áureo Dias Neto : > > Good Morning, With this line of code, do I get the records of the tables > referenced in table A? My question is as follows, I have two tables, A and > B, I want to check w

Re: [web2py] Re: how to make Query, without redundance

2016-11-28 Thread Áureo Dias Neto
I have a table, called 'vehicles', and this has so many fields. In another, table, called 'photos', I have a field, called 'Vehicle', which is reference to my vehicle table .. I'm doing a search form, and I need to filter records from my vehicle table, which have been referenced in the 'photos' ta

Re: [web2py] Re: how to make Query, without redundance

2016-11-28 Thread Áureo Dias Neto
Friend, it worked perfectly! thank you! Now, I want to do the inverse of this query, ie select vehicles from the vehicles table, which have no reference in some record in the table of photos, ie want to select vehicles that do not have photos .. could you help me? -- Resources: - http://web2py.c

Re: [web2py] Re: how to make Query, without redundance

2016-11-29 Thread Áureo Dias Neto
Thank you man! you help me <3 2016-11-29 2:35 GMT-02:00 Anthony : > On Monday, November 28, 2016 at 10:22:53 PM UTC-5, Áureo Dias Neto wrote: >> >> Friend, it worked perfectly! thank you! >> >> Now, I want to do the inverse of this query, ie select vehicles from the

[web2py] Show images and pdf online

2016-12-05 Thread Áureo Dias Neto
Hello guy's, I want to show uploaded photos and pdf's documments, to users, online Example, a page show thumbnails of photos uploaded, and when user click on thumbnail, it open a full photo or pdf online -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

Re: [web2py] Show images and pdf online

2016-12-05 Thread Áureo Dias Neto
It's still downloading files... 2016-12-05 10:38 GMT-02:00 António Ramos : > i think this helps > > def download(): > return response.download(request,* db,attachment=False*) > > 2016-12-05 12:11 GMT+00:00 Áureo Dias Neto : > >> Hello guy's, >>

Re: [web2py] Show images and pdf online

2016-12-05 Thread Áureo Dias Neto
No, the function show pdf's online, but images, insiste to download it, i want to show it online 2016-12-06 0:19 GMT-02:00 Dave S : > On Monday, December 5, 2016 at 3:56:39 PM UTC-8, Áureo Dias Neto wrote: >> >> It's still downloading files... >> >> > Are

[web2py] Table in PDF file with FPDF

2016-12-06 Thread Áureo Dias Neto
I am creating a report in pdf, with fpdf .. I use write_html to generate a table in pdf, from a block of python code .. My question, it's about the size of the font, I tried to use '_style = font-size: 12px' .. but to no avail .. Thanks for your help right away. -- Resources: - http://web2py.c

Re: [web2py] Table in PDF file with FPDF

2016-12-06 Thread Áureo Dias Neto
etFont('Arial','B',14); >> // Removes bold >> $pdf->SetFont(''); >> // Times bold, italic and underlined 14 >> $pdf->SetFont('Times','BIU'); >> >> >> >> >> >> >>[image:

[web2py] Images pratices on w2p

2016-12-07 Thread Áureo Dias Neto
What is the best practice for images in w2p? Because I use images at high resolutions 3000px for more. Should I save a copy at a lower resolution to use as a thumbnail? Or can I resize it at the time of showing the user? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

Re: [web2py] invalid view?

2016-12-07 Thread Áureo Dias Neto
The case sensitive, your file named 'listusers.html'? in error it shows 'invalid view (admin/listUsers.html)' The 'U' caractere is causing this.. 2016-12-07 10:48 GMT-02:00 António Ramos : > hello i moved my working app from local pc to webfaction > > on one view i get the error? > > invalid vi

Re: [web2py] invalid view?

2016-12-07 Thread Áureo Dias Neto
Thats it bro! 2016-12-07 10:54 GMT-02:00 António Ramos : > IT works. > So windows does not care about case and linux yes. > > Solved! > Thank you > > > 2016-12-07 12:51 GMT+00:00 Áureo Dias Neto : > >> The case sensitive, your file named 'listusers.html&#

[web2py] Pass a query from form to another function

2016-12-07 Thread Áureo Dias Neto
I have a search form, which filter the fields, I filter my query .. so far so good .. The search works perfectly, from the results I generate a PDF, but, how to pass this query from the search form to my PDF .. Note that PDF is generated in another function. Thank you! -- Resources: - http:/

Re: [web2py] Pass a query from form to another function

2016-12-07 Thread Áureo Dias Neto
he form function! 2016-12-07 11:51 GMT-02:00 António Ramos : > code please... > > 2016-12-07 13:08 GMT+00:00 Áureo Dias Neto : > >> I have a search form, which filter the fields, I filter my query .. so >> far so good .. >> >> The search works perfectly, from th

Re: [web2py] Re: Pass a query from form to another function

2016-12-07 Thread Áureo Dias Neto
pdf use: > > generate_pdf(session.content) > > Em quarta-feira, 7 de dezembro de 2016 10:08:45 UTC-3, Áureo Dias Neto > escreveu: >> >> I have a search form, which filter the fields, I filter my query .. so >> far so good .. >> >> The search works perfectly, from

Re: [web2py] Re: Pass a query from form to another function

2016-12-07 Thread Áureo Dias Neto
Thank guys, it's work 2016-12-07 17:56 GMT-02:00 Anthony : > On Wednesday, December 7, 2016 at 9:33:16 AM UTC-5, Marlysson Silva wrote: >> >> You can use sessions.. >> >> session.content = query_search >> > > A Query object can't be pickled to store it in the session, but you can > first conv

[web2py] Rotate image stored

2016-12-15 Thread Áureo Dias Neto
Good morning, young people! I need a function, that I can rotate a photo saved in the database, that is, previously sent. And the same apples to be rotated, replace the current one in the database/ file -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

Re: [web2py] Re: Rotate image stored

2016-12-22 Thread Áureo Dias Neto
hem normal and use css transform to rotate them ( whether it will > only show in front-end ) > > Em quinta-feira, 15 de dezembro de 2016 11:00:35 UTC-3, Áureo Dias Neto > escreveu: > >> Good morning, young people! >> >> I need a function, that I can rotate a photo

Re: [web2py] Row position change if I switch from a file to another

2016-12-28 Thread Áureo Dias Neto
Good morning, The best to do, is, use a external editor of your choice, ex: sublime text, to edit the files by path 2016-12-28 7:53 GMT-02:00 Gael Princivalle : > Hello all. > > In the administrative interface, if I'm still working on the default.py > file row 234, and I switch to menu.py row 25

Re: [web2py] Row position change if I switch from a file to another

2016-12-28 Thread Áureo Dias Neto
You can then configure the default application for .py files as notepad ++, and for example, in filezilla, if you navigate to your local files with the right button and edit them, after saving, it automatically detects the Files and asks if you want to update the files on the server. I usually do

[web2py] FPDF

2016-12-28 Thread Áureo Dias Neto
Good night, How i'm add a new page, and set new content to this, on pdf, with fpdf? I use pdf.add_page(), but the content o the second page is the same as the first.. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - ht

Re: [web2py] How to list Virtual Field in grid fields?

2016-12-29 Thread Áureo Dias Neto
The SQLFORM expect to receive, an table, not a query.. What's the name of your table? just put the name of the table on the first argumment, and filter with 'fields' the fields you want to show. Just change: grid=SQLFORM.grid(db.item.id>0, fields=[db.item.unit_price, db.item.total_price ] ) To: g

Re: [web2py] Re: FPDF

2017-01-02 Thread Áureo Dias Neto
dfFileMerger and > PdfFileReader to merge all the pages in a single document. > > > > On Wednesday, December 28, 2016 at 9:30:05 PM UTC-4, Áureo Dias Neto wrote: >> >> Good night, >> >> How i'm add a new page, and set new content to this, on pdf, with fpdf?

Re: [web2py] Re: FPDF

2017-01-02 Thread Áureo Dias Neto
Hello, it's basically this: i want another page with another content, in the same function or document pdf from gluon.contrib.pyfpdf import FPDF, HTMLMixin class MyFPDF(FPDF, HTMLMixin): def header(self): self.set_title("Analise de Valores") self.set_font('Arial', '', 15) self.cell(0, 10, respon

Re: [web2py] Re: Issues with record versioning

2017-01-04 Thread Áureo Dias Neto
Hello, You can do this, for update db(db.person.id==1).update(name='Tim') 2017-01-04 9:01 GMT-02:00 Ricardo Oliveira : > Hi Anthony, > > Thanks for your reply. > I'm using the DAL's insert method for the creation. Eg: > > db.table_x.insert(name='something') > > For updates, I get the rows from

Re: [web2py] Re: session.flash question

2017-01-05 Thread Áureo Dias Neto
How you define 'session.flash'? 2017-01-05 10:04 GMT-02:00 António Ramos : > in fact this > > > toastr.info("{{=session.flash}}"); > > > > always produces a popup saying "None" > > why? > > > 2017-01-05 11:50 GMT+00:00 António Ramos : > >> *this works* >> >> {{if session.fl

Re: [web2py] Re: session.flash question

2017-01-05 Thread Áureo Dias Neto
{{=T("Notification")}}: {{=session.flash}} > > > {{pass}} > > > *But this does not work!! and shows "None"* > > flash="{{=session.flash or 'empty'}}"; > > if (flash=="") > { >

Re: [web2py] add_button to go to the previous page

2017-01-10 Thread Áureo Dias Neto
with this: form.add_button("Annulla",URL( 'CONTROLLER' , 'FUNCTION_NAME' )) 2017-01-10 8:44 GMT-02:00 Andrea Fae' : > I have this situation > form = crud.update(db.pc, pc, onaccept=crud.archive, deletable=False, > next='lista_pc') > form.add_button("Annulla",URL('lista_pc')) > > I want that butt

Re: [web2py] add_button to go to the previous page

2017-01-10 Thread Áureo Dias Neto
example: form.add_button("Annulla",URL('default','index')) 2017-01-10 8:47 GMT-02:00 Áureo Dias Neto : > with this: > > form.add_button("Annulla",URL( 'CONTROLLER' , 'FUNCTION_NAME' )) > > 2017-01-10 8:44 GMT-02:

Re: [web2py] add_button to go to the previous page

2017-01-12 Thread Áureo Dias Neto
: > I don't know what is the previous page because this page can come from > different pages...this is the problem...I want to reference the previous > page... thank you > > Il giorno martedì 10 gennaio 2017 11:48:42 UTC+1, Áureo Dias Neto ha > scritto: >> >> ex

Re: [web2py] add_button to go to the previous page

2017-01-12 Thread Áureo Dias Neto
I do not know if this is the best way to do this, because it is not very practical if you have several pages .. 2017-01-12 14:14 GMT-02:00 Áureo Dias Neto : > you can take this: > > if user is in PageA, and click a button to go to another page, pass the > name of the actual page as

Re: [web2py] Re: FPDF

2017-01-13 Thread Áureo Dias Neto
> > def footer(self): > self.set_y(-15) > self.set_font('Arial', 'I', 8) > txt = 'Folha %s de %s' % (self.page_no(), self.alias_nb_pages()) > self.cell(0, 10, txt, 0, 0, 'C') > self.set_y(-15)

Re: [web2py] Re: FPDF

2017-01-13 Thread Áureo Dias Neto
I want to concatenate two functions, thats all one, return a pdf.. and i want to show this 2 pages only in one 2017-01-13 23:02 GMT-02:00 Áureo Dias Neto : > this is my all code of first page > i want another page, totally different of this, in the same pdf > > def ticketliberac

[web2py] PDF WITH FPDF - TWO PAGES WITH DIFFERENTE HEADER

2017-01-17 Thread Áureo Dias Neto
Guys, i have two pages on a report, generated by FPDF, but i want that pages, have differente Header, thats is defined in the Class Header.. -- 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: PDF WITH FPDF - TWO PAGES WITH DIFFERENTE HEADER

2017-01-18 Thread Áureo Dias Neto
Not yet, can you send me some link, from some example with 2 pages? -- 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

Re: [web2py] Form field defaults the second time through

2017-01-20 Thread Áureo Dias Neto
Change if form.process().accepted: form.vars.PostDate = request.vars.PostDate response.flash = T("Thank you!") to if form.process(keepvalues = True).accepted: response.flash = T("Thank you!") 2017-01-20 4:02 GMT-02:00 Armando Hernandez < armando.hernandez.ma...@g

Re: [web2py] Re: pass arguments to menu item

2017-01-25 Thread Áureo Dias Neto
Leonel, can explain the difference between two codes? 2017-01-25 15:12 GMT-02:00 Leonel Câmara : > Note that this isn't a query: > > query = db((db.asset.tipo=='SC') & (db.asset.is_active==True)) > > this is a query: > > query = (db.asset.tipo=='SC') & (db.asset.is_active==True) > > -- > Resource

Re: [web2py] Re: pass arguments to menu item

2017-01-25 Thread Áureo Dias Neto
Thanks bro, it's really usefull \o 2017-01-25 15:23 GMT-02:00 Leonel Câmara : > The first one: > > *db(*(db.asset.tipo=='SC') & (db.asset.is_active==True)*)* > > Returns a Set (this is not a python set but a pyDAL one) > > The second one: > > (db.asset.tipo=='SC') & (db.asset.is_active==True) > >

[web2py] deploy web2py on CentOS 6.8 nginx + uwsgi

2017-01-26 Thread Áureo Dias Neto
Hello guys, i want to deploy my app to CentOS vesion 6.8, and use nginx + uwsgi, on users can access with static ip.. Tell me how to? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/iss

[web2py] error on application hosted on centos

2017-02-01 Thread Áureo Dias Neto
Hello, I deployed my w2p on Centos with nginx + uwsgi.. the defaults's app (welcome/examples) work great, but i upload my app to server and get: Internal errorTicket issued: unknown why? -- Resources: - http://web2py.com - http://web2py.c

Re: [web2py] Re: error on application hosted on centos

2017-02-01 Thread Áureo Dias Neto
I use sqlite, how to test the connection string? And i dont know the corrects permissions to set, if you can say, please Em 2 de fev de 2017 01:30, "Dave S" escreveu: > On Wednesday, February 1, 2017 at 6:52:01 PM UTC-8, Áureo Dias Neto wrote: >> >> Hello, >> >

Re: [web2py] Re: error on application hosted on centos

2017-02-02 Thread Áureo Dias Neto
My welcome app work great, it's accept create users etc. but the admin cannot create/delete/import existing apps, it's get error. 2017-02-02 1:32 GMT-02:00 Áureo Dias Neto : > I use sqlite, how to test the connection string? > And i dont know the corrects permissions to set

Re: [web2py] Re: error on application hosted on centos

2017-02-02 Thread Áureo Dias Neto
This works, is permission error... But now, i define on the route file, a default application, if i access " http://xxx.xxx.xxx.xxx"; i get the app i defined, but if access " http://xxx.xxx.xxx.xxx/"; i get the Welcome app.. how to resolve this? 2017-02-02 14:42 GMT-02:00 Leonel Câmara : > Make

Re: [web2py] Re: cannot access my app via http. only via https

2017-02-03 Thread Áureo Dias Neto
How are hosted your app? show the command you used to start the server 2017-02-03 15:19 GMT-02:00 António Ramos : > no ideas? > am i the bug :) > > 2017-02-02 15:50 GMT+00:00 António Ramos : > >> Hello i try to log into my app via http and it keeps asking me the login >> credentials but if i cha

[web2py] MULTIPLE APPLICATIONS IN SAME HOST/SUBDOMAINS WITH NGINX

2017-02-06 Thread Áureo Dias Neto
Hello guys, how i'm host more than one application, in the same server, with sub-domains on nginx? example: http://192.168.1.13/app1 -> 'app1' http://192.168.1.13/app2 -> 'app2' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

Re: [web2py] Re: MULTIPLE APPLICATIONS IN SAME HOST/SUBDOMAINS WITH NGINX

2017-02-07 Thread Áureo Dias Neto
'domain.com':'site1', > > 'app.domain.com':'app', > > 'app2.domain.com':'app2', > > > } > )) > > l codice... &

[web2py] W2P NGINX ERROR

2017-02-07 Thread Áureo Dias Neto
I have the 502 bad gateway error, on nginx + centos + uwsgi.. it's work's great, but after restart the server system, i get the error.. i atached the config files and nginx error log any ide0? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

Re: [web2py] W2P NGINX ERROR

2017-02-07 Thread Áureo Dias Neto
And, the nginx conf file 2017-02-07 19:17 GMT-02:00 Áureo Dias Neto : > I have the 502 bad gateway error, on nginx + centos + uwsgi.. it's work's > great, but after restart the server system, i get the error.. i atached the > config files and nginx error log > > any

Re: [web2py] W2P NGINX ERROR

2017-02-07 Thread Áureo Dias Neto
Is here, sorry 2017-02-08 0:27 GMT-02:00 Jim S : > What about the uwsgi log? > > -Jim > > On Tuesday, February 7, 2017 at 3:42:10 PM UTC-6, Áureo Dias Neto wrote: >> >> And, the nginx conf file >> >> 2017-02-07 19:17 GMT-02:00 Áureo Dias Neto : >> &

Re: [web2py] W2P NGINX ERROR

2017-02-08 Thread Áureo Dias Neto
Anyone can help 2017-02-08 0:34 GMT-02:00 Áureo Dias Neto : > Is here, sorry > > 2017-02-08 0:27 GMT-02:00 Jim S : > >> What about the uwsgi log? >> >> -Jim >> >> On Tuesday, February 7, 2017 at 3:42:10 PM UTC-6, Áureo Dias Neto wrote: >>> &g

Re: [web2py] W2P NGINX ERROR

2017-02-08 Thread Áureo Dias Neto
t traceback. > > If I had to guess I'd say it's an issue with permissions. > > Can you go to the python shell and import MySQLdb? Can you do it as the > user running uwsgi? > > -Jim > > On Wed, Feb 8, 2017 at 7:12 AM, Áureo Dias Neto > wrote: > >> Any

Re: [web2py] W2P NGINX ERROR

2017-02-08 Thread Áureo Dias Neto
on-layer#The-database-abstraction-layer > > Also, was that they entire uwsgi log? If not, can you upload it? > > -Jim > > On Wed, Feb 8, 2017 at 7:40 AM, Áureo Dias Neto > wrote: > >> i dont want mysql, i use sqlite.. how to desactive mysqldb? >> >>

Re: [web2py] W2P NGINX ERROR

2017-02-08 Thread Áureo Dias Neto
2py? > > -Jim > > On Wed, Feb 8, 2017 at 8:10 AM, Jim Steil wrote: > >> Open a python shell >> >> import MySQLdb >> >> Does it work or give you an error? >> >> -Jim >> >> >> On Wed, Feb 8, 2017 at 7:54 AM, Áureo Dias Neto

Re: [web2py] W2P NGINX ERROR

2017-02-08 Thread Áureo Dias Neto
and the log is only this 2017-02-08 12:24 GMT-02:00 Áureo Dias Neto : > on a python shell the import work.. > > from the command 'pip list' : pip: command not found > > 2017-02-08 12:11 GMT-02:00 Jim Steil : > >> Or, from a linux shell type: >> &g

Re: [web2py] W2P NGINX ERROR

2017-02-08 Thread Áureo Dias Neto
I restart the nginx, and it is the new log file 2017-02-08 12:28 GMT-02:00 Áureo Dias Neto : > and the log is only this > > 2017-02-08 12:24 GMT-02:00 Áureo Dias Neto : > >> on a python shell the import work.. >> >> from the command 'pip list' : pip: comm

Re: [web2py] W2P NGINX ERROR

2017-02-09 Thread Áureo Dias Neto
ith paste.deploy here. If it were me I'd try > reinstalling uwsgi. Did you use a web2py script to install everything on > centos? I'm more of an ubuntu guy and am not familiar with the specifics > of a centos install or how to get web2py on it. > > -Jim > > On Wed, Feb 8

[web2py] BOOTSTRAP DATEPICKER AUTOCLOSE

2017-02-12 Thread Áureo Dias Neto
Hello, i'm using the bootstrap datepicker module created by Leonel Camara.. my question is, how to autoclose this after date selection? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/is

Re: [web2py] nginx + apache + uwsgi -- only index.html loads inside web2py

2017-02-19 Thread Áureo Dias Neto
Hello Or you use nginx + uwsgi Or use apache + wsgi Em 19 de fev de 2017 19:18, "LoveWeb2py" escreveu: > Hello, > > I ran the *setup-web2py-nginx-uwsgi-ubuntu.sh *to get web2py up and > running, but i'm running into an odd issue. > > I'm using 1and1 hosting and they use vhosts. So the setup they

Re: [web2py] nginx + apache + uwsgi -- only index.html loads inside web2py

2017-02-19 Thread Áureo Dias Neto
https://www.1and1.com/ > linux-web-hosting > > When I run a netstat it shows that port 80 is listening through nginx. In > the nginx configuration there is a proxy setting that forwards port 80 > traffic to port 7080 which is hosted by Apache. > > On Sunday, February 19, 2017

Re: [web2py] Re: Query auth_user over first and last names in one query

2017-03-09 Thread Áureo Dias Neto
name = form.vars.name lastname = form.vars.lastname query = db((db.auth_user == name) or (db.auth_user == lastname)).select() form = SQLFORM.grid(query) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

Re: [web2py] Re: Query auth_user over first and last names in one query

2017-03-09 Thread Áureo Dias Neto
or this: name = form.vars.name lastname = form.vars.lastname query = ((db.auth_user == name) or (db.auth_user == lastname)) form = SQLFORM.grid(query) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

Re: [web2py] Re: Query auth_user over first and last names in one query

2017-03-09 Thread Áureo Dias Neto
want to > implement a CONCAT function like in the sample SQL Statement I mentioned > above. > > -Jim > > > On Thursday, March 9, 2017 at 7:47:16 AM UTC-6, Áureo Dias Neto wrote: >> >> or this: >> >> name = form.vars.name >> lastname = form.vars

[web2py] how to iterate IS_IN_DB validator with multiple option set to True

2017-03-22 Thread Áureo Dias Neto
i have an field with the IS_IN_DB validator with multiple option set to True, i want to iterate it to show the results an example of field content is: {'Curso': '|8|9|'} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] REGULAR TASK EVERY DAY

2017-03-23 Thread Áureo Dias Neto
Hello guy's, i have a function in controller thats calcule values of all the database everytime an user access the index page.. but now, i want to run this in server side, every hour or day.. how to do it? use schedular or cron? -- Resources: - http://web2py.com - http://web2py.com/book (Docu

[web2py] Discussion: SQLITE for large applications

2017-03-23 Thread Áureo Dias Neto
Friends, I run information systems and always my teachers say that sqlite is not reliable to use as a database for production environment .. The problem with this statement is that they can not give me a good argument to support this idea, and also, I've done several tests with a few thousand re

Re: [web2py] Discussion: SQLITE for large applications

2017-03-23 Thread Áureo Dias Neto
Antonio, I get it with cron? -- 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 "

Re: [web2py] Pagination, only add var if it already exists?

2017-03-30 Thread Áureo Dias Neto
hello, why note use session object? 2017-03-30 11:41 GMT-03:00 r : > Hi, so my index page is like this: /index?page=1 I'm using pagination, > when the user clicks on the next page, it should become: /index?page=2 > > However if there is another var in the URL, it should carry that too > > /index

Re: [web2py] Pagination, only add var if it already exists?

2017-03-30 Thread Áureo Dias Neto
and try it out later. > Thanks > > On Thursday, 30 March 2017 15:45:23 UTC+1, Áureo Dias Neto wrote: >> >> hello, >> >> why note use session object? >> >> 2017-03-30 11:41 GMT-03:00 r : >> >>> Hi, so my index page is like this: /index?page=1

Re: [web2py] Upgraded OS, now IS_IN_SET now working

2017-04-04 Thread Áureo Dias Neto
the correct is: requires=IS_IN_SET(['Only one option '])) 2017-04-04 5:16 GMT-03:00 Kenneth : > Hi, > > yesterday I did a yum update on my CentOS server and today I'm getting > errors on rows using IS_IN_SET? > > I'm using Python 2.6 for web2py and that one was not updated. I know a lot > was u

[web2py] Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
Friends, assuming a hypothetical application .. If I have a large multiuser and monolithic application .. with the growing of it (more clients, more concurrent accesses) .. I have some doubts .. For example search and report screens: 1) If I ask to fetch records and fill a table with 200 record

Re: [web2py] Re: Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
our production environment a bit. What > servers/middleware? What database? > > -Jim > > > On Tuesday, April 4, 2017 at 7:10:53 AM UTC-5, Áureo Dias Neto wrote: >> >> Friends, assuming a hypothetical application .. >> >> If I have a large multiuser and mon

Re: [web2py] Re: Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
rrently using? > > -Jim > > > On Tuesday, April 4, 2017 at 7:40:33 AM UTC-5, Áureo Dias Neto wrote: >> >> I use nginx with uwsgi as a server in the centos .. the database, I was >> wondering if you have experiences on performance between sqlite and mysql >>

Re: [web2py] Re: Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
How to migrate data from sqlite to mysql or postgre? I tried to migrate the data to mysql using the workbench, but it did not work .. And, how would this question the database on another server? How does the connection work? -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

Re: [web2py] Upgraded OS, now IS_IN_SET now working

2017-04-04 Thread Áureo Dias Neto
^ > SyntaxError: invalid syntax > > > Kenneth > > Den tisdag 4 april 2017 kl. 15:10:26 UTC+3 skrev Anthony: >> >> On Tuesday, April 4, 2017 at 7:05:25 AM UTC-4, Áureo Dias Neto wrote: >>> >>> the correct is: >>> >>> requires=IS_

Re: [web2py] Re: Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
i will try this, thanks man 2017-04-04 10:15 GMT-03:00 黄祥 : > perhaps you can use export import csv for that > 1. export the sqlite data into *.csv > 2. change the database connection from sqlite into mysql or postgresql > (appconfig.ini of db.py) > 3. ensure the migrate is True > 4. hit appadmin

Re: [web2py] Re: Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
s/23733734/how-to- > enable-remote-access-of-mysql-in-centos > > -Jim > > > On Tuesday, April 4, 2017 at 8:07:55 AM UTC-5, Áureo Dias Neto wrote: >> >> How to migrate data from sqlite to mysql or postgre? >> I tried to migrate the data to mysql using the workbenc

Re: [web2py] Re: Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
It's interesting to think about this possibility ... I'm thinking of something around 3 thousand users, but transactions can vary a lot, since I can have 10 or 1000 users online .. I did not measure this detail right .. How to configure Redis server for caching? And if I keep a single server for t

Re: [web2py] Re: Questions about production environment / large applications

2017-04-04 Thread Áureo Dias Neto
Thank you, I'll try to migrate to mysql and keep on a server for now -- 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

[web2py] Re: Questions about production environment / large applications

2017-04-05 Thread Áureo Dias Neto
ttps://groups.google.com/forum/#!searchin/web2py/migrate$20$3D$20false$20slow%7Csort:relevance/web2py/2w29c7Revgo/0JvafzGYFAAJ > > > On Tue, Apr 4, 2017 at 11:20 AM, Áureo Dias Neto > wrote: > >> Hi, i dont make this, whats you effect on the app? >> >> 2017-04-04 1

[web2py] UPDATE BOOTSTRAP VERSION FROM 3 TO 4

2017-04-12 Thread Áureo Dias Neto
Hello guys, How to update version 3 bootstrap to 4 on web2py? I tried to replace the .css and .js files, however I got a lot of bug and unrecognized classes .. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] Make web2py update tables schemas auto

2017-04-19 Thread Áureo Dias Neto
How can I make web2py recreate (alter) my tables according to my models, using mysql? In SQLite is is automatic, but when the 'migrate = true' hedge, I got an error that is an X table (all of them) also exist, also tried fake_migrate_all = True, not a bug in this case, but my schema Bank Not up

Re: [web2py] Re: Make web2py update tables schemas auto

2017-04-20 Thread Áureo Dias Neto
2017 at 4:42:33 PM UTC-7, Áureo Dias Neto wrote: >> >> How can I make web2py recreate (alter) my tables according to my models, >> using mysql? In SQLite is is automatic, but when the 'migrate = true' >> hedge, I got an error that is an X table (all of them) also exist

Re: [web2py] Re: Make web2py update tables schemas auto

2017-04-20 Thread Áureo Dias Neto
In fact, I migrated my application from sqlite to mysql .. -- 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] Re: Make web2py update tables schemas auto

2017-04-20 Thread Áureo Dias Neto
AM UTC-4, Áureo Dias Neto wrote: >> >> Yes, I'm working with legacy tables that were already existing in MySql >> before you hooked your application to that databases, and I added fields to >> my models, and this not reflect on the db >> > > If you never used

Re: [web2py] Re: GAE Datastore performance / potential index issue

2017-04-24 Thread Áureo Dias Neto
Hello, i have the same problem with sqlite/mysql.. when i fetch some 1000 row, with one column only, its takes about 15/20 seconds to load a page.. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com

Re: [web2py] conditional block insert

2017-04-24 Thread Áureo Dias Neto
is all python code, you can use one '{{' at the begin of code and '}}' at end {{block left_sidebar if auth.has_membership('manager'): include 'manager_sidebar.html' else: include 'sidebar.html' pass end}} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gi

Re: [web2py] Re: UPDATE BOOTSTRAP VERSION FROM 3 TO 4

2017-04-26 Thread Áureo Dias Neto
Yes Leonel, when I update the files to bootstrap 4, only have problems with grid and the nav's -- 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 receive

Re: [web2py] Hide the achive links for a table.

2017-04-28 Thread Áureo Dias Neto
in you smartgrid definition, form = SQLFORM.smartgrid(db.table,linked_tables=[]) or form = SQLFORM.smartgrid(db.table,linked_tables=None) I dont remember whats the correct -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Update field dynamically based on the value of another field (ajax?)

2017-05-14 Thread Áureo Dias Neto
good evening, I want to update a value of one field in the form, according to the one selected in another field of the same form. I tried with ajax as follows: controller: Def returns_unit_value (): Value = db (db.estoque.id == request.vars.Code) .select (). First () Return value.Preco View:

Re: [web2py] Deploying on hosted server with cpanel

2017-05-18 Thread Áureo Dias Neto
i know this, it's from brazil https://www.kinghost.com.br/web2py -- 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

Re: [web2py] Can't load form using {{=form}} only by {{=LOAD('default','def')}} or submit the form.

2017-08-04 Thread Áureo Dias Neto
Your 'form' is in the variable order, here: order = SQLFORM(db.order,... use {{=order}} in the view -- 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

[web2py] MIGRATE UPLOADS FROM SQLITE TO POSTGRESQL

2017-11-20 Thread Áureo Dias Neto
I migrated my data from sqlite to postgres, but I have file uploads on disk used in my database. I want to send them from my "disk" to my base in postgresql, to use it in a "blob (bytea, actually)" field. Thank you in advance, family. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] scale web2py horizontally (nginx + uwsgi + postgresql)

2017-11-27 Thread Áureo Dias Neto
I have a server with 8GB of RAM, running postgresql + nginx + uwsgi in CentOS environment, I would like reviews on scalability -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: scale web2py horizontally (nginx + uwsgi + postgresql)

2017-11-29 Thread Áureo Dias Neto
When a I do a big query on any table (+- 3k rows), the process is too slow or in any cases, the memory is out and the nginx return a 502 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/is

Re: [web2py] Re: scale web2py horizontally (nginx + uwsgi + postgresql)

2017-11-29 Thread Áureo Dias Neto
My processor: Intel Xeon quad core 2.5 GHz Disk: 1tb HD do you recommend amazon cloud or Google app engine ?, I would like a more flexible environment, do you have experiences with these services? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

Re: [web2py] Re: scale web2py horizontally (nginx + uwsgi + postgresql)

2017-11-29 Thread Áureo Dias Neto
ers for all of our apps. Our web service is 8 cores > on VMWare with 16GB of ram. Our DB (MySQL) server is 4 cores with 16GB of > ram. We routinely query tables with one million + records and have great > response time. > > -Jim > > On Wed, Nov 29, 2017 at 10:27 AM, Áureo Dia

Re: [web2py] Re: scale web2py horizontally (nginx + uwsgi + postgresql)

2017-11-30 Thread Áureo Dias Neto
Okay, I'll try this is tweaks .. What's the best way to test these things? thanks at all Leonel -- 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 recei

  1   2   >