[web2py] Re: can't create new app

2011-02-19 Thread LightOfMooN
How much memory needs web2py? On 20 фев, 12:21, LightOfMooN wrote: > Hello. > I try to create new app, but even name I get it, it's always rises > message: > unable to create application "hello" (it may exist already) > And app doesn't been created. > In app wizard the same problem on step 6. > >

[web2py] can't create new app

2011-02-19 Thread LightOfMooN
Hello. I try to create new app, but even name I get it, it's always rises message: unable to create application "hello" (it may exist already) And app doesn't been created. In app wizard the same problem on step 6. Is there because of non free memory? On local machine all works fine.

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread pbreit
Are you trying to support multiple blog authors? If you are doing "multi-tenancy" that's going to be more involved and you'll probably want to approach it differently. One idea would be to use sub-domains (sitenet.domain.com). Another would be to reg-ex the URL in routes so that you have a wild

[web2py] GSOC who is in charge and how should we proceed?

2011-02-19 Thread Jason Brower
I am very excited for GSOC as I was an achiever back in 2009. It changed my career forever. http://www.google-melange.com/document/show/gsoc_program/google/gsoc2011/timeline We need get our applications in very soon so let's get cracking! Who is in charge of this and how can I help? In terms of p

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread Ross Peoples
That makes sense. So let me ask you this: would it be possible to programatically add to routes_in and routes_out? I know this is probably getting a little silly, but I really like a specific URL structure. So if I used /posts/ for posts and /pages/ for pages, and the user created an about page

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread Jonathan Lundell
On Feb 19, 2011, at 9:18 PM, Ross Peoples wrote: > I figured out part of the problem. In the code above, it needs to be 'routers > =', not 'router ='. This works exactly like you mentioned it would. If you go > to /test, it expects to find a test() function in your default controller. In > my ca

[web2py] Re: custom registration form problem

2011-02-19 Thread pbreit
Did this get fixed? I have this: {{=form.custom.begin}} {{=form.custom.widget.email}} {{=form.custom.widget.password}} {{=form.custom.widget.password_two}} {{=form.custom.end}} And it shows email and password fields and then the word "None".

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread Ross Peoples
I figured out part of the problem. In the code above, it needs to be 'routers =', not 'router ='. This works exactly like you mentioned it would. If you go to /test, it expects to find a test() function in your default controller. In my case, since this is going to be a WordPress-like applicati

[web2py] Re: broken support for python 2.4

2011-02-19 Thread Massimo Di Pierro
Thank you. This fix will make it in 1.92.2 since we 1.92.* should support 2.4, but 1.93.* will no longer run on 2.4. We had a thread about it and not one person spoke in favor of supporting 2.4. On Feb 19, 10:18 pm, Sven1011 wrote: > I have downloaded the latest version of web2py and found that s

[web2py] broken support for python 2.4

