[web2py] Re: JSON / XML / other as response when raising HTTP error to restful request

2016-06-28 Thread Joel Samuelsson
Marlysson Silva: Yes, it would. However, when raising an exception as in the example code above, it doesn't. Niphiod: Thanks, it was really simple. I've tried other ways of setting the response code but it would either overwrite the body with "409 CONFLICT" or just return 200 OK. Den tisdag 28

Re: [web2py] Re: Reopen a session without cookies

2016-06-28 Thread Martin Weissenboeck
Hi, yes - my application with Telegram works fine. It is simple to send messages to a single person or not more than one person at a time. But if you want to offer a dialog, concurrent for several persons, the things become complicated. My solution: I have two tables: This table translates bet

[web2py] jQuery.web2py.component "Synchronous XMLHttpRequest ..." error

2016-06-28 Thread Michael Beller
I'm loading an edit form in a boostrap modal using jQuery.web2py.component(). I'm using bootstrap-datepicker.js for my date fields. The edit form works outside the modal. When I load the edit form inside the modal, everything works fine except for the datepicker. When I click on the text field

[web2py] Re: One-Step Production Deployment: Who Moved the Cheese?

2016-06-28 Thread Ben Lawrence
They changed upstart for Ubuntu 16 so this script will work for ubuntu 14 and lower, not 16 ... as I experienced a few months ago (maybe things changed since then?) On Saturday, June 18, 2016 at 4:36:58 PM UTC-7, Anthony wrote: > > Oops. It is now recommended that you use nginx+uwsgi instead of

[web2py] Re: Instructions on how to deploy on Digital Ocean

2016-06-28 Thread Ben Lawrence
With DigitalOcean it is super easy to put the postgresql database server on another machine using 'Private IP' and that shares the LAN to your web2py server. You can then use ufw to only allow traffic from the web2py server's internal IP address (ufw is for debian distros). Of course, now you a

[web2py] Raspberry Pi: 'CommonDialect' object has no attribute 'quote_template'. How come?

2016-06-28 Thread Ben Lawrence
HI About a month ago, I installed web2py on raspberry pi git clone --recursive https://github.com/web2py/web2py.git and ran the rocket server web2py -a 'your_password' -i 0.0.0.0 -p 8000 -c ca.crt -k ca.key and everything worked fine. So I got another raspberry pi and installed web2py , and now I

[web2py] Re: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2016-06-28 Thread Yangbo Xu
Thanks for the reminder. This happens only in development environment which I dont have a proper cert. Proper certificates are installed for all production environment. On Wednesday, 29 June 2016 03:20:02 UTC+8, Niphlod wrote: > > before doing that, make sure that you understand the security i

[web2py] Re: SQL Server question, transactions remaining open

2016-06-28 Thread Niphlod
are you explicitely calling db.commit() at the end of your taks ? On Tuesday, June 28, 2016 at 6:36:02 PM UTC+2, Jason Solack wrote: > > Hello all, i am running an app that utilizes the scheduler and i'm seeing > a lot of open transaction in SQL server with the last sql command being: > > IF @@TR

[web2py] Re: Use reserved keywords of mysql

2016-06-28 Thread Niphlod
if I'm not mistaken very recent releases quote everything by default, and even if the previous statement is incorrect, the entity_quoting argument is there for some time now. On Tuesday, June 28, 2016 at 7:06:49 PM UTC+2, pbreit wrote: > > Does the new DAL relax the reserved SQL words limitation

[web2py] Re: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2016-06-28 Thread Niphlod
before doing that, make sure that you understand the security implications of trusting whatever certificate you get... On Tuesday, June 28, 2016 at 6:11:00 PM UTC+2, Yangbo Xu wrote: > > Hi Niphlod, > > I did face the certificate validation problem. It seems I need to dive a > bit deeply into g

[web2py] Re: Login through modal

2016-06-28 Thread Ron Chatterjee
Yes. This worked. def main_page(): main_pg=DIV('') form = auth.login() dialog = modal_wrapper(form, _id='cont_id', header='Header', footer='footer') main_pg.append(dialog) return dict(main_pg = main_pg) def modal_wrapper(content, _id, header='', footer=''): main_wrap =

[web2py] Re: Login through modal

2016-06-28 Thread pbreit
You should be able to put the Web2py login form on a modal using something like: def mylogin(): return dict(form=auth.login()) -- 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] Re: Use reserved keywords of mysql

2016-06-28 Thread pbreit
Does the new DAL relax the reserved SQL words limitation? -- 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 subscr

[web2py] SQL Server question, transactions remaining open

2016-06-28 Thread Jason Solack
Hello all, i am running an app that utilizes the scheduler and i'm seeing a lot of open transaction in SQL server with the last sql command being: IF @@TRANCOUNT > 0 COMMIT BEGIN TRANSACTION any idea where those are being generated and how to close those transactions? Thank you Jason -- Res

[web2py] Re: web2py helping the homeless in Lisbon

2016-06-28 Thread Massimo Di Pierro
Thank you for sharing Leonel. On Tuesday, 28 June 2016 06:16:44 UTC-5, Leonel Câmara wrote: > > My company has a project I thought you guys would like to know about. > > In 2014 we were approached by the biggest NGO in Lisbon providing help to > the homeless (Comunidade Vida e Paz). They had a hu

Re: [web2py] Re: How to check if new password is different from the actual?

2016-06-28 Thread Massimo Di Pierro
Ming that the result of CRYPT()('password')[0] is not the hashed password but an object that, when converted to a string is a hashed password but when compared to a hash-ed password string, performs the comparison using the same salt and the same algorithm using the hash it is compering itself

[web2py] Re: Instructions on how to deploy on Digital Ocean

