Re: [web2py] Re: SSL certificate on web2py (aws ec2 + Nginx + uwsgi)

2017-11-20 Thread Michele Comitini
gt;> > -- > 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 Gr

Re: [web2py] Re: limiting the SSL max fragment size on development server (Rocket)

2017-10-31 Thread Michele Comitini
I think this is not exposed at python level you may try to hack the size on the lower level on the socket object using the setsocktopt function) ... untested ;-) socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 4096) 2017-10-25 20:42 GMT+02:00 Dave S : > > > On

Re: [web2py] Re: Restful api for uploading files

2017-10-19 Thread Michele Comitini
see this for sending: http://docs.python-requests.org/en/latest/user/quickstart/#post-a-multipart-encoded-file 2017-10-19 12:33 GMT+02:00 Michele Comitini <michele.comit...@gmail.com>: > see http://web2py.com/books/default/chapter/29/07/forms-and- > validators#SQLFORM-and-uploads &

Re: [web2py] Re: Restful api for uploading files

2017-10-19 Thread Michele Comitini
see http://web2py.com/books/default/chapter/29/07/forms- and-validators#SQLFORM-and-uploads just send the file in a HTTP POST (multipart encoded) from the client Code to do it is similar to this... @request.restful() def uploader(): def POST(*args, **kwargs): # if the post is

[web2py] Python malaware on PyPI, beware! caution installing external packages!

2017-09-18 Thread Michele Comitini
*Please note: web2py standard distribution is NOT affected!* http://www.nbu.gov.sk/skcsirt-sa-20170909-pypi/ mic -- 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

Re: [web2py] Re: SQLite lock (using DAL in a module)

2017-02-09 Thread Michele Comitini
Just for the sake of completeness modules are NOT reloaded at each http request. Modules are loaded and kept in the outer context of the interpreter at first import, unlike the request context which is rebuilt at each round by reading the models. 2017-02-06 21:48 GMT+01:00 Anthony

Re: [web2py] SQLite lock (using DAL in a module)

2017-02-06 Thread Michele Comitini
@Jesse SQLite has to be seen as a signle file storage. If you open in one process all other processes have to wait until the first process releases lock ownership. The best way to do that, is to put commit or rollback at the end of every access on the db. The code you posted does a single

Re: [web2py] 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-18 Thread Michele Comitini
Kudos to Anthony. I am confident we still have some room for improvement, but now it looks more realistic. 2016-11-18 2:17 GMT+01:00 Anthony : > TechEmpower just released Round 13 of its Web Framework Benchmarks. In > previous rounds, web2py did very poorly because the

Re: [web2py] Setting up nginx to enable CORS for a specific function?

2016-10-27 Thread Michele Comitini
You did not POST any multipart/mime or form encoded var so no request.vars. you should probably read the request.body content for JSON. try to look into restful services or json services (see the book) to have that done automagically... 2016-10-27 17:17 GMT+02:00 Spokes

Re: [web2py] Setting up nginx to enable CORS for a specific function?

2016-10-26 Thread Michele Comitini
You can do that easily in web2py... Below is a sample of a decorator that allows any origin. Change it to fit your needs. You can use in a controller like: @cors_allow def action(): . . . return dict(...) -- def cors_origin(): origin = request.env.http_origin

Re: [web2py] Re: Randomly stuck web2py

2016-10-25 Thread Michele Comitini
ng over it. > > Again, thanks for the input. > > -wasim > > > On Tue, 25 Oct 2016 at 14:11 Michele Comitini <michele.comit...@gmail.com> > wrote: > >> @Wasim are you leaving some web2py shell open with a db transaction going? >> >> Check uptime of you

Re: [web2py] Re: Deployment question

2016-10-25 Thread Michele Comitini
One clarification ... better performance is mostly due to the fact that the python GIL is not getting in the way 2016-10-25 19:20 GMT+02:00 Michele Comitini <michele.comit...@gmail.com>: > > Regarding switching uwsgi to fork-only - should I expect a performance > hit? > >

Re: [web2py] Re: Deployment question

2016-10-25 Thread Michele Comitini
>> Richard >> >> >> >> On Tue, Oct 25, 2016 at 8:32 AM, Jim Steil <ato....@gmail.com> wrote: >> >>> Massimo / Michele >>> >>> Thanks for the input. I don't know anything about fork only mode. >>> Looks like I have so

[web2py] Mithril i.e. the client MVC war continues

2016-10-25 Thread Michele Comitini
OK so you thought that vue.js was good enough... Take a look on mithril: http://mithril.js.org/ http://mithril.js.org/comparison.html -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: Randomly stuck web2py

