[web2py] Re: Wiki example in the book

2011-05-26 Thread Anthony
For more details, see the very end of the book section on URL: http://web2py.com/book/default/chapter/04#URL On Friday, May 27, 2011 1:39:38 AM UTC-4, Anthony wrote: > The problem is that when you don't specify an extension in the URL() > function, it automatically defaults to the extension of

[web2py] Re: Wiki example in the book

2011-05-26 Thread Anthony
The problem is that when you don't specify an extension in the URL() function, it automatically defaults to the extension of the current request. So, when you go to /mywiki/default/news.rss, that sets the extension of the current request to 'rss'. So, when the news() function creates the URLs u

[web2py] Re: customizating the headers of the result in crud.search

2011-05-26 Thread zenessa
Records {{=SQLTABLE(db().select(db.person.ALL), headers='fieldname:capitalize', truncate=100, upload=URL('download')) }}

Re: [web2py] Re: Create an email queing feature...

2011-05-26 Thread Jason Brower
Yes, I practically have that now. The issue is how do I create the cron task and script to execute it? One way I am taking this further is, as long as the conference is "alive" I can compair this list with who has signed into the conference to get an idea of how many people have reacted to the

[web2py] Re: experimental... .pdf

2011-05-26 Thread Massimo Di Pierro
There are still problems...it does not render headers and tables... On May 26, 11:06 pm, Massimo Di Pierro wrote: > I just made a change to trunk about. the new generic.pdf uses pyfpdf > and it is smart in locating files for including images. > > massimo > > On May 26, 10:44 pm, Christopher Steel

[web2py] Re: experimental... .pdf

2011-05-26 Thread Massimo Di Pierro
I just made a change to trunk about. the new generic.pdf uses pyfpdf and it is smart in locating files for including images. massimo On May 26, 10:44 pm, Christopher Steel wrote: > I think report.pdf required reportlab? Massimo had an application for > creating forms that used markmin and latex.

[web2py] Re: experimental... .pdf

2011-05-26 Thread Christopher Steel
I think report.pdf required reportlab? Massimo had an application for creating forms that used markmin and latex. This web2py app includes a plugin that implements an assortment of pdf stuff (mostly your implementation of pyfpdf and the report.pdf, was that a Google thing?. Anyway the plugin is h

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

2011-05-26 Thread Anthony
On Thursday, May 26, 2011 11:24:35 PM UTC-4, Christopher Steel wrote: > > 10. Not a problem really, it's merely a flesh wound... Nice Monty Python reference. Here's another one: http://www.google.com/codesearch/p?hl=en#uyCl3L51_dI/gluon/rocket.py&l=570 :-) Anthony

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

2011-05-26 Thread Christopher Steel
Top 10 responses 1. We would get another bus driver. 2. Take the train. 3. Was that a front side bus or a back side bus? Was that a back side bust from the front side of the bus or the back side of the bus that busted his front side. 3. If it was a universal serial bus then we have nothing to

[web2py] Re: Incompatibility with web2py 1.95.1.

2011-05-26 Thread Massimo Di Pierro
Can you show an example of your form? On May 26, 6:46 pm, appydev wrote: > Regards. > > Some time ago I took my first steps with web2py and web programming. Make a > small application that works perfectly in web2py Version 1.89.5 and earlier, > but today after spending some time away due to colle

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

2011-05-26 Thread Pierre Thibault
2011/5/26 Nite > This thread reminds me... > > Old programmers never die. They just decompile. > Old programmers never die. They just lose their memory. > Old programmers never die. They just byte it. > Old programmers never die. They just get bugged with life. > Old programmers never die. They j

[web2py] Re: Create an email queing feature...

2011-05-26 Thread ron_m
A possible idea, each email insert into a table. When the cron job wakes up have it read X number of emails with the smallest ID value from the table and process them. Delete the row as each one is completed.

[web2py] Re: os.path.exists thread safety?

2011-05-26 Thread ron_m
os.path.join takes into account the path separation character - UNIX = '/' Windows = '\' which is why you should use it for when you want to run on both system types even if you don't expect to right now. os.path.exists internally does a stat() of the file to determine if it exists. There are c

[web2py] Re: Incompatibility with web2py 1.95.1.

2011-05-26 Thread Anthony
On Thursday, May 26, 2011 7:46:56 PM UTC-4, appydev wrote: > > Regards. > > Some time ago I took my first steps with web2py and web programming. Make a > small application that works perfectly in web2py Version 1.89.5 and earlier, > but today after spending some time away due to college, I resum

[web2py] Incompatibility with web2py 1.95.1.

2011-05-26 Thread appydev
Regards. Some time ago I took my first steps with web2py and web programming. Make a small application that works perfectly in web2py Version 1.89.5 and earlier, but today after spending some time away due to college, I resumed my training and I upgraded to web2py 1.95.1, and I realize that my app

[web2py] os.path.exists thread safety?

2011-05-26 Thread vapirix
I read in the docs about request.folder and not changing directory with os.path. Since I have literally no idea how and what in python is (and is not) thread safe, is the following thread safe? Do I need to be using os.path.join anywhere in there? if not os.path.exists(images+directory+resource):

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

2011-05-26 Thread Stifan Kristi
lol, i think everything will be fine, long live massimo and web2py, both are nice...

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

2011-05-26 Thread Massimo Di Pierro
LOL. I can think of a few people who may want to hit me... with or without a bus, but they are not on this list. So as long as I stay here I feel safe. Massimo On May 26, 10:16 am, Pierre Thibault wrote: > The bus will be fine. ;-) > > -- > > A+ > > - > Pierre > My blog and profile