2011-02-19 Thread Sven1011
I have downloaded the latest version of web2py and found that someone had like the 'all' of python 2.5. But I wanted to run the framework on centos 5, hence I stuck with 2.4. After some work I found two main problem files: ./applications/admin/views/default/design.html ./applications/admin/views/d

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread Ross Peoples
I spoke too soon. Just going to / forwards the browser on to /welcome/default/index. So at this point setting default_application did absolutely nothing. Here is my entire routes.py just in case I did something wrong: router = dict( BASE=dict( default_application='SiteNet' ) )

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread Ross Peoples
Just upgraded to 1.92.1 and replaced my routes.py with what you suggested. But I'm back to invalid request. Even going to /default/index fails. I still have to do /app/default/index to get anywhere, so I'm not seeing how setting default_application affects anything. On Feb 19, 2011, at 11:12 PM

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread Jonathan Lundell
On Feb 19, 2011, at 4:38 PM, Ross Peoples wrote: > > I wouldn't mind doing /blog/the-post, but if I wanted to do an about or > contact page, I would always want that to be http://domain.com/about In that case, if you're using 1.92.1, you can use the new router. router = dict( BASE=dict(default_

[web2py] Re: bug in SQLFORM.factory for multiple tables with repeated field names but readable=False

2011-02-19 Thread Carlos
Hi villas, Great recommendation - thanks!, Carlos

[web2py] Re: Problem with www-data ownership (or lack thereof)

2011-02-19 Thread pbreit
I'm not sure if it's a hook or not but I'll just try adding a chown command to my deploy function. I was already specifying user='www-data' on the pull but am not sure if that does anything. def deploy(): sudo('cd /var/web2py/applications/%s; hg pull' % (app), user='www-data') sudo('cd /

[web2py] Re: GSoC

2011-02-19 Thread pbreit
It'd be cool if the book was in version control and could be forked. Also, the docstring pages are almost unreadable.

Re: [web2py] Re: Blog about my adventures with web2py

2011-02-19 Thread pbreit
Oh, I'm totally supportive of a WordPress-like blogging app coming to Web2py so go for it! I was just surprised to hear about your WordPress issues.

Re: [web2py] Re: Shorter URLs

2011-02-19 Thread Ross Peoples
I wouldn't mind doing /blog/the-post, but if I wanted to do an about or contact page, I would always want that to be http://domain.com/about Is there some way to catch error pages, check for an existing page slug and redirect if there is one instead of just showing Invalid request? On Feb 19, 2

[web2py] Re: Shorter URLs

2011-02-19 Thread pbreit
I'm fanatical about clean URLs, too. But I might suggest that http://domain.com/blog/the-page might make things easier. On WordPress blogs, however, I usually see http://domain.com/2011/02/18/the-page. I'm not totally sure how that would work in Web2py.

Re: [web2py] Shorter URLs

2011-02-19 Thread Ross Peoples
You mention that it prevents access to other controllers. In /default/page would I need to check for the page title, and if doesn't exist, try to do a redirect(URL(request.args(0)) or something like that?

Re: [web2py] Re: Displaying br instead new line in views

2011-02-19 Thread Bruno Rocha
I guess it should be 'sanitize' {{=XML(note.content, sanitize=True).xml().replace('\n',')}} Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] 2011/2/19 Alexandre Strzelewicz > Thanks, but it doesn't work, it gives me the error "unexpected keyword > argument escape". > > Is there a way to

Re: [web2py] Shorter URLs

2011-02-19 Thread Jonathan Lundell
On Feb 19, 2011, at 3:53 PM, Ross Peoples wrote: > I am trying to develop a WordPress-like application with web2py and now I'm > thinking about URL structures. WordPress lets you select what kind of > permalink structure you want to use. With my application, I would like to > have pages mapped l

[web2py] Shorter URLs

2011-02-19 Thread Ross Peoples
I am trying to develop a WordPress-like application with web2py and now I'm thinking about URL structures. WordPress lets you select what kind of permalink structure you want to use. With my application, I would like to have pages mapped like this: http://domain.com/the-page I have played with

[web2py] Re: Blog about my adventures with web2py

2011-02-19 Thread villas
It's great that you are writing a nice blog about web2py. You have a nice uncomplicated style and it will be good to read your posts. On your other blog, I saw some great photos too! :) Thanks, D On Feb 18, 8:17 pm, Tom Atkins wrote: > I've started a blog about my web2py learning. > > I'm new to

[web2py] Re: Multiple Column Unique Fields

2011-02-19 Thread Ross Peoples
Ok, removing unique=True and using the line that Massimo gave me seems to do the trick. The validation is only at form level, but that should be good enough for my needs. Thanks guys.

[web2py] Re: bug in SQLFORM.factory for multiple tables with repeated field names but readable=False

2011-02-19 Thread villas
Hi Carlos, Also bear in mind that 'active' is a SQL keyword and should ideally be avoided to maintain portability between DBs. Regards, D On Feb 19, 4:44 am, Carlos wrote: > Massimo, > > Example: > > (model) >   f_active = Field('active', 'boolean', readable=False, writable=False) >   db.define_t

[web2py] Re: Multiple Column Unique Fields

2011-02-19 Thread Ross Peoples
It still fails because MySQL has only slug set as UNIQUE. The line you gave me doesn't have anything to do with database-level validation.

[web2py] Re: Multiple Column Unique Fields

2011-02-19 Thread villas
Do not use unique=True. Instead look at using the IS_NOT_IN_DB validator with a set which includes both rows. See the book: http://www.web2py.com/book/default/chapter/07#Database-Validators On Feb 19, 10:44 pm, Ross Peoples wrote: > I ran across this problem a little bit ago and can't seem to

[web2py] Re: Multiple Column Unique Fields

2011-02-19 Thread Massimo Di Pierro
perhaps add something like this: db.content.site.requires=IS_NOT_IN_DB(db(db.content.slug==request.vars.slug),db.content.site) On Feb 19, 4:44 pm, Ross Peoples wrote: > I ran across this problem a little bit ago and can't seem to solve it. > I have two tables similar to this: > > db.define_tabl

[web2py] Multiple Column Unique Fields

2011-02-19 Thread Ross Peoples
I ran across this problem a little bit ago and can't seem to solve it. I have two tables similar to this: db.define_table('site', Field('site_name', length=255), format='%(site_name)s' ) db.define_table('content', Field('site', db.site, unique=True), Field('slug', length=80, requi

[web2py] Re: GSoC

2011-02-19 Thread Tim Michelsen
> How about setting up some real solid documentation with Sphinx? We tried that earlier on. Was more or less discarded. also building docs is not easy as there are windows and linux specifc modules. and Sphinx needs to be able to import them all.

[web2py] Re: Displaying br instead new line in views

2011-02-19 Thread Alexandre Strzelewicz
It doesn't work, it gives me the error "unexpected keyword argument escape". Is there a way to remove double quotes when printing content containing html tags? Thanks On Feb 19, 4:03 pm, Massimo Di Pierro wrote: > try this: > > {{=XML(note.content,escape=True).xml().replace('\n',')}} > > On Feb

Re: [web2py] Re: Displaying br instead new line in views

2011-02-19 Thread Alexandre Strzelewicz
Thanks, but it doesn't work, it gives me the error "unexpected keyword argument escape". Is there a way to remove double quotes when printing {{=note.content}} ? On Sat, Feb 19, 2011 at 4:03 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > try this: > > {{=XML(note.content,escape=Tr

[web2py] Re: Displaying br instead new line in views

2011-02-19 Thread Alexandre Strzelewicz
It doesn't work, it gives me the error "unexpected keyword argument escape". Is there a way to remove double quotes when printing {{=note.content}} ? Thanks On Feb 19, 3:18 pm, Alexandre Strzelewicz wrote: > In my view I display text with : > {{=note.content}} > > But I didnt find a way to repl

[web2py] Re: Displaying br instead new line in views

2011-02-19 Thread Alexandre Strzelewicz
It doesn't work, it gives me the error "unexpected keyword argument escape". Is there a way to remove double quotes when printing content containing HTML tags ? Thanks On Feb 19, 4:03 pm, Massimo Di Pierro wrote: > try this: > > {{=XML(note.content,escape=True).xml().replace('\n',')}} > > On Fe