2016-10-25 Thread Michele Comitini
- 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&

Re: [web2py] Re: Deployment question

2016-10-25 Thread Michele Comitini
gt;> >> What are the specific rocket concerns? Scaling? >> >> /dps >> >> -- > 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

Re: [web2py] Re: Web2py freezing

2016-10-25 Thread Michele Comitini
p-Alive requests:0* >>> >>> *Total transferred: 1834657 bytes* >>> >>> *HTML transferred: 1710187 bytes* >>> >>> *Requests per second:2.05 [#/sec] (mean)* >>> >>> *Time per request: 43969.754

Re: [web2py] Re: vue.js

2016-09-26 Thread Michele Comitini
Of course I like vue.js too. I use ractive.js also: they are very similar in many aspects. 2016-09-26 12:37 GMT+02:00 Marlysson Silva : > I intend to delve me in the Vuejs , it's an awesome library > > Facilitates futher development > > Em domingo, 25 de setembro de 2016

Re: [web2py] Re: Creating a batch using a loop

2016-09-26 Thread Michele Comitini
Could be an issue with some reference field. Are you using a IS_IN_DB validator in your model? could be that you are passing a wrong parameter to the validator. But with so little info it is just a guess. 2016-09-26 15:21 GMT+02:00 Anthony : > Hard to say what the

Re: [web2py] Re: web2py traceback is not clear to tell the error

2016-07-12 Thread Michele Comitini
To avoid incurring in overhead on every request you could use a script to be called once with web2py.py -R option. Also you could create a function in a model file with little overhead: def create_indexes(): db.executesql('CREATE INDEX...') later you can call it manually from the shell

Re: [web2py] Re: Uploading multiple images in web2py

2016-07-11 Thread Michele Comitini
@fabio using dropzone.js helps, it can upload in parallel many files using the same SQLFORM, so it is not uploading in a single POST call, but many in parallel: one for each uploaded file. The best way to do it is to write a specific action that handles just the file upload, independently from the

Re: [web2py] Case sensitivity in PostgreSQL Table and Field names

2016-07-11 Thread Michele Comitini
Try using rname and/or quoting http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#rname--Record-representation http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Database-quoting-and-case-settings--entity_quoting--ignore_field- 2016-07-11

Re: [web2py] Re: 2.14.6: Mobile plugin and shell do not work?

2016-05-11 Thread Michele Comitini
+1 not having a feature is MUCH better than having a broken one around. The end result is the same: you need to find a way to implement that feature. But at least you don't wast a lot of time trying to understand why the damn thing is not working. 2016-05-11 17:26 GMT+02:00 Niphlod

[web2py] CodernityDB pure python nosql

2016-04-20 Thread Michele Comitini
Seems interesting! http://labs.codernity.com/codernitydb/ has anyone tried it? -- 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] how to change facebook oauth2 redirect_uri

2016-04-11 Thread Michele Comitini
In the standard web2py authentication is triggered by @auth.requires_login decorator if the user is not authenticated already. in model after defining a class FacebookAccount() extended from gluon.contrib.oauth20_account.OAuthAccount auth.settings.login_form = FacebookAccount() # change

Re: [web2py] how to change facebook oauth2 redirect_uri

2016-04-10 Thread Michele Comitini
You should be able to change redirect url using the standard settings of auth. http://www.web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages You do not need ajax, just a window.open() or a or an iframe 2016-04-10 9:38 GMT+02:00 killzane : >

Re: [web2py] Re: files vanished

2016-04-09 Thread Michele Comitini
Is the machine on the public internet? 2016-04-09 15:06 GMT+02:00 Anthony : > This is nothing web2py would have done. And very difficult to provide any > help with no further details. > > > On Saturday, April 9, 2016 at 12:53:28 AM UTC-4, Sneka R wrote: >> >> Hi, >> I have

Re: [web2py] Re: Sending email through gmail account: no SSL support

2016-03-02 Thread Michele Comitini
that problem could be simply related to python process not finding the openssl shared lib at runtime. So the module can be imported, but the socket cannot work with ssl. 2016-03-02 9:24 GMT+01:00 Niphlod : > uhm. this error > > :No SSL support included in this Python > > is

Re: [web2py] Embedding Rapydscript

2016-02-08 Thread Michele Comitini
Very nice. Did you evaluate running compile_pyjs() as a web2py's scheduler task? It could simplify your code and make it more resilient. 2016-02-08 0:20 GMT+01:00 Val K : > Hi! > Coding Python with switching to coding JS - really painful. > So, I tried Rapydscript (RS) and I

Re: [web2py] web2py on AWS

2016-01-23 Thread Michele Comitini
did you run with the -p option? else you should connect to port 8000, i.e: http://your.aws.ip:8000/welcome check the output of: netstart -tanp | grep 80 mic 2016-01-23 8:46 GMT+01:00 Dave S : > I'm trying to set up a demo on an AWS free-tier linux system. I'm running >

Re: [web2py] Re: charts on web2py

2016-01-21 Thread Michele Comitini
If doing SVG client side covers your need then use raphael it is really simple, you need only to manage some json: http://raphaeljs.com/ Once you get the hang of SVG doing charts with SVG+ractive.js is also an option if you need maximum flexibility and interactivity. 2016-01-21 2:06 GMT+01:00

Re: [web2py] Re: web2py and python3

2015-12-01 Thread Michele Comitini
;-) By now we can plan jump to python4 and skip the (arguably useful) python3 era entirely ;-) 2015-12-01 17:55 GMT+01:00 Richard Vézina : > Another think about the problem and not sure if it relevent though... > > Let says that what make web2py not support python 3