[web2py] Integrity error with IS_NOT_IN_DB

2011-05-26 Thread Lenkaster
Hi, I have some problems to validate in the form layer when a table has uniqueness constraint with more than one column. The exemple following explains the problem. I have a table where I need to store accounting numbers. Ex.: +==+==+==+==+ |N1 |N2 |N3 |N4 | +==+==+==+==+ |1|2|3 |40

[web2py] Using the werkzeug debugger with web2py

2011-05-26 Thread Saurabh Sawant
I am trying to wrap the web2py wsgi app in anyserver.py with the werkzeug debugger but I can't get it to work. How do I raise the exception from web2py to DebuggedApplication? Here is what I did after following the steps mentioned here http://werkzeug.pocoo.org/docs/debug/ def cherrypy(app,add

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

2011-05-26 Thread Jonathan Lundell
On May 26, 2011, at 1:59 PM, Vasile Ermicioi wrote: > Python is a world of dictators - Guido, Massimo... :) Wise and benevolent dictators, of course.

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

2011-05-26 Thread Vasile Ermicioi
Python is a world of dictators - Guido, Massimo... :)

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

2011-05-26 Thread Bruno Rocha
They should now be called as *_Massimo* with to be protected! LOL -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] On Thu, May 26, 2011 at 5:46 PM, NetAdmin wrote: > Massimo is safe... I'm sure he's done the following... > From SuperPowers import Invulnerability, BusRadar, BackUpLife

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

2011-05-26 Thread NetAdmin
Massimo is safe... I'm sure he's done the following... From SuperPowers import Invulnerability, BusRadar, BackUpLife On May 26, 9:15 am, Bob Blanchett wrote: > I just read this presentation by by > GvR/BDFLon > 21 years

Re: [web2py] Login button should say Login...

2011-05-26 Thread Bruno Rocha
def user(): *form = auth() form.element(_type='submit')['value'] = 'Login'* return dict(form=form) -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] On Thu, May 26, 2011 at 4:52 PM, Jason Brower wrote: > Don't you think the Login button should say Login rather than Submit? It > m

[web2py] Login button should say Login...

