Re: [web2py] Validating row

2012-04-23 Thread Joseph Piron
Actually, I was looking at custom validator but didn't think about request.vars. Excellent suggestion, it works perfectly :) For inI do not need server generated forms as I use extjs as client frontend. Thanks again !!! On 22 Apr 2012, at 18:42, Anthony wrote: > There are no full row validators.

Re: [web2py] Content-type header for HTTP exception incorrectly set ?

2012-04-23 Thread Joseph Piron
Could someone give me a link pointer ? :) Thanks. On 16 Apr 2012, at 16:19, Jonathan Lundell wrote: > On Apr 16, 2012, at 7:02 AM, Massimo Di Pierro wrote: >> Shame on me. Than it is a bug. Please open a ticket on google code. web2py >> sets the content-type correctly in gluon/main.html but it

[web2py] Add count in db.parse_as_rest output

2012-04-23 Thread Joseph.Piron
Hi guys! I am using the wonderful db.parse_as_rest function in my development and like to ask if it is possible to push a modification in the trunk as as to be able to go on without custom code maintenance :) For paging purposes, I would need the output of this function to contain the total nu

[web2py] Re: trouble with background queue

2012-04-23 Thread Niphlod
aside from deleting the record using del (I'm thinking that that line is not working), did you try simply printing the records , i.e : print db().select(db.input_queue.ALL) without doing anything ? It's pretty strange that for a db uri with sqlite that is working and for a db uri with postgres

Re: [web2py] Re: post attack

2012-04-23 Thread Niphlod
Uhm, I lost a step here .. not to be picky, but I need to understand. usually if you are running behind apache or nginx those directives should discard the request "before" passing it to uwsgi, right ? It's good to set a limit also on uwsgi (one never knows what is coming), but if it's

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-23 Thread Niphlod
unfortunately counting on postgres is a heavy operation, and it's pretty "famous" for this http://wiki.postgresql.org/wiki/Slow_Counting. maybe you can try limiting the amount to, let's say, 2 (if it's possible as per requirements of your app) and see if there are differences. In the

[web2py] Re: scheduler "advanced" question

2012-04-23 Thread Niphlod
sorry to bump, but, really, anyone ? :D

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-23 Thread Martín Mulone
perhaps we can make some lambda to count, but make sure that is the count() thing, run some benchmark. 2012/4/23 Niphlod > unfortunately counting on postgres is a heavy operation, and it's pretty > "famous" for this http://wiki.postgresql.org/wiki/Slow_Counting. > maybe you can try limit

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Sun, 22 Apr 2012 15:58:01 -0700 (PDT) Massimo Di Pierro wrote: > It brings the wordpress way of editing pages to the extreme. It > allows you to edit the entire page in place. Any page. There are > buttons to insert links, images, bold, italic, ul, ol, toggle between > wysiwyg and html, save,

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread stefaan
> > > I'm a little surprised at all the negativity toward the new Google Groups > -- I find it a general improvement over the old interface. Now we can do > rich text formatting, code highlighting, and attach files. > > My favourite way to follow the web2py newsgroups currently is by reading

[web2py] Re: CMS question

2012-04-23 Thread Ross Peoples
I don't know about that. I've started installing Concrete5 for people because it's so easy to use and they can create "blocks" of content that they can move around. I think a good CMS should be as dynamic as possible, without being overly complicated. On Monday, April 23, 2012 1:30:12 AM UTC-4,

Re: [web2py] Re: CMS question

2012-04-23 Thread Michele Comitini
I think one of the key point about a good CMS is having a way to mix ready made components with custom layout and presentation. Allow as much reuse as possible with much freedom. There should be a way to apply themes, but their functionality should not go much beyond But above above presentation

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread Anthony
> > * immediate overview about what are the new messages in which threads; > Google Groups does that. > * jump from new message to new message by pressing the space bar... > Once in a topic, just scroll in Google Groups -- only the new messages are expanded, so easy to read only what's ne

Re: [web2py] Re: CMS question

2012-04-23 Thread Massimo Di Pierro
To me the issue is not flexibility vs ease of use. To me the issue is storing layout info (html) or storing a more abstract representation (wiki syntax). In both cases one can embed higher level components. In the former case it is easier for users (wysiwyg) and it can made it work with any the

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread Gour
On Mon, 23 Apr 2012 08:07:13 +0200 Tim Michelsen wrote: > What is wrong with Google groups via Gmane? Probably nothing wrong except that we're growing old and youngsters believe everything should be available via (web) forums. :-) Sincerely, Gour -- As the ignorant perform their duties with

[web2py] compute formula with query

2012-04-23 Thread Manuele Pesenti
This field definition seams to be a problem for postgres but not for sqlite. Can somebody tell me why? Field('connection_name', required=True, compute=lambda row: db.plugin_lookout_connections[row['connection_id']].alias) This is the error I get using postgres: Traceback (most recent call la

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Mon, 23 Apr 2012 06:08:26 -0700 (PDT) Ross Peoples wrote: > I don't know about that. I've started installing Concrete5 for people > because it's so easy to use and they can create "blocks" of content > that they can move around. And having such CMS system with something like web2py under th

Re: [web2py] compute formula with query

2012-04-23 Thread Richard Vézina
Is "row['connection_id']" an id field? Richard On Mon, Apr 23, 2012 at 9:44 AM, Manuele Pesenti wrote: > This field definition seams to be a problem for postgres but not for > sqlite. Can somebody tell me why? > > Field('connection_name', required=True, compute=lambda row: > db.plugin_lookout_co

Re: [web2py] compute formula with query

2012-04-23 Thread Manuele Pesenti
Il 23/04/2012 16:01, Richard Vézina ha scritto: Is "row['connection_id']" an id field? off course... this is the complete model for the table: db.define_table('plugin_lookout_tables', Field('table_name', label=T('Table name'), required=True, ondelete='CASCADE' ), Field('tab

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Mon, 23 Apr 2012 06:39:56 -0700 (PDT) Massimo Di Pierro wrote: > In the letter case it easy to change theme but building themes > requires technical expertise. How much expertise? I believe that it's reasonable to expect to have category of content-editors (end-users), designers and develope

[web2py] Re: CMS question

2012-04-23 Thread Ross Peoples
I guess it comes down to figuring out what kind of CMS we want to build. Do you want a CMS that is easy for web designers (like WordPress), or do you want a CMS that is easy for end users? My feeling is that there are already SO MANY WordPress clones out there that if we are going to build a "k

Re: [web2py] compute formula with query

2012-04-23 Thread Richard Vézina
What happen if you remove required=True, maybe you have some miss match and lambda return None sometimes?? Or you may try that first... This result into a table : row['connection_id'] It should be row['connection_id'].id... Richard On Mon, Apr 23, 2012 at 10:11 AM, Manuele Pesenti wrote: > I

Re: [web2py] compute formula with query

2012-04-23 Thread Richard Vézina
No I wrong... My first guest is what I could see. I mean first sentence Richard On Mon, Apr 23, 2012 at 10:20 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > What happen if you remove required=True, maybe you have some miss match > and lambda return None sometimes?? > > Or you may t

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-23 Thread Bruce Wade
Yeah see that was my original question how to tell grid to only select/count the first 50,000 records instead of it just generating pages for all the records. I single ad in our site has had over 60,000 views. I am planing to move the adviewer to mongodb if I can't resolve this issue. On Mon, Apr

[web2py] Re: trouble with background queue

2012-04-23 Thread weheh
Yes, in process_input_queue() I tried the first line just print db().select(db.input_queue.ALL). Result is nothing except the table headers. I'm thinking there might be an issue in the server configuration, but why it should affect only standalone console-less web2py sessions and not the primar

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Mon, 23 Apr 2012 07:15:34 -0700 (PDT) Ross Peoples wrote: > My feeling is that there are already SO MANY WordPress clones out > there that if we are going to build a "kickass" CMS, it should be easy > for end users. I agree. > The result of this design was a CMS that allowed users to create

[web2py] ORA-00910 on table creation

2012-04-23 Thread Rakesh Singh
Hi, I am having a lot of trouble implementing on Oracle. When I run my app on SQLite or MySQL, but I am having lots of different errors on Oracle. One problem I have is that when an error is returned, the application hangs. I can view the admin app and browse the error ticket, but the thread that

[web2py] login_onaccept not firing.

2012-04-23 Thread David
I recently updated to latest in trunk. Seems like I have this in controllers.py auth.settings.login_onaccept = lambda f:_get_account(f) but after I login I dont see this firing. Did something change that I missed? Thanks. David.

Re: [web2py] Re: CMS question

2012-04-23 Thread Michele Comitini
Il 23 aprile 2012 15:39, Massimo Di Pierro ha scritto: > To me the issue is not flexibility vs ease of use. > > To me the issue is storing layout info (html) or storing a more abstract > representation (wiki syntax). > > In both cases one can embed higher level components. In the former case it >

Re: [web2py] ORA-00910 on table creation

2012-04-23 Thread Richard Vézina
It should not be the problem, but to make sure you set not null at the backend level you need : notnull=True if I remember. Richar On Mon, Apr 23, 2012 at 10:40 AM, Rakesh Singh wrote: > Hi, > > I am having a lot of trouble implementing on Oracle. > When I run my app on SQLite or MySQL, but I am

Re: [web2py] ORA-00910 on table creation

2012-04-23 Thread Richard Vézina
Also, since you have a lot of column, you may start with fewer column and identify the exact column that trigger the error. I will be easier to help you with simpler model, you then can generalize after we had found the problem. Richard On Mon, Apr 23, 2012 at 11:10 AM, Richard Vézina < ml.richa

[web2py] Re: login_onaccept not firing.

2012-04-23 Thread Anthony
Looks OK. Maybe show some code. On Monday, April 23, 2012 10:58:29 AM UTC-4, David J wrote: > > I recently updated to latest in trunk. > > Seems like > I have this in controllers.py > > auth.settings.login_onaccept = lambda f:_get_account(f) > > but after I login I dont see this firing. > > Did so

[web2py] Re: trouble with background queue

2012-04-23 Thread pbreit
I never had much luck running scripts from the command line (or with crontab) and ended up putting the code in a regular controller (password-protected if necessary).

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Sun, 22 Apr 2012 15:58:01 -0700 (PDT) Massimo Di Pierro wrote: > I think we could build a good CMS by combining 4 pieces: Another question is whether this 'kickass CMS' should be a web2py or web3py-based project? Sincerely, Gour -- The senses, the mind and the intelligence are the sitting

[web2py] Re: CMS question

2012-04-23 Thread Massimo Di Pierro
Here is a just a piece of the puzzle for you to try: http://tests.web2py.com/plasmid/ It may be useful to build web2py layouts or CMS themes. Or it could be useful to edit the pages themselves. Nothing prevents from inserting @{...} tags that embed web2py (plugin_wiki?) components. My serve

[web2py] Re: CMS question

2012-04-23 Thread Massimo Di Pierro
P.S. You have to register else there are copyright issues. This is a complete rewrite of a previous experiment with the same name. On Monday, 23 April 2012 12:46:13 UTC-5, Massimo Di Pierro wrote: > > Here is a just a piece of the puzzle for you to try: > >http://tests.web2py.com/plasmid/ > >

[web2py] Re: how can one replace an element in html?

2012-04-23 Thread Wikus van de Merwe
So you have an HTML code as input and would like to change some tags to some others ones. But why? You should never had the need to build the HTML page from another HTML page in web2py. You should rather simply combine the data and a view. In your example, the view could be this: pages.css

Re: [web2py] Re: Limit SQLFORM.grid results

2012-04-23 Thread Massimo Di Pierro
Bruce, can you try {{=response.toolbar()}} You will be able to see each query performed by the system and how long it took. Count many be the culprit if there is not an index associated to the count query. On Sunday, 22 April 2012 13:35:28 UTC-5, Martin.Mulone wrote: > > Perhaps the slowdown co

[web2py] Re: CMS question

2012-04-23 Thread Ross Peoples
I remember seeing this once before. This is great if you find a theme you like online and want to make a prototype of your site in that theme and this is a very cool tool in general. The question is, do we really want to go in this direction for a CMS? The content is basically imprisoned in har

[web2py] Re: scheduler "advanced" question

2012-04-23 Thread Wikus van de Merwe
You can set the desired logging level in the logging.conf: [logger_scheduler] level=DEBUG handlers=consoleHandler qualname=scheduler propagate=0 If that doesn't help, you could try to play with the -D and -l options of web2py.py, To instantiate the object once, you could implement the class as

[web2py] Re: CMS question

2012-04-23 Thread Massimo Di Pierro
This is not the same as before. Anyway, I am not sure myself this is a good idea but, in principle there is no need to make the entire page editable. The editable part can be restricted to one div in the page (perhaps more than one div eventually). In that case it will be possible to swap themes

[web2py] Re: [video] websockets com web2py e tornado

2012-04-23 Thread cyan
Hi Bruno, Any chance of adding English subtitles to this video? Would be a great resource for everyone! Thanks!

Re: [web2py] Re: CMS question

2012-04-23 Thread Jonathan Lundell
On Apr 23, 2012, at 12:02 PM, Massimo Di Pierro wrote: > This is not the same as before. Anyway, I am not sure myself this is a good > idea but, in principle there is no need to make the entire page editable. The > editable part can be restricted to one div in the page (perhaps more than one > d

[web2py] Re: scheduler "advanced" question

2012-04-23 Thread Niphlod
that pointed me in the right direction, thanks the scheduler actually uses the "root" logger, so no configuration needs to be added [logger_root] level=DEBUG handlers=consoleHandler [handler_consoleHandler] class=StreamHandler level=DEBUG formatter=simpleFormatter args=(sys.stdout,) di

[web2py] Re: trouble with background queue

2012-04-23 Thread Niphlod
I'm currently testing scheduler for this kind of applications, but my "homemade" task queues are working fine mails = db(s.dat_start

[web2py] Re: trouble with background queue

2012-04-23 Thread Niphlod
@weheh try with a super-simple app and see if your error persists there is definitely a configuration error if no results are returned.

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread Derek
Back to the original topic though - Why doesn't web2py do more dogfooding? I know that using code.google.com is good since it's free, but come one, let's show the world that Massimo puts his money where his mouth is... On Saturday, April 21, 2012 9:24:32 AM UTC-7, JoeCodeswell wrote: > > This ne

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-23 Thread Carlos
Hi, I now have more information about my project: web2py server acting as a bridge between two other non-web2py remote servers. I was instructed that the way to access the remote mysql db is via VPN. Do you have any recommendations to establish a web2py db connection: - from: my web2py ubuntu

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread Anthony
> Back to the original topic though - Why doesn't web2py do more dogfooding? > I know that using code.google.com is good since it's free, but come one, > let's show the world that Massimo puts his money where his mouth is... > Currently on the canine menu: http://web2py.com

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-23 Thread Carlos
Btw I forgot to mention that IPsec must be used. On Monday, April 23, 2012 3:32:58 PM UTC-5, Carlos wrote: > > Hi, > > I now have more information about my project: web2py server acting as a > bridge between two other non-web2py remote servers. > > I was instructed that the way to access the rem

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread villas
> > I'd rather see the community spend more time improving (and documenting) > the framework and building a robust CMS than adding dog food just for the > sake of "dogfooding." > > +1 IMO Google groups is already good enough.

Re: [web2py] Re: CMS question

2012-04-23 Thread howesc
what i have seen in the CMS world is all this hoopla about themesin practice once the site is setup for a customer they *rarely* if ever swap to a new theme - they tend to tweak what they have. so based on my experience i'd like to select a base theme, then be able to edit my pages - prob

Re: [web2py] web2py as middle-server between 2 remote servers via web services

2012-04-23 Thread Richard Vézina
I think you want to achieve is something call SOA : http://en.wikipedia.org/wiki/Service-oriented_architecture Richard On Mon, Apr 23, 2012 at 4:43 PM, Carlos wrote: > Btw I forgot to mention that IPsec must be used. > > > On Monday, April 23, 2012 3:32:58 PM UTC-5, Carlos wrote: >> >> Hi, >> >

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread Derek
That issue tracking app is quite broken, having tried it myself. though from what I hear the forum is solid. I don't know why we aren't using pyforum. On Monday, April 23, 2012 1:33:13 PM UTC-7, Anthony wrote: > > > Back to the original topic though - Why doesn't web2py do more dogfooding? >> I

[web2py] Re: trouble with background queue

2012-04-23 Thread nick name
On Sunday, April 22, 2012 10:47:04 PM UTC-4, weheh wrote: > This works fine with sqlite. But postgres and mysql don't work. The > problem is when I launch the queue on postgres or mysql, as per above (with > or without the -N argument), the db().select(...) doesn't see anything in > the db.inpu

[web2py] Re: how can one replace an element in html?

2012-04-23 Thread simon
I want to create a template in Microsoft Word, save it as filtered html, fill it with data using web2py, and then output it as a PDF file. Why? So my secretary can create the template without having to look at that HTML stuff! Unfortunately Microsoft puts some of the pagebreaks in BR tags which

[web2py] Reading web2py tickets on app engine

2012-04-23 Thread David Phillips
I don't know how to read the tickets web2py generates on app engine. On devserver, the tickets are shown in their entirety, but on the production server, the datastore viewer only shows the first 1000 or so characters. I can't figure out a way to see the entire ticket. The database management

[web2py] Re: how can one replace an element in html?

2012-04-23 Thread Anthony
I'm not sure there's an easy way to delete or replace server-side DOM components using the .elements() method of searching (you can do it with index subscripting, but that doesn't help unless you know exactly where the elements are in the DOM). But since this is a fairly constrained problem, ca

[web2py] I wish I could use a virtualfield in IS_IN_DB

2012-04-23 Thread Jose
Hi I have in my model: tb_categorias = db.define_table('categorias', ... ) class Categoria(object): def nombre(self): ... tb_categorias.virtualfields.append(Categoria()) tb_categorias.format = '%(nombre)s' #This does not work tb_obras = db.define_table('obras',

[web2py] Re: I wish I could use a virtualfield in IS_IN_DB

2012-04-23 Thread Anthony
> > tb_categorias.format = '%(nombre)s' #This does not work > > tb_obras.categoria.requires = IS_IN_DB(db, tb_categorias.id, '%(nombre)s') > Both the "format" argument to define_table() and the "label" argument to IS_IN_DB() can be a function that takes a row, so you can just defin

[web2py] Re: Little little Document Management System with flatbed scanners

2012-04-23 Thread IVINH
This resource could not be found? Pls update new link. Vào 02:36:43 UTC+7 Thứ ba, ngày 13 tháng bảy năm 2010, szimszon đã viết: > > v.0.3 - 2010-07-12 -- email notification actions, ocr... > -- if you upgrade from prev. you should del the > ..._scannerconfig.table file fro

[web2py] Re: trouble with background queue

2012-04-23 Thread weheh
Thanks all for the suggestions. I swear I didn't change a thing, but left the queue running overnight. Now, it seems to be working fine. So maybe somebody made a change to the server. Who knows? All I know is it used not to work and now it works and I didn't do anything to fix it. It shall rema

[web2py] why do posts not show?

2012-04-23 Thread Matt Thompson
I posted something last week but it's not showing on the forum, is the group no longer active? Matt

[web2py] Re: why do posts not show?

2012-04-23 Thread pbreit
Maybe a glitch. The group is very active.

[web2py] mailing with pgp

2012-04-23 Thread weheh
I admit this is probably not the right forum for this question, but I'm trying to get pgp working with the web2py mail package and I can't seem to get gpgme or pgp installed properly on linux. When I do "from gpgme import pgp" I get "ImportError: cannot import name pgp" Anybody have some sugges

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread Vladimir Makarov
*+1 for a Stack Overflow Channel! * суббота, 21 апреля 2012 г., 20:24:32 UTC+4 пользователь JoeCodeswell написал: > > This new look that Google Groups has implemented is seriously debilitating > for a borderline dyslexic like me. > > Also the AJAX panel sizing is not working on my Chrome/WinXP

[web2py] Re: Time to move from Google Groups to a web2py or python??

2012-04-23 Thread Vineet
IMHO, stackoverflow offers wide functionaity such as post comments to answers, edit the comment / edit the answer, rate the comments/answers, accepted answer, etc. +1 for moving to stackoverflow -- Vineet On Monday, April 23, 2012 11:37:13 AM UTC+5:30, Timmie wrote: > > > +1 for a Stack Overfl

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Mon, 23 Apr 2012 06:39:56 -0700 (PDT) Massimo Di Pierro wrote: > For personal use I prefer the latter option. I make my own themes and > stick to them. Yet as a CMS for others the latter option cannot win > because we would never have enough themes to compete with others. I'd like to add one

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Mon, 23 Apr 2012 14:19:24 -0700 (PDT) howesc wrote: > what i have seen in the CMS world is all this hoopla about > themesin practice once the site is setup for a customer they > *rarely* if ever swap to a new theme - they tend to tweak what they > have. Well, my experience is that comp

[web2py] Re: Menu Items

2012-04-23 Thread Vibhor Purandare
Ya sure,I would like to see the code so that I can learn. On Monday, April 23, 2012 9:56:43 AM UTC+5:30, Vineet wrote: > > I am using a menu based on pure css. > Replaced the superfish menu completely. > If you are interested, I can share the code. > > -- Vineet > > On Monday, April 23, 2012 12:0

[web2py] Re: CMS question

2012-04-23 Thread Gour
On Mon, 23 Apr 2012 11:29:25 -0700 (PDT) Ross Peoples wrote: > The question is, do we really want to go in this direction for a CMS? > The content is basically imprisoned in hard-coded HTML, making theme > changes difficult at best. I could see making static HTML pages for > sites with this (i.e.

[web2py] Re: Little little Document Management System with flatbed scanners

2012-04-23 Thread szimszon
Now it is in github :) Sorry I had to move to a smaller virtual server but now you can try :) https://github.com/szimszon/dms Nowadays I have little time to work on it but I'm open to receive pull requests :) 2012. április 24., kedd 6:30:30 UTC+2 időpontban IVINH a következőt írta: > > > This

[web2py] Re: mailing with pgp

2012-04-23 Thread szimszon
If I remember well you don't have to import in your code anything the framework do that. If you would like to test that python can do it just try in python interpreter: >>> from pyme import core, errors >>> from pyme.constants.sig import mode That is what web2py use. In debian based system: a