[web2py] Re: Demistifying web2py

2013-08-05 Thread Relsi Hur Maron
web2py is* just* for learning? why? Em segunda-feira, 5 de agosto de 2013 16h58min05s UTC-3, Alan Etkin escreveu: > > I've proposed a talk At PyConAr (Argentina) about all the criticism web2py > has had from a technical standpoint. Particularly, I'll try to demonstrate > that it is not quite

Re: [web2py] Re: Demistifying web2py

2013-08-05 Thread Jason (spot) Brower
For a tool only for learning, I sure make a lot of money from it. I have many sites that run web2py and ALL clients that work with us are with web2py, and a few others in bottle and django. Magic, funny, I like magic. Good luck with the talk and I hope to do well! BR, Jason On Tue, Aug 6, 2013 a

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
A big "Thanks" to all! Let me tell the end of the story: (1) I could not start the nginx-version. Maybe there is a problem with the script? At the moment I have not enough time to test the script with a new (virtual) machine. (2) I cannot understand, why the error ticket reports Python *Python 2.

Re: [web2py] Re: How to set Session Variable in Models

2013-08-05 Thread Jake Angulo
On Tue, Aug 6, 2013 at 1:55 PM, Anthony wrote: > session.emailvariable = request.vars.email > > Because the above is in a model file, it runs on every request. After the > form has been submitted, on subsequent requests, the value of > request.vars.email will be None, so you are simply overwritin

[web2py] How to find and change registration process

2013-08-05 Thread Alex Glaros
I'd like to add some tables for user to populate when they first register. I can't find where the already-existing standard registration function is so I can add the extra tables. What's the best way to go about changing registration so that when users click on the registration dropdown menu i

Re: [web2py] Adjusting the width of the textarea

2013-08-05 Thread Anthony
This has now been changed: https://code.google.com/p/web2py/source/detail?r=fb06ea622be62acbcd9218457d3b3863b93787d7. Custom CSS and JS files are now included *after* the standard scaffolding files, so you can easily override default CSS rules. Anthony On Saturday, August 3, 2013 4:51:01 AM U

[web2py] Re: How to set Session Variable in Models

2013-08-05 Thread Anthony
session.emailvariable = request.vars.email Because the above is in a model file, it runs on every request. After the form has been submitted, on subsequent requests, the value of request.vars.email will be None, so you are simply overwriting the value originally stored in the session. Instead,

[web2py] Re: Nice change to admin interface for editing files, what about static files?