2016-06-28 Thread Massimo Di Pierro
You are right. I was not aware of it. Thanks for sharing. I will link your page from the web2py.com documentation page. On Monday, 27 June 2016 05:59:07 UTC-5, Dragan Matic wrote: > > I don't want to brag or anything similar but I think this >

[web2py] Re: A new and easier way to test your apps

2016-06-28 Thread David Ripplinger
Thanks. I realized that I was assuming that when testing it out in the python shell the working directory would be translated, which apparently it was not. When instead I ran it as a script from within the web2py directory, it worked fine. On Saturday, June 25, 2016 at 11:20:59 AM UTC-6, Anthon

[web2py] Re: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2016-06-28 Thread Yangbo Xu
Hi Niphlod, I did face the certificate validation problem. It seems I need to dive a bit deeply into gluon and change the source code which makes use of urllib? Just wonder, if there is better way to skip the certificate validation? (similar problem faced for gluon.tools.fetch, which doesn't ha

Re: [web2py] web2py helping the homeless in Lisbon

2016-06-28 Thread Ron Chatterjee
Is that the picture of mother teresa in the hero section? On Tuesday, June 28, 2016 at 7:58:06 AM UTC-4, Kiran Subbaraman wrote: > > Leonel, > Thanks for sharing this; inspiring to know that your team, and web2py is a > making a difference in people's lives. All the best with this effort. > > __

[web2py] Re: Size of SQLFORM.grid items

2016-06-28 Thread Sneka R
Thanks a lot. -- 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-users" gr

[web2py] Re: Size of SQLFORM.grid items

2016-06-28 Thread Sneka R
Thanks a lot. -- 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-users" gr

Re: [web2py] Re: Reopen a session without cookies

2016-06-28 Thread Gael Princivalle
Hello. Do you have got success with the Telegram integration ? Can you post the URL where is it ? Il giorno sabato 12 settembre 2015 17:54:39 UTC+2, mweissen ha scritto: > > Thx! I put a variable in db.py, use it as a global variable and save the > content as json field for the next round. > > 2

[web2py] Re: JSON / XML / other as response when raising HTTP error to restful request

2016-06-28 Thread Niphlod
or...given that the "big strange thing" is the status using the usual syntax with response.status = 409 just before before returning ? On Tuesday, June 28, 2016 at 4:44:44 PM UTC+2, Marlysson Silva wrote: > > The web2py would use generic views depending of extension of url. > Is it? > >

[web2py] Re: JSON / XML / other as response when raising HTTP error to restful request

2016-06-28 Thread Marlysson Silva
The web2py would use generic views depending of extension of url. Is it? Em terça-feira, 28 de junho de 2016 11:31:48 UTC-3, Joel Samuelsson escreveu: > > Hi, > > I'd like to respond with a complex data structure when raising a HTTP 409 > Conflict as response to a restful request but I can't see

[web2py] JSON / XML / other as response when raising HTTP error to restful request

2016-06-28 Thread Joel Samuelsson
Hi, I'd like to respond with a complex data structure when raising a HTTP 409 Conflict as response to a restful request but I can't seem to figure out how. If possible, I'd like to reuse as much as possible from built-in functions in web2py. The best idea I've gotten so far is something like t

[web2py] insert table twice on same table, the second insert is not work

2016-06-28 Thread 黄祥
is it possible to insert table twice on same table in web2py? e.g. *modules/test_event.py* def after_insert_event(f, id, table): time_stamp = current.request.now client_ip = current.request.client user_id = current.auth.user_id origin = '%s/%s' % (current.request.controller, current.request.functio

Re: [web2py] web2py helping the homeless in Lisbon

2016-06-28 Thread Kiran Subbaraman
Leonel, Thanks for sharing this; inspiring to know that your team, and web2py is a making a difference in people's lives. All the best with this effort. Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Tue, 28-06-2016 4:46 PM, Leonel Câmara wr

Re: [web2py] Re: update name of places and show them in google maps using web2py and python?

2016-06-28 Thread Suchismita Debnath
okay thank you On Tue, Jun 28, 2016 at 4:54 PM, Marlysson Silva wrote: > You have a field of form below of map of google maps, you want typing and > showing at map? > > You could use session, "session.places" that would be a list and do type: > session.place_names = [] > session.place_names.app

Re: [web2py] Re: SSL database connections

2016-06-28 Thread Marlysson Silva
To better anwers, could create a new topic with a question. But basicaly it's a list using append (add in last position) where when remove a element, just make a list.pop() , removing top element (last position added). Em terça-feira, 28 de junho de 2016 03:10:36 UTC-3, Suchismita Debnath escr

[web2py] Re: update name of places and show them in google maps using web2py and python?

2016-06-28 Thread Marlysson Silva
You have a field of form below of map of google maps, you want typing and showing at map? You could use session, "session.places" that would be a list and do type: session.place_names = [] session.place_names.append(request.vars["place_name"] and return this list, so don't would clean a list of

[web2py] web2py helping the homeless in Lisbon

2016-06-28 Thread Leonel Câmara
My company has a project I thought you guys would like to know about. In 2014 we were approached by the biggest NGO in Lisbon providing help to the homeless (Comunidade Vida e Paz). They had a huge problem, they have over 500 volunteers, divided by 56 teams, every day 4 teams go out and visit m

Re: [web2py] Re: How to check if new password is different from the actual?

2016-06-28 Thread Marvi Benedet
Ok, thanks to the suggestions. I'll give a try! 2016-06-27 23:15 GMT+02:00 Limedrop : > The function you are looking for is CRYPT. You could but something like > this in an on_validation function: > > if auth.user.password == CRYPT()(request.vars.new_password)[0]: >