[web2py] Re: Problem with www-data ownership (or lack thereof)

2011-02-19 Thread Dane
Does fabric/mercurial have post-receive hooks like git? I use this do a recursive chown after every update to be safe. On Feb 18, 11:54 pm, pbreit wrote: > I just had a site outage after deploying some code changes. Somehow, some of > my directories and files had become owned by root instead of w

[web2py] Re: Blog about my adventures with web2py

2011-02-19 Thread blackthorne
seems to be poundhost.. On Feb 19, 4:45 pm, Ross Peoples wrote: > How are you hosting this? Shared hosting provider, VPS, or running > your own server? > > The reason I'm asking is because I run WordPress with BlueHost shared > hosting, and more recently, I started running a site on my own > dedi

Re: [web2py] Re: Blog about my adventures with web2py

2011-02-19 Thread Ross Peoples
I have played around with several of the plugins and such. None of them individually cause a slow down, but adding 4 or more starts slowing down everything. I mean everything: the site and the admin interface. Regardless, even a stock WordPress installation chews up a CPU whether using mod_php5

[web2py] Re: Blog about my adventures with web2py

2011-02-19 Thread pbreit
That doesn't sound right. Have you tried accessing your WordPress site from a different PC or browser? Have you customized your installation at all? Is there any Flash on the page? I'd love to see a WordPress-style app in Web2py. I also think a blog would make a good training app for the "Overv

[web2py] Re: GSoC

2011-02-19 Thread Tim Michelsen
> We need proposals. What do we want to be done? Geographic features for the DAL like at GeoDjango http://docs.djangoproject.com/en/dev/ref/contrib/gis/ This would mean that someone comes and adds support for the following spatial extensions: * PostGIS (PostgreSQL) * Spatialite (SQLite) * GeoCouc

[web2py] Re: Blog about my adventures with web2py

2011-02-19 Thread Ross Peoples
How are you hosting this? Shared hosting provider, VPS, or running your own server? The reason I'm asking is because I run WordPress with BlueHost shared hosting, and more recently, I started running a site on my own dedicated server. The performance of WordPress is terrible. At first I thought it