Re: [web2py] Fwd: aiosmtpd 1.0a1 - asyncio-based implementations of SMTP/LMTP

2015-10-28 Thread Michele Comitini
Let's hope that it's better than async in python2.7 with TLS/SSL ... I've got bitten by it... http://bugs.python.org/issue24906 Anyway no python2.7 mantainer seems to care... the bug persists happily despite of being very easy to fix! 2015-10-26 15:43 GMT+01:00 Niphlod : >

Re: [web2py] Re: Enabling Google Sign-In

2015-10-22 Thread Michele Comitini
http://web2py.com/books/default/chapter/29/09/access-control?search=oauth#Other-login-methods-and-login-forms Grab the file google_auth.json from the google developer console and put in private dir of your app put code similar to the one below in db.py: from

Re: [web2py] Re: PostgreSQL

2015-10-22 Thread Michele Comitini
Couldn't agree more. Well engineered from the ground up. Been using it for 20+ years, I saw it steadily improving by giving little attention to the fuzz of the moment. I must admit that I become so spoiled, that if something new and really useful appears on the scene of DBs I wait postgres to

Re: [web2py] Re: Enabling Google Sign-In

2015-10-22 Thread Michele Comitini
yup it would be nice if it were maintained and moved to github... 2015-10-22 17:40 GMT+02:00 Niphlod : > I didn't know about w2p-social-auth and I'm starting to thinking that we > should "promote it" and discourage all social-own-cooked pieces inside > contrib/login_methods...

Re: [web2py] Re: Ractive and Single Page Apps

2015-10-22 Thread Michele Comitini
This ractive extension could be of interest to you IMHO: http://ractive-require.codecorico.com/ 2015-10-22 10:11 GMT+02:00 p a : > Two more comments: > > - I don't intend to push all logic to the server, but only the "view" part > in web2py. My long term goal is to have a

Re: [web2py] Fwd: aiosmtpd 1.0a1 - asyncio-based implementations of SMTP/LMTP

2015-10-22 Thread Michele Comitini
Works on python2.7? or only 3.5? 2015-10-20 16:06 GMT+02:00 Massimo DiPierro : > This is nice if you want a pure python SMTP server > > Begin forwarded message: > > *From: *Barry Warsaw > *Subject: **aiosmtpd 1.0a1 - asyncio-based implementations of

Re: [web2py] GET http://127.0.0.1:8000/favicon.ico 400 (BAD REQUEST) - using angular.js and nvd3

2015-10-05 Thread Michele Comitini
The favicon.ico is generated by the browser by looking at a link tag in html, it does not depend on your code posted here. In the browser look in the full source of the html generated by web2py to find where favicon.ico is called. Hint: look in views/layout.html see:

Re: [web2py] Re: Has anyone done a detailed security analysis or attempted a methodical attack on web2py?

2015-10-05 Thread Michele Comitini
+1 it would be nice to have a blog for this type of news... 2015-10-05 15:27 GMT+02:00 Ian Ryder : > Thanks, just running some of their tools against our app - all good so > far, if there's anything of interest I'll let you know (possibly off forum > first :)) > > > On

Re: [web2py] web2py SPA(single page application)

2015-09-15 Thread Michele Comitini
Richard is right, using Ractive.js allows the creation of SPA easily. Much more effective than angular due to a saner template design that limits the number of new attibutes to learn. And the DOM is faster to update by design. The only missing part is the AJAX communication that requires you to

