Re: [web2py] Web2py Error:tuple object has no attribute 'replace'

2016-05-25 Thread Maurice Waka
Sorry I forgot one thing. I tried to remove the replace () function and only got a blank page. I would like to find a way to iterate between printing both the location or record[3] and the sentence On May 26, 2016 08:04, "Maurice Waka" wrote: > I initially had a code : >

Re: [web2py] Re: Web2py, nginx, installation on Raspberry Pi

2016-05-25 Thread Ben Lawrence
Never mind. I can just use http://purschel.eu/python/web2py-on-raspberry-pi-raspbian/ login as pi user (any user, not root) and enter following commands: sudo apt-get install python-web2py mkdir web2py cd web2py openssl genrsa -out ca.key 1024 openssl req -new -key ca.key -out ca.csr openssl

[web2py] Web2py Error:tuple object has no attribute 'replace'

2016-05-25 Thread Maurice Waka
I initially had a code : for records in records: id = record[0] location = record[3] code return location with wb2py code as: def consult_p(): code... if list_func: return list_func report = consult_p() view_consult code: {{while true:}}{{break}} '))}}{{break}}

[web2py] How to link to script file from within another script file in Web2py?

2016-05-25 Thread Anthony
You need to use the URL() helper and precede it with "=". Please see the documentation on views. Anthony -- 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) ---

[web2py] How to link to script file from within another script file in Web2py?

2016-05-25 Thread Ryland Dean
I have an external script file that I need to link to a webworker. Here is the native links. var RECORDER_WORKER_PATH = 'js/recorderWorker.js'; var ENCODER_WORKER_PATH = 'js/mp3Worker.js'; They don't properly link once I add them into the web2py framework. I tried this: var

[web2py] File permission issues when running script as scheduler

2016-05-25 Thread lamest . email . ever
I have a simple application whose scheduler automatically backs up rolling log files in a database. There is an option in the controller to manually update whenever you want (rather than waiting for the log to roll). The scheduler task has to handle such cases by comparing two versions of the

[web2py] SQLFORM with variable as db.'variable'

2016-05-25 Thread botasservice
Hello, I have a problem: #@auth.requires_login() def new_acc(): if auth.user_id == None: new_acc="You need to authorize" else: try: TestDB.define_table(auth.user.username, Field('trv_username', readable=True, writable=True), Field('trv_password',

[web2py] Set Scheduler Run Timeout on Try Except

2016-05-25 Thread Andrew Evans
Hello, I am running a scheduler that I would like to timeout the scheduler_run on a failed execution of my function so that it will attempt to retry running it. try: attempt to run my code except: failed to run, timeout scheduler_run to reattempt Also I have parameters that when a

[web2py] Re: request.args and special character

2016-05-25 Thread villas
@Ivan Could be caused by the router. See this http://stackoverflow.com/questions/7279198/allow-20-in-web2py-requests-args. I guess you could always use a different encoding too (base64 or something?). Or maybe access request.raw_args @Dave, request.args(0) is similar to request.arg[0]

[web2py] Re: integration for viewerjs

2016-05-25 Thread Anthony
I don't see why not, as it is just a client-side Javascript package. You would create one web2py controller action to serve the viewer itself (they provide an HTML template), and then you would also have to serve the individual files to load in the viewer. So, you might host the viewer at

Re: [web2py] Re: Web2py, nginx, installation on Raspberry Pi

2016-05-25 Thread Ben Lawrence
Hi Did you finally manage to upload the modified script for raspberry pi ? On Tuesday, August 26, 2014 at 12:09:44 PM UTC-7, Encompass solutions wrote: > > Thanks. I will probably try with the repos version and submit a pull > request with a script for the web2py source. Also making a tool to

[web2py] Re: web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-25 Thread Anthony
Have a look at this client: https://hlandau.github.io/acme/. Anthony On Wednesday, May 25, 2016 at 6:11:29 PM UTC-4, Mark Graves wrote: > > Has anyone used LetsEncrypt certificates or followed the instructions > below with web2py? > > >

[web2py] Re: (More complex) Aggregations in web2py and using SQLFORM.grid (DAL vs. SQL vs. pandas vs. ???)