2011-05-26 Thread Jason Brower
Don't you think the Login button should say Login rather than Submit? It makes more sence and I got 4 people that told me they were confused when they saw the button say that. So with Auth, could we change the name of the button to "Login"? Is there a quick fix for that? Best Regards, Jason

[web2py] Re: experimental... .pdf

2011-05-26 Thread Mariano Reingart
Putting the following code in generic.pdf and getting report.pdf does not work? (also, per default there is a generic.pdf made by massimo that uses markmin and latex if I remember it correctly) from gluon.contrib.pyfpdf import FPDF, HTMLMixin from gluon.sanitizer import sanitize class MyFPDF(FPDF

[web2py] Create an email queing feature...

2011-05-26 Thread Jason Brower
This would be a first cron anything so I need a bit of help. I want to make a system that sends many many email invites to my conference software at interestid.com (going live in a month or so).' I can do that just fine, but I need to limit the emails to only 200 emails per hour because of my ho

[web2py] Re: short url idea

2011-05-26 Thread Francisco Costa
> You need to specify functions=[list of functions in default controller]. > The rewrite logic needs this so that it can verify that the first arg is not > a valid function name. Great advice.. I will try it Thank You

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

2011-05-26 Thread Nite
This thread reminds me... Old programmers never die. They just decompile. Old programmers never die. They just lose their memory. Old programmers never die. They just byte it. Old programmers never die. They just get bugged with life. Old programmers never die. They just go to bits. Old programmer

Re: [web2py] Re: Help in documentation

2011-05-26 Thread Pierre Thibault
2011/5/26 Bruno Rocha > On Thu, May 26, 2011 at 3:08 PM, Pierre Thibault < > pierre.thibau...@gmail.com> wrote: > >> There is already a wiki on Google Code > > > GitHub has gist to embed code snipets, the github markup is very nice. and > it is possible to have the posts in files so pull/push. >

[web2py] Re: Wiki example in the book

2011-05-26 Thread Chris May
I don't think I'm running trunk code... I'm running version 1.95.1 (2011-04-25 15:04:14). I copied views/generic.rss into views/default/news.rss (which seems more in line with the book example, since the show function shows the wiki page), and it still inserted ".rss" in after "show" So... if you

Re: [web2py] Re: Help in documentation

2011-05-26 Thread Bruno Rocha
On Thu, May 26, 2011 at 3:08 PM, Pierre Thibault wrote: > There is already a wiki on Google Code GitHub has gist to embed code snipets, the github markup is very nice. and it is possible to have the posts in files so pull/push. I never used Google Code wiki, is it good?

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

2011-05-26 Thread David J.
Q. What if Massimo got hit by a Bus? A. The bus would break. My .02 :) On 5/26/11 2:08 PM, Jason Brower wrote: On 05/26/2011 05:15 PM, Bob Blanchett wrote: I just read this presentation by by GvR/BDFL on 21 years

[web2py] Re: Wiki example in the book

2011-05-26 Thread Massimo Di Pierro
Are you using the trunk code? If so. We discovered that enabling generic actions by default causes a possible vulnerability. What you have to do is copy views/generic.rss into views/default/show.rss Massimo On May 26, 12:39 pm, Chris May wrote: > I am using the book to learn more about web2py

Re: [web2py] Re: Help in documentation

2011-05-26 Thread Pierre Thibault
2011/5/26 Bruno Rocha > > > PS: What about a wiki on github? > > There is already a wiki on Google Code. -- A+ - Pierre My blog and profile (http://pierrethibault.posterous.com) YouTube page (http://www.youtube.com/user/tubetib)

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

2011-05-26 Thread Jason Brower
On 05/26/2011 05:15 PM, Bob Blanchett wrote: I just read this presentation by by GvR/BDFL on 21 years of Python and wondered for Web2py as some one did for Python

Re: [web2py] Re: Help in documentation

2011-05-26 Thread Bruno Rocha
It is easy, 1. Go to the book app web2py.com/book and 'login' with your google account.x) 2. Send a mail to Massimo with your google mail requesting editor permissions 3. Learn to write in Markmin 4. you will be responsible for any change you did, so you need to tell here in the group when some

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