Re: [web2py] How to write documentation for REST API?

2015-09-15 Thread Michele Comitini
gments for syntax higligths... > > It may be less heavy then sphinx to put in place... > > Richard > > On Mon, Sep 14, 2015 at 3:57 AM, Michele Comitini < > michele.comit...@gmail.com> wrote: > >> What is a good way to document a small REST API (@re

[web2py] How to write documentation for REST API?

2015-09-14 Thread Michele Comitini
What is a good way to document a small REST API (@request.restful)? sphinx? Suggestions welcome! mic -- 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) ---

Re: [web2py] .last() don't return last table id and first() also not returning the first record id

2015-09-09 Thread Michele Comitini
absolutely normal, try ordering or using max 2015-09-09 20:54 GMT+02:00 Richard Vézina : > Postgres > > On Wed, Sep 9, 2015 at 2:23 PM, Leonel Câmara > wrote: > >> You do not have an orderby on that select so, depending on your backend, >>

Re: [web2py] web2py job in Florida

2015-09-08 Thread Michele Comitini
Seems a private link... 2015-09-08 10:45 GMT+02:00 Jason (spot) Brower : > Hmm, I went to the link but couldn't get anything. Gave me some kind of > email access system. > > On Sun, Sep 6, 2015 at 7:58 AM Massimo Di Pierro < > massimo.dipie...@gmail.com> wrote: > >> A new

Re: [web2py] Re: Web2py Developer Jobs

2015-09-06 Thread Michele Comitini
+1. Nice and brave idea for a startup! mic 2015-09-06 7:01 GMT+02:00 Massimo Di Pierro : > Thank you Lane. Congratulations! > > > On Saturday, 5 September 2015 23:55:30 UTC-5, Lane Campbell wrote: >> >> Hello All, >> >> I just launched my startup June to help

Re: [web2py] Re: fabric app

2015-09-02 Thread Michele Comitini
10) rename estore3/ estore3.old . . . 12) remove estore3.old reducing downtime... 2015-09-02 16:57 GMT+02:00 Niphlod : > k, hacking > > > On Wednesday, September 2, 2015 at 3:34:43 PM UTC+2, Massimo Di Pierro > wrote: >> >> I would prefer if the git clone is done

Re: [web2py] Re: Facebook OAuth - newbie question

2015-09-01 Thread Michele Comitini
What is the value of: auth.settings.logged_url Check that the resulting url is exactly the one allowed on the developers panel of your facebook application. 2015-08-31 8:31 GMT+02:00 killzane : > Hi, > I follow the book and create a facebook.py in model folder. > but when

Re: [web2py] perfomance - import vs (vars)

2015-08-28 Thread Michele Comitini
You can use the web2py profiler to see what happens using a loop calling the function. In theory 2nd is faster, because there are fewer storage lookups, but difference should be really minimal. 2015-08-28 11:28 GMT+02:00 Dmitri Ermolaev ermolaev.icrea...@gmail.com: best perfomance in modules??

Re: [web2py] Re: File upload/download over https freezes site

2015-07-31 Thread Michele Comitini
nginx coupled with uwsgi is quite popular and easy to maintain compared to apache. scripts are in the scripts directory they also take care of installing uwsgi 2015-07-31 20:38 GMT+02:00 Dave davidramsayreinh...@gmail.com: Thanks for weighing in on this. I'll update my apache config and keep

Re: [web2py] Re: When will we have a proper forum ?

2015-07-30 Thread Michele Comitini
The choice is about maintaining the infrastructure to run a forum or not. If we choose to maintain it, I am in favor of a self hosted web2py solution. It takes resources, but it is not a waste of resources, since it is a real world testbed for web2py and would generate contributions for stability

Re: [web2py] Re: Web2py is Badly designed framework and Does not scale

2015-07-16 Thread Michele Comitini
Added my 2¢ . I have many mission critical, emedded or huge projects on web2py, they make real work for real people. 2015-07-16 4:37 GMT+02:00 Alex mrauc...@gmail.com: I never understood why ORM should be better than the DAL. Actually I think it's the other way around. I worked with ORM for

Re: [web2py] Re: What if Massimo got hit by a Bus?

2015-07-15 Thread Michele Comitini
Massimo recently had a little accident with the byke, the consequence was a huge increase in his contributions. Not that I am wishing him an accident with a truck, but if we make a linear projection ;-) 2015-07-15 7:00 GMT+02:00 Kiran Subbaraman subbaraman.ki...@gmail.com: Well, someone