2013-08-05 Thread dhmorgan
"me too" (the first time I actually want to click on the silly little link, and it's not there (I guess because the original post was marked as 'complete')) On Monday, August 5, 2013 5:48:45 PM UTC-5, LightDot wrote: > > I think missing static files on the left menu will be perceived like an >

[web2py] How to set Session Variable in Models

2013-08-05 Thread Jake Angulo
Im trying to set the following session variable in models file: "session.emailvariable" And later retrieve it in a view as: Session.emailvariable = {{=session.emailvariable}} . This is my models (db.py): db.define_table( auth.settings.table_user_name, Fie

[web2py] Re: URL filter chain

2013-08-05 Thread Marcio Andrey Oliveira
Thank you both for replying. It seems wsgi middleware fits better my needs. Regards. Em segunda-feira, 5 de agosto de 2013 23h15min59s UTC-3, Marcio Andrey Oliveira escreveu: > > Hi. > > In Java there is the concept of URL filter chain (implemented by one or > more servlets). These filters m

Re: [web2py] URL filter chain

2013-08-05 Thread Anthony
There's also the possibility of using wsgi middleware, though depending on what you're doing, it may be easier to just do something in the models as viniciusban suggests. On Monday, August 5, 2013 10:22:27 PM UTC-4, vi

Re: [web2py] URL filter chain

2013-08-05 Thread Vinicius Assef
In web2py you have conditional models. See this here http://web2py.com/books/default/chapter/29/04/the-core#Workflow in "some caveats" sub-section. On Mon, Aug 5, 2013 at 11:15 PM, Marcio Andrey Oliveira wrote: > Hi. > > In Java there is the concept of URL filter chain (implemented by one or more

[web2py] URL filter chain

2013-08-05 Thread Marcio Andrey Oliveira
Hi. In Java there is the concept of URL filter chain (implemented by one or more servlets). These filters may intercept requests to a specif URL or a bunch of them prior the request arrive to the controller(servlet) responsible to handle it. Is there such concept on web2py? How could I implem

Re: [web2py] How to set the auth.user.id as the default value for a field in a SQLFORM

2013-08-05 Thread hunt graham
Worked like a charm thanks! On Monday, August 5, 2013 4:18:45 PM UTC-4, viniciusban wrote: > > You must set writable=False and readable=False in your "user_id" field. > > On Mon, Aug 5, 2013 at 4:20 PM, hunt graham > > > wrote: > > Hello all, > > > > Been using web2py for about a week and lo

[web2py] Re: how can a form have a dynamic number of form fields based on dropdown list selection?

2013-08-05 Thread Derek
Rig up the onchange of the message type dropdown to the load function... On Monday, August 5, 2013 1:00:45 PM UTC-7, Michael Beller wrote: > > I have a requirement to create a message based on the user selecting a > message type. Each message type has a fixed text component and a set of > zero

[web2py] Pagination only using request.vars

2013-08-05 Thread Fabiano Faver
I have to paginate a search page that use a HTML form and request.vars to get the fields and values to search. As its is a dynamic form only two fields are fixed and the rest is dynamic. example: fixed request.vars.tpdoc = 1 request.vars.group = 3 dynamic request.vars.name = 'abc' request.vars.p

[web2py] Re: Nice change to admin interface for editing files, what about static files?

2013-08-05 Thread LightDot
I think missing static files on the left menu will be perceived like an UI/UX oversight. Just to note, I overcome this by: - using a separate browser tab for css and keeping it open all the time - or, opening the css file first and then opening other editor tabs next to it (the only way to get i

[web2py] Re: groupby in sqlform.grid resulted into unsupported query

2013-08-05 Thread villas
IMO anyone who want to have a grid populated by aggregate functions should be rolling their own, but that isn't the issue raised by the OP. Yes, anything which doesn't have a unique record id is probably not going to be editable, on a practical basis. I'm not convinced that SQLFORM.gird sh

[web2py] Re: Upload image and make a thumbnail question.

2013-08-05 Thread Massimo Di Pierro
I now see the problem. The issue is that the filename does not match the pattern. It is uploads*.*thumb*.*08974530*-*d8a6*-*4c6c*-*a9d2*-*ad59e319b953*.*jpg but should be uploads*.*thumb*.*08974530*-*d8a6*-*4c6c*-*a9d2*-*ad59e319b953* ..*jpg This was not enforded before. Please open a ticket

[web2py] Re: Demistifying web2py

2013-08-05 Thread Massimo Di Pierro
:-) On Monday, 5 August 2013 14:58:05 UTC-5, Alan Etkin wrote: > > I've proposed a talk At PyConAr (Argentina) about all the criticism web2py > has had from a technical standpoint. Particularly, I'll try to demonstrate > that it is not quite so that: > > web2py *is not Python* > web2py *is l

Re: [web2py] What is the best way to inform users that maintenance is in progress?

2013-08-05 Thread Jonathan Lundell
On 5 Aug 2013, at 2:32 PM, Dragan Matic wrote: > Let's suppose that I want to disable my web app for a certain period of time > while I am updating the database and that I want to inform users that > maintenance is in progress? > 1. In models I can create a global var MAINTENANCE_IN_PROGRESS =

[web2py] What is the best way to inform users that maintenance is in progress?

2013-08-05 Thread Dragan Matic
Let's suppose that I want to disable my web app for a certain period of time while I am updating the database and that I want to inform users that maintenance is in progress? 1. In models I can create a global var MAINTENANCE_IN_PROGRESS = False which I could thange to True when I want to do so

[web2py] Re: auth.wiki and components error:list index is out of range

2013-08-05 Thread Alan Etkin
> > Great to know that there are others out there to assist. > Good to know it worked. IMO the book is the best reference for those starting but you can always ask for help in case your're stuck. -- --- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py] Re: auth.wiki and components error:list index is out of range

2013-08-05 Thread Philip Lutz
> > Excellent. > This worked like a dream. As this is my first week with Web2Py, I am struggling a little. Great to know that there are others out there to assist. Thanks again, Phil -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. T

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Alan Etkin
To check for errors look for /var/*log*/*uwsgi*.*log* /var/*log*/*nginx*/ I have solved a similar problem with centos by giving the users running nginx and uwsgi access rights to the web2py folder and its subfolders > -- --- You received this message because you are subscribed to the Googl

[web2py] LDAP with username=True can still login with email

2013-08-05 Thread Richard
Hello, Is there a way to prevent user to log with there email? I set LDAP authentication, I create a username field on custom auth_user model and set auth.define_tables(username=True) But I notice that I can still login with my_em...@dom.com. In this case, ldap_auth create a new user with firs

[web2py] Re: auth.wiki and components error:list index is out of range

2013-08-05 Thread Alan Etkin
> @{component:LOAD('default','post.load',args=['merlin'],target='spec',ajax=True)} I belive that line should be @{component:default/post.load/merlin} Alternatively you could use @{component:URL('default','post.load',args=['merlin'])} -- --- You received this message because you are subscri

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Jonathan Lundell
On 5 Aug 2013, at 1:16 PM, Martin Weissenboeck wrote: > Sorry, this is the result: Odd. OK, never mind. > > Error > > The server encountered an internal error or misconfiguration and was unable > to complete your request. > > Please contact the server administrator, [no address given] and in

[web2py] auth.wiki and components error:list index is out of range

2013-08-05 Thread Philip Lutz
I have walked through the component example in the book, and am now attemmpting to get this to work on a wiki page. The first setup works *In default.py *[code] def index(): #return auth.wiki() return dict() def post(): findname = request.args[0] return dict(specs=db(db.specs.nam

Re: [web2py] How to set the auth.user.id as the default value for a field in a SQLFORM

2013-08-05 Thread Vinicius Assef
You must set writable=False and readable=False in your "user_id" field. On Mon, Aug 5, 2013 at 4:20 PM, hunt graham wrote: > Hello all, > > Been using web2py for about a week and loving it so far. In particular the > built in access control is great coming from Flask. > > I'm having some issues

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
Last message is the result of patching dal.py 2013/8/5 Martin Weissenboeck > Sorry, this is the result: > > Error > > The server encountered an internal error or misconfiguration and was > unable to complete your request. > > Please contact the server administrator, [no address given] and infor

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
Sorry, this is the result: Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Alan Etkin
> 502 Bad Gateway Also check that the user who runs the script and/or nginx has read write and execute access to the web2py files -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails fr

Re: [web2py][LDAP] once authenticated with LDAP I got "No fields to update"

2013-08-05 Thread Richard Vézina
The only remaining issue I see, is that ldap_auth always update last_name and it seems to not retrieve the last_name in AD so it set empty last_name... :( Richard On Mon, Aug 5, 2013 at 4:10 PM, Richard Vézina wrote: > Finally found the issue!! > > Since I had custom auth and I did that long t

Re: [web2py][LDAP] once authenticated with LDAP I got "No fields to update"

2013-08-05 Thread Richard Vézina
Finally found the issue!! Since I had custom auth and I did that long time ago, "registration_id" were missing. I think this field have been added since that time. :) Richard On Mon, Aug 5, 2013 at 11:00 AM, Richard Vézina wrote: > DAL line : 9989 > if not fields: > raise SyntaxE

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Richard Vézina
try start uwsgi-emperor Maybe check uwsgi is properly install... I had issue in the pass the script skip install uwsgi... But first just try to start the service... uwsgi is installed in emperor mode so the service is not start and stop as usual with ubuntu. Richartd On Mon, Aug 5, 2013 at 4:0

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
Now I have tried to install nginx, using the script setup-web2py-nginx-uwsgi-ubuntu.sh The installations runs to the end. And now I get: 502 Bad Gateway * * -- *nginx/1.2.6 (Ubuntu)* 2013/8/5 Niphlod > there are 2, one "historic" that install > apache+postgresql+we

[web2py] how can a form have a dynamic number of form fields based on dropdown list selection?

2013-08-05 Thread Michael Beller
I have a requirement to create a message based on the user selecting a message type. Each message type has a fixed text component and a set of zero, one, or more variable components. Ideally, I'd like the user to select the message type from a list and have the form dynamically display zero, o

[web2py] Demistifying web2py

2013-08-05 Thread Alan Etkin
I've proposed a talk At PyConAr (Argentina) about all the criticism web2py has had from a technical standpoint. Particularly, I'll try to demonstrate that it is not quite so that: web2py *is not Python* web2py *is less performant* web2py *has too much magic* web2py *is just for learning*

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Jonathan Lundell
On 5 Aug 2013, at 12:09 PM, Martin Weissenboeck wrote: > Yes. This is the error ticket: > Version > > web2py™ Version 2.5.1-stable+timestamp.2013.06.06.15.39.19 > PythonPython 2.7.4: /usr/local/bin/python (prefix: /usr/local) > I think I might see the problem. Can you try hacking

[web2py] How to set the auth.user.id as the default value for a field in a SQLFORM

2013-08-05 Thread hunt graham
Hello all, Been using web2py for about a week and loving it so far. In particular the built in access control is great coming from Flask. I'm having some issues referencing auth_user from other db fields though. In the following view (company.html) I have a SQLFORM for the 'company' table.

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Niphlod
there are 2, one "historic" that install apache+postgresql+web2py+postfix+mercurial that has not been updated in a lot (setup-web2py-ubuntu.sh), and one "modern" (ubuntu >= 12.04 is required) that installs nginx+uwsgi -- --- You received this message because you are subscribed to the Google

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Jonathan Lundell
On 5 Aug 2013, at 11:57 AM, Alan Etkin wrote: > > FWIW, it's wsgi, not Apache, that cares about Python. > > Also, according to the Python docs, sqlite3 was built in beginning with 2.5, > so it's still an odd problem. > > web2py reports Python 2.7 when running under Apache? > > Perhaps it is po

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
Yes. This is the error ticket: Version web2py™ Version 2.5.1-stable+timestamp.2013.06.06.15.39.19 Python *Python 2.7.4: /usr/local/bin/python (prefix: /usr/local)* 2013/8/5 Jonathan Lundell > On 5 Aug 2013, at 11:42 AM, Martin Weissenboeck > wrote: > > Interesting. But web2py reports Python

[web2py] Re: Nice change to admin interface for editing files, what about static files?

2013-08-05 Thread Niphlod
Because potentially you can have zillions of files in static. Seems that someone plays heavy with the contents of the static folder, and it would be counter-productive to have the full list on the left-bar. Also, generally you edit static files 1% of the times you edit instead models, controller

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Alan Etkin
> FWIW, it's wsgi, not Apache, that cares about Python. > > > Also, according to the Python docs, sqlite3 was built in beginning with > 2.5, so it's still an odd problem. > > web2py reports Python 2.7 when running under Apache? > Perhaps it is possible to force the python interpreter by adding ma

[web2py] Nice change to admin interface for editing files, what about static files?

2013-08-05 Thread Rob_McC
I just updated to 2.5.1, and really liked the admin interface for editing files. (list of files are displayed on left side of screen- see attached file), I find that MUCH faster to switch between files. Very, very nice ! thanks. __ *Question*: Why don't my static files (like .css) sho

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Jonathan Lundell
On 5 Aug 2013, at 11:42 AM, Martin Weissenboeck wrote: > Interesting. But web2py reports Python version 2.7.4 and not 2.5. > If I start web2py without Apache, it works without problems. So: where is the > Python interpreter which is used by Apache? FWIW, it's wsgi, not Apache, that cares about

Re: [web2py] Re: no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
Interesting. But web2py reports Python version 2.7.4 and not 2.5. If I start web2py without Apache, it works without problems. So: where is the Python interpreter which is used by Apache? 2013/8/5 Alan Etkin > Is it possible apache is using a different python version (one has sqlite >> and one

Re: [web2py] Re: no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
You are right, there are two different Python versions, but both are in /usr/local/bin: The error ticket contains these lines: Version web2py™ Version 2.5.1-stable+timestamp.2013.06.06.15.39.19 Python *Python 2.7.4: /usr/local/bin/python (prefix: /usr/local)* But calling Python from the command

[web2py] Re: groupby in sqlform.grid resulted into unsupported query

2013-08-05 Thread Niphlod
yep, it's majorly borked. the fact that with sqlite it results in a correct query (but a totally unuseful resultset) shouldn't matter. I'm trying to figure out the best way to handle that in the code, but in my POV any query with a groupby should disable any editing in the grid how do you e

Re: [web2py] Re: no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Alan Etkin
> > Is it possible apache is using a different python version (one has sqlite > and one no)? > The script installs python 2.5 with apt-get, but I suppose it should ship sqlite also. I guess you could try commenting the installation of python in the script to use the current interpreter. > --

Re: [web2py] Re: no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Massimo Di Pierro
Is it possible apache is using a different python version (one has sqlite and one no)? On Monday, 5 August 2013 11:33:36 UTC-5, mweissen wrote: > > ok. but the interactive console was only for testing. > why does "welcome" not work? it's a new, clean installation. > i am working since some hours,

Re: [web2py] Re: Deploying on Open Shift Error

2013-08-05 Thread Naveena Elsa Benjamin
I am using python 2.7 version. Is there anything I can do to fix this issue of distutils not installed error? Mine is windows 8 64 bit Thanks, On Sun, Aug 4, 2013 at 8:58 AM, dhmorgan wrote: > so are you now running web2py from source, using Python 2.6 or 2.7 ? > > > > On Sunday, August 4, 2

Re: [web2py] Re: no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Richard Vézina
My guess is that the script haven't been review for a wild and there is package (python package) missing... Maybe packages avec change name or something so the script can't install them... The error you have says you miss adapter for sqlite... You can search the dal with "no driver available" you

Re: [web2py] Re: no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
ok. but the interactive console was only for testing. why does "welcome" not work? it's a new, clean installation. i am working since some hours, but i did not find an answer. 2013/8/5 Massimo Di Pierro > db.commit() > > > On Monday, 5 August 2013 10:39:50 UTC-5, mweissen wrote: >> >> I have ma

Re: [web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Richard Vézina
Here what DAL try to import from pysqlite2 import dbapi2 as sqlite2 from sqlite3 import dbapi2 as sqlite3 On Mon, Aug 5, 2013 at 11:39 AM, Martin Weissenboeck wrote: > I have made a new web2py installation on Ubuntu, using the script > setup-web2py-ubuntu.sh > web2py can be opened and admin sho

[web2py] Re: no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Massimo Di Pierro
db.commit() On Monday, 5 August 2013 10:39:50 UTC-5, mweissen wrote: > > I have made a new web2py installation on Ubuntu, using the script > setup-web2py-ubuntu.sh > web2py can be opened and admin shows: > Version > > 2.5.1-stable+timestamp.2013.06.06.15.39.19 > (L?uft auf Apache/2.2.22 (Ubuntu)

[web2py] no driver available ('sqlite2', 'sqlite3')

2013-08-05 Thread Martin Weissenboeck
I have made a new web2py installation on Ubuntu, using the script setup-web2py-ubuntu.sh web2py can be opened and admin shows: Version 2.5.1-stable+timestamp.2013.06.06.15.39.19 (L?uft auf Apache/2.2.22 (Ubuntu)) When I try to open the "Welcome" application I get: Error ticket for "welcome" Ticke

[web2py] Re: How to limit record readability to only auth_user creator?

2013-08-05 Thread Alex Glaros
Thanks Anthony and Kostas. Your solutions worked perfectly. Alex On Monday, August 5, 2013 6:42:49 AM UTC-7, Anthony wrote: > > partyID = >> db.auth_user.insert(**db.auth_user._filter_fields(form.vars)) >> > > Are you saying you want to redundantly store the user's auth_user.idvalue in

Re: [web2py][LDAP] once authenticated with LDAP I got "No fields to update"

2013-08-05 Thread Richard Vézina
DAL line : 9989 if not fields: raise SyntaxError("No fields to update") How can I fall on this error from login page? Richard On Fri, Aug 2, 2013 at 10:12 AM, Richard Vézina wrote: > Response : > INFO:web2py.auth.ldap_auth:[serverName] Initialize ldap connection > > So, I guess I

[web2py] Re: Upload image and make a thumbnail question.

2013-08-05 Thread Massimo Di Pierro
Which version did it work with? Can you send me the error ticket? On Sunday, 4 August 2013 18:13:02 UTC-5, Michael Gheith wrote: > > Hello web2py community! > > I used to be able to use the following web2py slice successfully in the > past (about a year ago): > > http://www.web2pyslices.com/slice

[web2py] Re: How to limit record readability to only auth_user creator?

2013-08-05 Thread Anthony
> > partyID = > db.auth_user.insert(**db.auth_user._filter_fields(form.vars)) > Are you saying you want to redundantly store the user's auth_user.id value in the auth_user.created_by field of the user's own record? If so, I suppose you could just do an update right after the insert. Af

[web2py] Re: [ANN] NotaLogger: Notarization Code Generator and Logging Service

2013-08-05 Thread Maurice Ling
Added XMLRPC and JSONRPC functions to NotaLogger. Example: >>> from xmlrpclib import ServerProxy >>> s = ServerProxy('http://ml-lab.bioinformatics.org/init/plugin_notalogger/call/xmlrpc') >>> notarizecode = s.new_notarization('xmlrpc test', 'xmlrpc test', 'xmlrpc test', 'xmlrpc test', 'xmlrpc te

Re: [web2py] Upload image and make a thumbnail question.

2013-08-05 Thread Richard Vézina
Consider using this slice instead : http://www.web2pyslices.com/slice/show/1666/improved-smarthumb I can help you trouble shoot and integrate in your app... I am the one who refactor smartthumb and set a threshold to make sure it generate proper resized with good quality thumbnails... :) Richa

[web2py] Re: How to limit record readability to only auth_user creator?

2013-08-05 Thread Alex Glaros
I need to ask one more thing before it works. when an auth_user first registers, the "created_by" field is empty in the auth_user table. But I want to let user go back and change their email or name or something, so I need "created_by" field to contain auth_user.id in it. Otherwise, it doe

[web2py] Re: Autocomplete Widget "changed" after upgrade

2013-08-05 Thread Wilson George
On Thursday, November 17, 2011 2:37:04 AM UTC+5:30, Martin wrote: > > Hi, > > I upgraded web2py to latest version. everything works fine exept the > autocomplete widget > > I use MySQL as my database. > > The autocomplete is reading from a db VIEW. The reason for this is > that I have 2 columns i

[web2py] Re: IS web2py good for largescale

2013-08-05 Thread Massimo Di Pierro
I should add that one can always do cache.ram('whetever',lambda: cache.ram.clear(), 5*60) to clear all cache every 5 minutes. Clear also takes a regex and can be used for partial cache clear. cache.ram('whetever',lambda: cache.ram.clear(regex), 5*60) cache.ram cannot clear cache automa

[web2py] Re: Simplest form of internal messaging

2013-08-05 Thread Massimo Di Pierro
It should be http://.../post_message/1 to post a message for user #1. On Monday, 5 August 2013 03:29:53 UTC-5, Alex Glaros wrote: > > Massimo, > > I receive a 404 NOT FOUND error from the post_message function. > > The messages_for_me controller works, but there's no way to reply. > > I chang

[web2py] Re: How to limit record readability to only auth_user creator?

2013-08-05 Thread Alex Glaros
You're right Kostas, that was a great catch created_by field was empty thanks! Alex On Monday, August 5, 2013 1:50:08 AM UTC-7, Kostas M wrote: > > This grid indicates that db.auth_user has a 'created_by' column. Is this > your case? > Anyway, trying your code at a different table having a 'cr

[web2py] Re: groupby in sqlform.grid resulted into unsupported query

2013-08-05 Thread villas
This wasn't a 'real life' example, I was just trying to demonstrate that some of the SQL doesn't seem to be valid. It doesn't work if you specify the field either: fields=[db.auth_user.first_name] The question is this: should it be possible to make such a SQLFORM.grid? If so, how? On Mon

Re: [web2py] Re: IS web2py good for largescale

2013-08-05 Thread Michele Comitini
Back to scalability doubts. My experience in 3 points: 1. use a multiprocess, event server. Rocket is great for prototyping, bad for concurrency. 2. never make assumptions on where the slow part is. Profile everything. 3. make indexes by hand on sql tables if needed. For instance I was hit by au

[web2py] Re: groupby in sqlform.grid resulted into unsupported query

2013-08-05 Thread Niphlod
@all: you can't have a grid displaying all the fields of the auth_user table if you're grouping by first_name On Sunday, August 4, 2013 11:38:42 PM UTC+2, Massimo Di Pierro wrote: > > Which web2py version. This may be fixed in trunk. I see that ORDERBY is > missing. I think that is the probl

[web2py] Re: How to limit record readability to only auth_user creator?

2013-08-05 Thread Kostas M
This grid indicates that db.auth_user has a 'created_by' column. Is this your case? Anyway, trying your code at a different table having a 'created_by' column worked fine to me (buttons Edit and Delete are there). On Sunday, August 4, 2013 5:17:40 AM UTC+1, Alex Glaros wrote: > > This looks li

[web2py] Re: Simplest form of internal messaging

2013-08-05 Thread Alex Glaros
Massimo, I receive a 404 NOT FOUND error from the post_message function. The messages_for_me controller works, but there's no way to reply. I changed the code a little. "message" is a NoSQL reserved word, and I assumed that you meant "reference auth_user" on the "for_user" field in the DB.

[web2py] Re: Simplest form of internal messaging

2013-08-05 Thread Massimo Di Pierro
Here is something very basic: db.define_table('message', Field('for_user','reference_user'), Field('body'), auth.signature) @auth.requires_login() def post_message(): user_id = request.args(0,cast=int) db.message.for_user.default = user_id db.message.for_user.readable = db

[web2py] Re: deployment to google app engine did not include my static files

2013-08-05 Thread Massimo Di Pierro
I remember people had complained that threadsafe==True resulted in corrupted current thread_local. I am very surprised by this and I do not see that could happen unless threadlocal is broken on GAE. If you can shed some light it would be great. On Sunday, 4 August 2013 18:59:54 UTC-5, Christian