Re: [web2py] Problem with www-data ownership (or lack thereof)

2011-02-19 Thread Jonathan Lundell
On Feb 18, 2011, at 8:54 PM, pbreit wrote: > I just had a site outage after deploying some code changes. Somehow, some of > my directories and files had become owned by root instead of www-data which > apparently denied some sort of access. I'm not exactly sure how it happens > and what the deal

[web2py] Re: GSoC

2011-02-19 Thread pbreit
App profiling? https://groups.google.com/forum/?pli=1#!topic/web2py/z7DtiZJMO14

[web2py] Re: Displaying br instead new line in views

2011-02-19 Thread Massimo Di Pierro
try this: {{=XML(note.content,escape=True).xml().replace('\n',')}} On Feb 19, 8:18 am, Alexandre Strzelewicz wrote: > In my view I display text with : > {{=note.content}} > > But I didnt find a way to replace new line with . > I tried directly with replace('\n', '') but it escapes the br in > h

[web2py] Re: Digging in the web2py license(s)

2011-02-19 Thread Massimo Di Pierro
Will do so and contacted John Conde about this. Clearly there is a problem and we are working to resolve it. Thanks for bringing this up. Massimo On Feb 19, 2:44 am, José Luis Redrejo Rodríguez wrote: > 2011/2/18 Massimo Di Pierro : > > > Clarification: except for the memcache folder (which has

[web2py] Re: bug in SQLFORM.factory for multiple tables with repeated field names but readable=False

2011-02-19 Thread Massimo Di Pierro
Interesting that it worked before. There is no specific reason it should fail although I never designed it so that it would work. I will take a look asap. Thanks for reporting this. On Feb 18, 10:44 pm, Carlos wrote: > Massimo, > > Example: > > (model) >   f_active = Field('active', 'boolean', re

[web2py] App profiling?

2011-02-19 Thread pbreit
Do we have anything similar to these php tools? http://particletree.com/features/php-quick-profiler/ http://codeigniter.com/user_guide/general/profiling.html

[web2py] Displaying br instead new line in views

2011-02-19 Thread Alexandre Strzelewicz
In my view I display text with : {{=note.content}} But I didnt find a way to replace new line with . I tried directly with replace('\n', '') but it escapes the br in html format Thanks

[web2py] Logging SQL

2011-02-19 Thread drebbin
Hi all, to debug the SQL statements used during auth with openid I would like to log them to a file. I have setup logging according to http://web2pyslices.com/main/slices/take_slice/91 and calling "logger.debug('foo')" from a controller logs that message. But if I try to log sth. out of DAL, no

[web2py] Re: Auth with OpenId

2011-02-19 Thread drebbin
At first I struggled with OpenId myself, using the python-openid lib. It did cost me several nerves and reading many other implementations was necessary before I understood the inner workings. But now I do - it was worth it, and I got a simple login working. Then I wanted to combine it with web2

[web2py] Re: web2py & uploadify (plugin powerUpload preview)

2011-02-19 Thread Niphlod
I'm integrating it too to my project, but I have a few problems on detecting the logged in user. any ideas on your side ? I saw on the video that you require email and pass before loading uploadify are you having the same issues ? PS: don't know why disappeared from the discussion list h

[web2py] Re: web2py and uploadify

2011-02-19 Thread Niphlod
adding username or email (based on auth preferences) is needed showing the password in the parameter is really this bad ? On 1 Feb, 22:12, Niphlod wrote: > bump > > On Jan 26, 9:42 pm, Niphlod wrote: > > > Hello, I'm working on integrating uploadify with web2py > > Unfortunately up

Re: [web2py] Re: web2py & uploadify (plugin powerUpload preview)

2011-02-19 Thread Bruno Rocha
2011/2/19 Anthony > This is great. Is it possible to configure it so the user can select > multiple files at once instead of having to select one at a time? > Yes, you can configure if the user have to select only one file, a file at once or multiple files (using ctrl/command key)

Re: [web2py] Re: Digging in the web2py license(s)

2011-02-19 Thread José Luis Redrejo Rodríguez
2011/2/18 Massimo Di Pierro : > Clarification: except for the memcache folder (which has its own > license in PKG-INFO) all the others were actually written specifically > by web2py users for web2py and are prt of web2py. they are under > contrib simply because they are add-on modules not on the sa