Re: [web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-15 Thread Michele Comitini
Massimo have you taken in account to use http://satchless.com/ ? It has a fairly complete API and it's easy to couple with DAL... 2015-07-15 10:55 GMT+02:00 Massimo Di Pierro massimo.dipie...@gmail.com: You can do it here. The more times you click the more items you put the in the cart. If

Re: [web2py] Re: Web2py and OODBMS?

2015-07-15 Thread Michele Comitini
Of course one can use the usual postgresql which an ORDBM... pyDAL does not (yet) support inheritance at DDL level, but can be used at DML level for most needs. 2015-07-15 11:09 GMT+02:00 Massimo Di Pierro massimo.dipie...@gmail.com: web2py include pydal and pydal is an API for accessing RDBMs

Re: [web2py] Re: How to implement Gmail Authentication

2015-07-13 Thread Michele Comitini
The code for Google OAuth2 does not need to import oauth2. If you use OAuth2 there is no need to use any external library for oauth. While OAuth1.1 need the oauth2 python external python module (pip install oauth2 as Massimo says). I know it is ridiculous but the confusion arises from the python

[web2py] Semantic 2.0

2015-07-01 Thread Michele Comitini
Better and better! -- 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] Re: Semantic 2.0

2015-07-01 Thread Michele Comitini
ops forgot to paste the link! thanks leonel! 2015-07-02 2:05 GMT+02:00 Leonel Câmara leonelcam...@gmail.com: I'm guessing he's referring to this: http://www.semantic-ui.com/introduction/new.html -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] new (actually old) feature in trunk: /welcome/appadmin/manage/auth

2015-06-29 Thread Michele Comitini
+1 very handy! 2015-06-29 9:20 GMT+02:00 Massimo Di Pierro massimo.dipie...@gmail.com: No. @Anthony, can I ask you to send me a paragraph and I will include it in the book? On Sunday, 28 June 2015 17:49:01 UTC-5, Vinicius Assef wrote: Is it documented anywhere? On 28 Jun 2015, at 19:13,

Re: [web2py] Re: What if Massimo got hit by a Bus?

2015-06-26 Thread Michele Comitini
You go too fast @Massimo! :D 2015-06-26 14:10 GMT+02:00 Iuri Guilherme dos Santos Martins aindatenhoco...@gmail.com: According to the original topic, in this case this OP would wish you hit the bike more often... iuri.neocities.org 2015-06-26 9:08 GMT-03:00 Massimo Di Pierro

Re: [web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-23 Thread Michele Comitini
you can try building the query with DAL like the following: sql = db(db.t1)._select(orderby=[db.t1.f1]) db.executesql(sql + ' NULLS FIRST') 2015-06-22 10:43 GMT+02:00 pysab pysabw...@gmail.com: ok, thanks. Raw SQL is my friend then ;) On Wednesday, 17 June 2015 09:18:38 UTC+2, Niphlod

Re: [web2py] We have released Censusgical,Census data visualization prototype for Myanmar.

2015-06-23 Thread Michele Comitini
+1 2015-06-23 13:48 GMT+02:00 Phyo Arkar phyo.arkarl...@gmail.com: We have plan to release it opensource soon. On Tue, Jun 23, 2015 at 5:56 PM, Kiran Subbaraman subbaraman.ki...@gmail.com wrote: Very nice stuff. Thanks for sharing. Do you have the code available on github, or any other

Re: [web2py] Re: language detecting

2015-06-17 Thread Michele Comitini
I suggest never block anyone. It's better to use honeytraps/sandboxes. Use a geoip library (http://pythonhosted.org/python-geoip/ or similar) if ipfrom == 'ru': redirect(... nice static page ...) If you use nginx you can do that almost out of the box with many other options such as

Re: [web2py] Auth Roles

2015-06-15 Thread Michele Comitini
I think what you need is in the book: http://web2py.com/books/default/chapter/29/09/access-control#Authorization 2015-06-14 23:48 GMT+02:00 dt0...@gmail.com: Hi, Excellent product web2py but still trying to get my head around some of the structure and some burning questions from the

Re: [web2py] Re: OFF Topic -RiotJS

2015-06-12 Thread Michele Comitini
IMHO ractive.js does not depend on jquery... I just created the following and it does not require jQuery: https://github.com/michele-comitini/ractive_chart http://svg.soon.it/ractive-chart/html/example.html 2015-06-12 11:07 GMT+02:00 António Ramos ramstei...@gmail.com: And Components