2011-05-26 Thread Bruno Rocha
On Thu, May 26, 2011 at 12:38 PM, mikech wrote: > Long live Massimo! +1 Long live Massimo! web2py should be rewritten to work with Python version 10 in the future. and.. I hope that Marco (Massimo's son) learn to program in Python and inherit the skills of his father.

[web2py] Wiki example in the book

2011-05-26 Thread Chris May
I am using the book to learn more about web2py, and I was checking out the wiki example in chapter 3 (http://web2py.com/book/default/chapter/ 03#A-Wiki ), I noticed that the links inside the RSS feed come out slightly wrong. The links have ".rss" in between the app name and the row.id argument, as

Re: [web2py] short url idea

2011-05-26 Thread Jonathan Lundell
On May 26, 2011, at 10:16 AM, Francisco Costa wrote: > > Hello, > we are building a short-url app. > > We are using MongoDB to save in a table the long-url (ex.: http://google.com) > and respective short-url (ex.: eWTy) > > We pretend to use it just like bit.ly > > To make the redirect working

[web2py] Re: Help in documentation

2011-05-26 Thread mattgorecki
I was just wondering about this morning. I'd love to help where I can. Matt On May 26, 10:21 am, Vinicius Assef wrote: > I'd like to help keeping docs up to date. > > How can I do that? > > -- > Vinicius Assef.

Re: [web2py] Help in documentation

2011-05-26 Thread Pierre Thibault
2011/5/26 Vinicius Assef > I'd like to help keeping docs up to date. > > How can I do that? > > -- > Vinicius Assef. > I don't know how things are working right now but I believe it would be great that when I patch is applied, the person who did the patch would also submit a description of what

[web2py] short url idea

2011-05-26 Thread Francisco Costa
Hello, we are building a short-url app. We are using MongoDB to save in a table the long-url (ex.: http://google.com) and respective short-url (ex.: eWTy) We pretend to use it just like bit.ly To make the redirect working we have to point the browser to a function like http://domain.com/r/eWTy t

[web2py] Re: can't use admin, can't see tickets with localhost google appengine SDK

2011-05-26 Thread ron_m
Glad to help, wish you success on your project.

[web2py] Pack applications stored on control version filesystems

2011-05-26 Thread José L .
Hi I was having problems (Internal error) when trying to pack an application that I have under subversion control. I've detected the problem was in the app_cleanup function in gluon/admin.py (it tried to remove files, but raised an error when tried to remove the .svn directory). I guess this wil

[web2py] Re: Subdomain Duplicates Content

2011-05-26 Thread Francisco Costa
> The easiest option: a flag to forbid a cross-domain URL call. URL would raise > an exception if you try to do that. (Actually, the rewrite logic would do > that.) That option would be great!

[web2py] Help in documentation

2011-05-26 Thread Vinicius Assef
I'd like to help keeping docs up to date. How can I do that? -- Vinicius Assef.

[web2py] Re: can't use admin, can't see tickets with localhost google appengine SDK

2011-05-26 Thread pbreit
Good to hear you got it working but I'm surprised there were problems in the first place. You can run without the Tk stuff with these command lines: http://web2py.com/book/default/chapter/04#Command-Line-Options

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

2011-05-26 Thread mikech
Long live Massimo!

[web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread villas
Thanks, that sounds like a solution and I will experiment a little. I like this feature very much! On May 26, 4:30 pm, Massimo Di Pierro wrote: > You can do what you ask > > db.define_table('tenant',Field('name')) > # somehow store a tenant.id in session.tenant_id > # use tenant id for all other

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

2011-05-26 Thread Martín Mulone
OMG, I hope that's never happend, cause we have to honour him working more in web2py development, jeje. Seriously is open source, take a look to code, is nothing hidden there, and the code are not going to bite you :) and is mre simpler than core python code. I'm worried about another things.

[web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread Massimo Di Pierro
You can do what you ask db.define_table('tenant',Field('name')) # somehow store a tenant.id in session.tenant_id # use tenant id for all other tables but the one above db._common_fields=[Field('request_tenant',default=session.tenant_id,writable=False,readable=False)] On May 26, 9:52 am, villas

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

2011-05-26 Thread Pierre Thibault
The bus will be fine. ;-) -- A+ - Pierre My blog and profile (http://pierrethibault.posterous.com) YouTube page (http://www.youtube.com/user/tubetib) Twitter (http://twitter.com/pierreth2)

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

2011-05-26 Thread Marin Pranjic
We will be angry at bus driver :) On Thu, May 26, 2011 at 4:48 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > LOL... > > What if the CEO of a company gets hit by a bus? They get another CEO! > > I can assure there are many web2py experts on this list > http://web2py.com/examples/def

Re: [web2py] Re: Subdomain Duplicates Content

2011-05-26 Thread Jonathan Lundell
On May 26, 2011, at 2:08 AM, Francisco Costa wrote: > > any update on this? No, I just got back from a trip and haven't looked at it. Can we discuss what behavior we want (and can get)? The easiest option: a flag to forbid a cross-domain URL call. URL would raise an exception if you try to do

[web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread villas
Hi Massimo My thought/suggestions are: Almost everyone using this feature will also wish to keep data relating to the tenant, e.g. they will have a 'tenant' table with information about 'harvard.school.org'. The foreign key relating to the 'tenant' table under your system would therefore be usi

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

2011-05-26 Thread Massimo Di Pierro
LOL... What if the CEO of a company gets hit by a bus? They get another CEO! I can assure there are many web2py experts on this list http://web2py.com/examples/default/who.html I also have a will with some instructions about relinquishing trademark rights and control over web2py.com to other lis

[web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread Massimo Di Pierro
db._request_tenant = 'company_id' On May 26, 9:31 am, Anthony wrote: > On Thursday, May 26, 2011 10:10:55 AM UTC-4, Massimo Di Pierro wrote: > > > I changed 'request_precinct' to 'request_tenant' since this is more > > appropriate. We are talking about buildig multi-tenant apps. > > Does it have

[web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread Anthony
On Thursday, May 26, 2011 10:10:55 AM UTC-4, Massimo Di Pierro wrote: > > I changed 'request_precinct' to 'request_tenant' since this is more > appropriate. We are talking about buildig multi-tenant apps. Does it have to be 'request_tenant', or is it possible to use a custom name, like 'compa

Re: [web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread Tom Atkins
This is very useful - thanks Massimo! I will do some testing too... Still working on the LMS? ;-) On 26 May 2011 15:10, Massimo Di Pierro wrote: > I changed 'request_precinct' to 'request_tenant' since this is more > appropriate. We are talking about buildig multi-tenant apps. > > db._common_fi

[web2py] Re: Virtual fields and with_alias error

2011-05-26 Thread Jim Karsten
Done. Issue 280: Virtual fields and with_alias error

Re: [web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread Bruno Rocha
On Thu, May 26, 2011 at 11:10 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > db._common_fields=[auth.signature] > > and all tables will have created_by, modified_by, created_on, > modified_on, etc. > That is a very nice feature! I was implementing it from scratch creating an 'compan

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

2011-05-26 Thread Bob Blanchett
I just read this presentation by by GvR/BDFLon 21 years of Python and wondered for Web2py as some one did for Pythonin 1994. What if the worst happen

[web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread Massimo Di Pierro
I changed 'request_precinct' to 'request_tenant' since this is more appropriate. We are talking about buildig multi-tenant apps. db._common_fields=[Field('request_tenant',default=request.env.http_host,w ritable=False,readable=False)] Notice you can also do db._common_fields=[auth.signature] and

[web2py] Re: domain and download function problem

2011-05-26 Thread Anthony
On Wednesday, May 25, 2011 5:24:49 AM UTC-4, Joseph.Piron wrote: > > routers = dict( > BASE = dict( > domains = { > 'stock': 'stock' > } > ) > ) > > and now, I can access this application at http://stock , but... > Now the link to download the images aren't correct anymore: > > the link a

[web2py] Re: Access Control

2011-05-26 Thread Jose
On 24 mayo, 13:47, pbreit wrote: > If your PHP code has no access control then, yes, people will just be able > to copy/paste URLs to gain access and I'm not sure Web2py can help you out. > > But you should be able to set up passwords on the web server. For example, > Cherokee:http://www.cheroke

[web2py] Re: Database Migration from sqlite to postgresql

2011-05-26 Thread Massimo Di Pierro
Run this script then change the DB URI to postgresql http://code.google.com/p/web2py/source/browse/scripts/cpdb.py On May 26, 1:15 am, web2all wrote: > Dear All, > > I'm planning to migrate my database to postgresql from sqlite. I dont > know how to do it, any body tell me how to do it. Currentl

[web2py] Re: experimental in trunk... common_fields and precints

2011-05-26 Thread Massimo Di Pierro
yes. On May 25, 11:37 pm, mattgorecki wrote: > So in this example request_precinct would equal harvard.anyschool.org? > > Matt > > On May 25, 9:47 pm, Massimo Di Pierro > wrote: > > > > > > > > > There are two more features in trunk that I could use some testing > > with (common fields and pre

[web2py] Database Migration from sqlite to postgresql

2011-05-26 Thread web2all
Dear All, I'm planning to migrate my database to postgresql from sqlite. I dont know how to do it, any body tell me how to do it. Currently I have 20 tables in my application with full of data. Do I need to change anything on tables? what drivers do i need to install? clear procedure. thank you.

Re: [web2py] making table data avaialable to a javascript application

2011-05-26 Thread Manuele Pesenti
On 26/05/2011 10:29, max wrote: Hi, I am trying to integrate my database data into a ajax application as follows http://dev.sencha.com/deploy/ext-4.0.1/examples/view/animated-dataview.html How would I open/interface my table data to the java script application? Thanks I think data variable

[web2py] Re: Subdomain Duplicates Content

2011-05-26 Thread Francisco Costa
any update on this? On May 24, 2:36 am, Jonathan Lundell wrote: > On May 23, 2011, at 8:06 PM, Bruno Rocha wrote: > > > I guess Francisco wants to explain a different behaviour. > > > Having 2 or more apps on the same web2py instance, web2py should prevent > > the app to be requested by other do

[web2py] making table data avaialable to a javascript application

2011-05-26 Thread max
Hi, I am trying to integrate my database data into a ajax application as follows http://dev.sencha.com/deploy/ext-4.0.1/examples/view/animated-dataview.html How would I open/interface my table data to the java script application? Thanks

[web2py] Re: domain and download function problem

2011-05-26 Thread Joseph.Piron
So as I am investigating this, I gave the pattern based routing system and now it works. Here's my routes.py: routes_in = ( ('/(?P.*)', '/stock/\g'), ) routes_out = ( ('/stock/(?P.*)', '/\g'), ) with that the generated links for the photos are like when http://stock is accessed, so with th

[web2py] Re: domain and download function problem

2011-05-26 Thread Joseph.Piron
nobody's got a clue ? :) On May 25, 11:24 am, "Joseph.Piron" wrote: > Hi guys, > > i got a strange problem, I have made a simple application picking up > data from a database, including an upload field for small photos. > This works perfectly if hosted in the classic way, for example if my > serv

[web2py] Re: can't use admin, can't see tickets with localhost google appengine SDK

2011-05-26 Thread Luis Goncalves
To make a long story short : it works now! I ran the ubuntu.sh script, and it installed a lot of stuff (still had to instal python-tk manually) tried to run admin, still got errors. Looked at the error log in admin/errors, and compared the file that it said had a syntax error -- it was very dif