2016-05-25 Thread villas
Hi Stex Hmm, again your solution seems very complex. Luckily, you confirmed the results you expect so I propose the following solution would be simpler? maxdate = db.prop_val.val_date.max() rows = db(db.prop.id == db.prop_val.prop_id).select(

[web2py] web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-25 Thread Mark Graves
Has anyone used LetsEncrypt certificates or followed the instructions below with web2py? https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04 https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/ What are your thoughts of the

[web2py] integration for viewerjs

2016-05-25 Thread Oli
is there a possibility to integrate the documentviewer viewerjs? http://viewerjs.org/ -- 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

[web2py] Re: stuck up on Deployment on CentOS 6.7

2016-05-25 Thread Dave S
On Wednesday, May 25, 2016 at 6:10:02 AM UTC-7, Rahul wrote: > > Hi All, >I have successfully deployed web2py with modwsgi and Apache on > CentOS6.7. When I access my site, by default it shows - > http://www.mysite.in/welcome/default/index . Can anyone help on below > items - > 1.

[web2py] WEB2PY Creating Controls Dynamically

2016-05-25 Thread 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, how can i build these dropdowns dynamically? user will see that past data and will be able to select an option from that drop down

Re: [web2py] many tyo many

2016-05-25 Thread Richard Vézina
I would suggest you to use things like Tag-it : http://aehlke.github.io/tag-it/ You can then use validate_and_insert web2py function to make sure you are not create security issue like sql injection if you insert ajax/post directly into the db. Richard On Wed, May 25, 2016 at 11:21 AM, goome

[web2py] many tyo many

2016-05-25 Thread goome
Hello i have a table 'post' and a table 'tag' and as there is a 'many to many' relationship between them, i also created a table 'post_tag' that only has reference to previous tables. But now, in the form to create post (form = SQLFORM(db.post)) how can i add field to select/create tags? Is

[web2py] Re: web2py in virtualenv

2016-05-25 Thread Niphlod
pythonically speaking, web2py is not a package, gluon is. you just have to have gluon in sys.path. On Wednesday, May 25, 2016 at 12:22:20 PM UTC+2, Remco Boerma wrote: > > Hey folks. > > I want to use pydal and the validators of web2py in a virtualenv. I am > working on a seperate script and

[web2py] Re: DB2 truncate()

2016-05-25 Thread Auden RovelleQuartz
OK, yes - - - at the company I am working at we do use iSeries to connect windows desktop to DB2 on AS400 so that would explain why it did not work - I had already found a workaround - thanks for the reply On Monday, May 9, 2016 at 7:20:40 PM UTC-5, DenesL wrote: > > There are different

[web2py] Re: is such work with current.T() correct and safe?

2016-05-25 Thread Anthony
> > from gluon import current > from gluon.validators import IS_NOT_EMPTY, IS_IN_DB > class FormTxt(object): >err_choose = current.T('choose one or more') >err_required = current.T('this is required') > The purpose of translation is to translate strings based on the requested language

[web2py] SQL or No SQL - from Voltdb

2016-05-25 Thread Ron Chatterjee
If anyone is interested. https://event.on24.com/eventRegistration/EventLobbyServlet?target=reg20.jsp=IEEE=2931549596e224427181941f57189085=1189569=1=8682780B42E066377E61AD8D4995EEE1==register -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: stuck up on Deployment on CentOS 6.7

2016-05-25 Thread Rahul
Hi All, I have successfully deployed web2py with modwsgi and Apache on CentOS6.7. When I access my site, by default it shows - http://www.mysite.in/welcome/default/index . Can anyone help on below items - 1. How to change site to show something like by default -

[web2py] Re: Bug? autocomplete widget kills the bootstrapiness of the associated smartgrid form control

2016-05-25 Thread RekGRpth
I suggested to solve it so: https://github.com/web2py/web2py/issues/1190 суббота, 2 апреля 2016 г., 17:00:13 UTC+5 пользователь Valdeck Rowe написал: > > I've noticed that adding autocomplete widget to a field definition (only > appears to work programmatically) removes the form-control class

[web2py] standalone pyDAL dont close connections

2016-05-25 Thread luis . valladares
Hello! Im using pyDAL with falcon (http://falconframework.org/) for microservices building but im having troubles in the way pyDAL handle the connections, i think pydal isnt telling my MySQL server to close the connection after each query, i've writen an example method with just a select, and

[web2py] Re: (More complex) Aggregations in web2py and using SQLFORM.grid (DAL vs. SQL vs. pandas vs. ???)

2016-05-25 Thread stex76
Ok, with the DAL I solved it in the following way and did the join "manually": # get last val_date for each prop maxdate = db.prop_val.val_date.max().with_alias('max_val_date') rows1 = db().select(db.prop_val.prop_id.with_alias('prop_id'), maxdate, groupby=db.prop_val.prop_id) #

[web2py] I am trying to establish a startup in India that designs sites using web2py. Have a look here.

2016-05-25 Thread Steve Joe
I am designing the main website. Meanwhile I created the Facebook page for it. Have a look here and please give me some tips based on my posts. https://www.facebook.com/techavocado/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] web2py in virtualenv

2016-05-25 Thread Remco Boerma
Hey folks. I want to use pydal and the validators of web2py in a virtualenv. I am working on a seperate script and not a full blown web2py application. So no web, just console. Since pip install web2py produces nothing useful i do this: cd env bin/activate cd lib/site-packages git clone

[web2py] is such work with current.T() correct and safe?

2016-05-25 Thread Mirek Zvolský
I understand that it requires attention to use - variables from models - variables from controllers - request, response, db, auth, T(?) in modules. Inside functions and method of class they can be used - through function parameter/argument - as current.x Outside functions/methods, i.e.

[web2py] Re: (More complex) Aggregations in web2py and using SQLFORM.grid (DAL vs. SQL vs. pandas vs. ???)

2016-05-25 Thread stex76
Hi villas, thanks for your example but that delivers the wrong result. With your query we get name date amount aaa 2016-01-15 15 bbb 2016-01-20 10 ccc 2016-01-25 29 The result with your data should be (perhaps with additional price column) name date