Re: [web2py] Invalid password reset

2015-06-10 Thread Michele Comitini
Could it be expired? 2015-06-10 10:54 GMT+02:00 Johann Spies johann.sp...@gmail.com: What would cause this error message if a user receives a link from web2py to reset his password and when he clicks on it he gets the error : invalid password reset? Regards Johann -- Because

Re: [web2py] OFF Topic -RiotJS

2015-06-08 Thread Michele Comitini
+1 riot v2.x is very nice. I think ractive.js has some performance advantage and some more features, but riot will get those soon. 2015-06-08 12:02 GMT+02:00 António Ramos ramstei...@gmail.com: just to share some noise on the UI for those looking at angular reactjs polymer ractive and so on

Re: [web2py] return locals()

2015-05-22 Thread Michele Comitini
replace return locals() with return dict(var1=var1, var2=var2...) where var[1,2] are the variables you use in the view 2015-05-22 19:11 GMT+02:00 Annet anneve...@googlemail.com: I have functions that return locals(), I wonder whether it is possible to limit the variables returned to those

Re: [web2py] Re: Recommended strategy for passing complex query parameters to a REST API

2015-05-22 Thread Michele Comitini
In REST you can use any data encoding. I suppose Kevin referst to OData ( https://en.wikipedia.org/wiki/Open_Data_Protocol#A_sample_OData_JSON_data_payload) and needs to use GET and not POST, since that is a query not an insertion (PUT) or a modification (POST). I do not know if OData is apt to

[web2py] PostgreSQL on Pythonanywhere

2015-05-21 Thread Michele Comitini
Finally! http://blog.pythonanywhere.com/103/ Not free, but fully managed mic -- 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

Re: [web2py] Re: web2pyslices down

2015-05-11 Thread Michele Comitini
why not using slices.web2py.com? same 2nd level domain as web2py and less problems for maintenance... 2015-05-10 22:23 GMT+02:00 Alan Etkin spame...@gmail.com: Web2pysplices.com is on sale Cool! And what about web2pyslices.com, is it on sale also? -- Resources: - http://web2py.com -

Re: [web2py] Re: Singletons Save Memory and Time

2015-05-06 Thread Michele Comitini
if instantiating the object takes time Joe's approach is absolutely correct IMHO. One must avoid caching per-thread or per-process data in the singleton unless explicitly managed with proper locking/message passing. So to speed up more one can use cache.ram or cache.disk or memcache or redis

Re: [web2py] Re: Brainstorming

2015-05-06 Thread Michele Comitini
IMHO ReactJS is no newer than Ractive.js. It's being backed by facebook since a while ago. I like the author's philosophy (read independence ) and design simplicity of Ractive.js, things that I appreciate even more in web2py, but that's a matter of personal taste :-) 2015-05-06 17:23 GMT+02:00

Re: [web2py] deploment on an obsolete Debian 5 server

2015-05-06 Thread Michele Comitini
Alan, if you need to update the interpreter you can look at backports: http://backports.debian.org/ 2015-05-06 19:06 GMT+02:00 Alan Etkin spame...@gmail.com: I was testing the last stable source code installation of the framework on a debian lenny don't know what else 5.0 server, but if you

Re: [web2py] Re: Is it possible to create a webservice funcion for login (instead of basic authentication)?

2015-05-06 Thread Michele Comitini
if you do not want to use basic auth, a common pattern is having a service that generates a temporary token and then having the client pass the token with each call. @service.xmlrpc def get_auth_token(user, password): ... return token @service.xmlrpc def aservicemethod(token, ...):

Re: [web2py] unicode error with postgre on 2.10.3 (with sample app)

2015-04-28 Thread Michele Comitini
One more check... is the encoding of the database UTF-8? you can check with psql -l 2015-04-27 19:01 GMT+02:00 bodobam...@gmail.com: which postgresql Version? PSQL 9.3.6 @ Ubuntu 14.04.2 LTS In the meantime, I played around with pgadmin a little bit: 1) Using pgadmin I can create

Re: [web2py] Re: Need support for web2py application with over 1 million users.

2015-04-24 Thread Michele Comitini
There is no general advice... Think you were a doctor receiving a call from an unknown person: I feel bad, can you help me? What would you reply based on that information? Take some vitamins ?? 2015-04-23 19:26 GMT+02:00 Paolo Valleri paolo.vall...@gmail.com: Mind that if you store session in

Re: [web2py] Re: question about components

2015-04-20 Thread Michele Comitini
Massimo is talking about ractive.js ractive.js != reactive even if adopts the reactive pattern 2015-04-20 5:30 GMT+02:00 Ramkrishan Bhatt ramkrishan.bh...@gmail.com: I am agree with Massimo you must try angular or reactive to make SPA. It will surly solve your problem. -- Resources: -

Re: [web2py] Re: Need support for web2py application with over 1 million users.

2015-04-20 Thread Michele Comitini
Hi Sandeep, To help us try help you, please let us know: 1. database 2. http web server 3. WSGI adapter (eg. uwsgi, fcgi etc..) 4. WSGI execution model (threading, processing) 5. OS OR if you are running in some PaaS, which one. 2015-04-20 5:25 GMT+02:00 Ramkrishan Bhatt

Re: [web2py] Re: Triggering a one-time migration when schema changes

2015-04-08 Thread Michele Comitini
The following is a trick that gives little overhead and make migration happen when needed. python web2py.py -S your_app -M -R script.py -A --do-migrate script.py can be empty or do anything you like... then in db.py import sys if '--do-migrate' in sys.args: do_migrate = True else:

Re: [web2py] Re: Ractive example

2015-03-25 Thread Michele Comitini
@Massimo please launch a name context ASAP else we get stuck with that name!!! ;-) 2015-03-25 5:25 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com: I think for starters trying integrate a different layout and writing instructions about how to do that would help a lot. On Tuesday, 24

Re: [web2py] Re: Page hangs when calling subprocess.check_call from within web2py

2015-03-19 Thread Michele Comitini
what are you using between nginx and web2py? uwsgi? if that's the case check the uwsgi logs for clues mic 2015-03-19 19:12 GMT+01:00 Dave S snidely@gmail.com: On Thursday, March 19, 2015 at 5:17:21 AM UTC-7, Toby wrote: Hi, I'm having issues using subprocess.call from within a module

Re: [web2py] Re: How to implement Gmail Authentication

2015-03-18 Thread Michele Comitini
Why not use OAuth2 with google? It should work with the gmail account 2015-03-18 18:33 GMT+01:00 Moiz Nagpurwala moiz...@gmail.com: I'm clueless here. I thought that this code would allow any user with valid gmail I'd to login in my app. -- Resources: - http://web2py.com -

Re: [web2py] Re: Printing data on web2py view page is different from python shell

2015-03-18 Thread Michele Comitini
From the above code I would expect result == None 2015-03-18 23:31 GMT+01:00 Niphlod niph...@gmail.com: On Wednesday, March 18, 2015 at 11:00:50 PM UTC+1, Gray Kanarek wrote: Could also try BEAUTIFY(), which will accept a list and print it out as a table. but won't preserve newlines,

Re: [web2py] Need help with app configuration -- $

2015-03-17 Thread Michele Comitini
What's the db? 2015-03-17 4:56 GMT+01:00 weheh richard_gor...@verizon.net: I need help performance tuning my app. I have budget. The app is python 2.7.x, web2py latest release, Apache 2.4, mod_wsgi, Windows 7 server. The app on the server is running almost many times slower than on dev

Re: [web2py] Re: PKI Authentication? How to grab users certificates httpd wsgi

2015-03-12 Thread Michele Comitini
the certificates are located on local host and that it needs to verify certificates coming from the clients. How to do it is web server dependent and therefore omitted here. /dps 2015-03-11 14:08 GMT+01:00 Michele Comitini michele@gmail.com: You can read any of the fields a certificate

Re: [web2py] Re: PKI Authentication? How to grab users certificates httpd wsgi

2015-03-12 Thread Michele Comitini
dependent and therefore omitted here. /dps 2015-03-11 14:08 GMT+01:00 Michele Comitini michele@gmail.com: You can read any of the fields a certificate contains eventually. see here for some ideas: https://code.google.com/p/simpatica/ It's a working PKI that allows to generate csr

Re: [web2py] Re: PKI Authentication? How to grab users certificates httpd wsgi

2015-03-11 Thread Michele Comitini
You can read any of the fields a certificate contains eventually. see here for some ideas: https://code.google.com/p/simpatica/ It's a working PKI that allows to generate csr and sign them with a valid signin certificate 2015-03-11 13:48 GMT+01:00 LoveWeb2py atayloru...@gmail.com: Once

Re: [web2py] Re: PKI Authentication? How to grab users certificates httpd wsgi

2015-03-11 Thread Michele Comitini
I am glad someone is using x509 Auth, it is a very simple way to handle user security, One important piece of the puzzle (with apache) is: SSLVerifyClient optional The optional allows one to accept any user on the website, while having some web2py actions require a valid user certificate just

Re: [web2py] Re: PKI Authentication? How to grab users certificates httpd wsgi

2015-03-11 Thread Michele Comitini
If you do not have the email you can use the registration_id and username fields. Most details are on the book: http://web2py.com/books/default/chapter/29/09/access-control 2015-03-11 14:08 GMT+01:00 Michele Comitini michele.comit...@gmail.com: You can read any of the fields a certificate

Re: [web2py] Re: two (or more) applications using the same database

2015-03-06 Thread Michele Comitini
You can have zipdb = DAL('connection to the zip database') in both of your apps (let's call them app1 and app2) and identical table definitions for zipdb. Then you can have db = DAL('connection to app1 db') in app1 models and db = DAL('connection to app2 db') in app2. Just remember to pay

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

2015-03-03 Thread Michele Comitini
You can use rname or entity quoting to support all of the names your chosen db engines support. Those are documented in the book. 2015-03-02 19:46 GMT+01:00 Tom Stratton t.strat...@bitesizetv.com: Follow up to this (and a big Thank You for saving me a lot of digging!) I had field names with

Re: [web2py] Re: Get a Web2py cloud instance in less than 30 seconds

2015-03-03 Thread Michele Comitini
The snapshot is here: https://www.terminal.com/tiny/TCE3FlJ4vE 2015-03-04 0:08 GMT+01:00 mcm michele.comit...@gmail.com: +1 thank you terminal.com! Il giorno lunedì 2 marzo 2015 22:14:51 UTC+1, Massimo Di Pierro ha scritto: from Enrique @ terminal.com: We were playing a little bit with

Re: [web2py] future of markmin

2015-03-02 Thread Michele Comitini
IMHO it would be nice to have markmin interpreter running anywhere, and better have a single source, not a port to different languages. But I understand it would be hard to do. 2015-03-02 7:24 GMT+01:00 Massimo Di Pierro massimo.dipie...@gmail.com: I believe the future of Markmin is

Re: [web2py][Javascript] Massimo here searching for some javascript devs ready to port web2py in JS

2015-03-02 Thread Michele Comitini
+1 let's steal it ASAP! 2015-03-02 17:26 GMT+01:00 António Ramos ramstei...@gmail.com: coming next April.. rapyd2py 2015-03-01 17:14 GMT+00:00 Massimo Di Pierro massimo.dipie...@gmail.com: What can I say. What was a good April's fool in 2014 may actually be a good idea on 2015. ;-)

Re: [web2py] Re: Scheduler exception when setting immediate=True: 'Deadlock found when trying to get lock...'

2015-02-27 Thread Michele Comitini
Try too see if in production there is a transaction that stays open for a long time. It could be a console left open somewhere? 2015-02-27 8:42 GMT+01:00 Osman Masood oamas...@gmail.com: Right. The purpose of using the console was to simulate what actually happens in production. On Thu, Feb

Re: [Bulk] [web2py] Re: Use DAL as standalone

2015-02-27 Thread Michele Comitini
Repeating myself If you need DAL as a standalone package use pydal: https://github.com/web2py/pydal 2015-02-26 12:19 GMT+01:00 'Diogene Laerce' via web2py-users web2py@googlegroups.com: On 02/21/2015 12:56 AM, Cássio Botaro wrote: Do you clone the repository or use stable version?

Re: [web2py] Reset Password Not Working in Production

2015-02-25 Thread Michele Comitini
303 is not an HTTP error but a redirection. Is the token in the reset link valid? Is the reset link correctly pointing to the reset password URL? 2015-02-25 17:19 GMT+01:00 Neil Oswald neilbentu...@gmail.com: Hi, Good day! After clicking the reset_password link I received from email, I

Re: [web2py] web2py framework as iOS app backend

2015-02-25 Thread Michele Comitini
I have used jsonrpc2 with good success as protocol between web2py and iOS apps. Straightforward: no need to think about encoding over the wire. 2015-02-25 17:45 GMT+01:00 Marin Pranjić marin.pran...@gmail.com: I have apps that run as android/ios backend services. It's REST, there's nothing

Re: [web2py] Re: Request vars - basic question

2015-02-20 Thread Michele Comitini
Clara I'd suggest to use the full json service support of web2py, makes everything easier do the following: make sure you have the call() method you can find in default.py controller of welcome application then write a method like this in default.py: def dothetest(): return dict()

  1   2   3   4   5   6   7   8   9   10   >