[web2py] Table names: plural or singular?

2010-11-30 Thread pbreit
Sorry for the newbie, religious question but what is the preference in web2py for table names, plural or singular? Most of the docs seem to indicate singular since that seems to make more sense in code (and you don't really use SQL all that much). But I did see some examples with plural.

[web2py] Re: how do get me to imporsonate a generic user?

2010-12-01 Thread pbreit
I love the commitment to backwards compatibility but a security issue warrants a fix.

[web2py] Re: Scalability of web2py?

2010-12-01 Thread pbreit
This is a good discussion as it is apparent that web2py is an incredible framework for rapidly building well-designed applications but it's not totally clear what happens in a high volume situation. But let's not forget that pretty much every framework experiences this exactly. While Massimo is

[web2py] Re: Scalability of web2py?

2010-12-02 Thread pbreit
I don't think anyone is comparing web2py to .net (thank goodness). A better comparison is Ruby on Rails and Massimo is a bit like DHH. I get the impression that he is pretty passionate about web2py and his position at the university would enable him to continue working on it for awhile. And if

[web2py] Re: I Just Need a Programmer

2010-12-02 Thread pbreit
This is a brilliant observation and Anthony, I think you are right on. I am a fairly inexperienced programmer, having dabbled with PHP over the years but never really creating anything, but web2py has got me extremely excited that I can really implement some of my ideas. Massimo has struck an

[web2py] Re: missing post

2010-12-03 Thread pbreit
I don't think performance should be the main thing necessarily. I think the use of Ajax should really depend on usability (of which performance is a component).

[web2py] Re: when to use ajax

2010-12-03 Thread pbreit
If you *really* want it to be like a desktop app you should have a look at Ext JS from Sencha. It's quite a bit more involved but can support some very rich interfaces.

[web2py] Any success getting web2py to run on Cherokee?

2010-12-03 Thread pbreit
I've been trying to get web2py running on Cherokee on a clean install of Ubuntu 10.04 but no luck so far. I've seen different sets of instructions but they all seem to be for older versions. I am working with: Ubuntu 10.04, web2py 1.89.5, Cherokee 1.0.12 and uswgi 0.9.6.5. It seems like I'm

[web2py] Re: Deploying a site powered by web2py.

2010-12-04 Thread pbreit
Unfortunately, Python in general is a bit harder to deploy than HTML and PHP. Site5 has a few different hosting options so to help out it would be good to know what sort of plan you are on. If it's Shared Hosting, I think you will want to try the fastcgi option. The web2py book doesn't really

[web2py] Re: How to create a module

2010-12-09 Thread pbreit
It should be: modules/checkrole.py and: role=local_import('checkrole')

[web2py] What's the preferred way to clean up the URLs?

2010-12-09 Thread pbreit
What's the preferred way to clean up the URLs? For example, I never want /myapp/default/index to display. /myapp is OK during development and/or when I'm on a server with multiple apps. But when I'm on a domain/server with one app, I want http://myserver.com/; to go to my home page without

[web2py] Re: SQLForm.factory and identic fields names in differents tables

2010-12-09 Thread pbreit
I was wondering that myself. I got this to almost work but it is not inserting the address.client_id so there's no link between the records. Inserting into two tables seems extremely common. Hopefully this won't be too difficult.

[web2py] Re: SQLForm.factory and identic fields names in differents tables

2010-12-09 Thread pbreit
My bad. I had named the field db.address.client_id. Works fine now. But field name conflicts seem like they will be a problem at some point.

[web2py] Re: it case you missed it...

2010-12-10 Thread pbreit
Is there a decent Web2py-based blogging appliance? It would be great to have some good implementations of some core apps like blog, forums, CRM, etc.

[web2py] Re: it case you missed it...

2010-12-10 Thread pbreit
Did I read correctly that you might evaluate Web2py's license? It does seem like GPL could potentially discourage usage since it makes the code harder to modify. That might be why very few frameworks are GPL: http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks

[web2py] Re: it case you missed it...

2010-12-11 Thread pbreit
For what it's worth, I believe the following is accurate: 1. GPL is more objectionable than BSD/MIT 2. Frameworks tend not to use GPL (http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks) It's probably worth consideration if we would like maximum usage.

Re: [web2py] Re: it case you missed it...

2010-12-12 Thread pbreit
1. GPL is more objectionable than BSD/MIT Both GPL and BSD are not well suited to template code, that's the point. So which one would you suggest? 2. Frameworks tend not to use GPL So? So if many/most other frameworks do not use GPL, maybe not using GPL is worth considering for the

Re: [web2py] Re: it case you missed it...

2010-12-12 Thread pbreit
The disadvantages of GPL are somewhat clear. Are there any advantages of GPL (with respect to frameworks)?

[web2py] Re: it case you missed it...

2010-12-12 Thread pbreit
I'm not sure you can make that generalization with frameworks. The solid, widely used ones are all BSD/MIT (Rails, Django, Cake, CodeIgniter, Pylons, Turbogears, Symfony, etc.). But as you say, BSD/MIT are better for users.

[web2py] Re: it case you missed it...

2010-12-12 Thread pbreit
The evidence is overwhelmingly in the other direction both in terms of what users want and what other frameworks offer. I don't think that's disputable.

[web2py] Re: it case you missed it...

2010-12-12 Thread pbreit
Fair enough. But I do hope you will re-evaluate at some point as I strongly believe that a non-GPL license would make Web2py much, much better. And I think it is worthwhile trying to gain users since usage is the oxygen for something like a framework.

Re: [web2py] Re: it case you missed it...

2010-12-12 Thread pbreit
But as you say, BSD/MIT are better for users. He didn't say that. He said it prevents users from making a better derivative. My apologies to the community and Massimo for be-laboring the point but I think it's unfortunate that the license alone is discouraging use of the framework. I'm very

Re: [web2py] Re: it case you missed it...

2010-12-13 Thread pbreit
Unless there is a move away from GPL, I don't think it's worthwhile to split hairs on all these intricacies. What is discouraging users is GPL and I don't think adding more exceptions will avoid the negative perception. If Massimo is married to GPL then there's probably not much to discuss. I

[web2py] Re: simple db app

2010-12-13 Thread pbreit
I would envision something more like this (not tested): == db.py == db.define_table('address', Field('person'), Field('address')) == default.py == def index(): records = db().select(db.address.ALL, orderby=db.address.name) return dict(records=records) def create(): form =

[web2py] Re: simple db app

2010-12-13 Thread pbreit
Oops, I made same error. {{=record.name}} : {{=record.address}}br should be {{=record.p http://record.name/erson}} : {{=record.address}}br Not to sound like your mother but there were a lot of little errors like that in the original code. You have to be *extremely* careful about the details.

[web2py] More DAL examples missing?

2010-12-13 Thread pbreit
The Examples page (http://web2py.com/examples/default/examples) includes a link to more DAL examples (http://web2py.com/examples/default/dal) which errors invalid function.

[web2py] Store user information in auth_user?

2010-12-14 Thread pbreit
Tips on storing user information? Best to put it in auth_user or separate table? (ie: address, DOB, email preferences, etc).

[web2py] Re: auth model

2010-12-14 Thread pbreit
To customize auth, have a look at: http://web2py.com/book/default/chapter/08#Customizing-Auth For one thing, the table definitely needs to be placed between auth = Auth(globals(), db) and auth.define_tables()

Re: [web2py] Re: it case you missed it...

2010-12-15 Thread pbreit
Sorry but this requires a response. Django and Rails (frameworks!!) are *far* better examples than the CMSs you point out. BSD/MIT are definitionally better for users than GPL because they are more permissive. You'd have to prove some sort of unintended circumstance to dispute that for which

Re: [web2py] Re: it case you missed it...

2010-12-15 Thread pbreit
It's not worthwhile fiddling around with the exception since the GPL stigma will remain. It's clear that GPL scares off potential users. I come from a background of relentlessly lowering barriers to adoption. I would very much like to see Web2py usage go way up.

[web2py] Re: it case you missed it...

2010-12-15 Thread pbreit
Anthony, thanks for keeping your posts reasonable and considerate.

Re: [web2py] Re: it case you missed it...

2010-12-16 Thread pbreit
We are discussing the license because it hinders adoption...hardly a pointless topic. Anthony at least acknowledges this. I posted the question on Quora and it got a reasonable first response: http://www.quora.com/What-is-the-best-license-for-a-web-framework-ex-Cake-Rails-Django-GPL-BSD-or-MIT

[web2py] Re: How to fetch already exiting table data with out defining new table

2010-12-16 Thread pbreit
Here's one: https://groups.google.com/d/topic/web2py/mH5Toup0vwk/discussion

[web2py] Re: it case you missed it...

2010-12-16 Thread pbreit
+1 for permissive. Seems unlikely anyone would want to close up the source of a framework and even if it happened, it shouldn't affect the project. And who would want to use closed source framework? But it should eliminate one of the adoption hurdles which is a good thing. Don't you all want

Re: [web2py] Re: it case you missed it...

2010-12-16 Thread pbreit
branko, I'm curious why permissive licensing is a problem for you. is it a philosophical thing? what's the downside? wouldn't it be cool if your code was widely used? cake, django rails are permissively licensed (as are most frameworks) and it doesn't seem to be a problem. people still seem

Re: [web2py] Re: it case you missed it...

2010-12-16 Thread pbreit
Fair enough, I respect that. Massimo has done a wonderful job of adding really good features while keeping web2py lean. As it gets more popular is there a concern that more people will lean on Massimo to add bloat? That would definitely be unfortunate.

Re: [web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-12-17 Thread pbreit
Oops: also very similar to Ivan's instructions.

[web2py] Re: variables

2010-12-17 Thread pbreit
I don't really understand the question. Do you want to change a JavaScript variable? Or a variable in your web2py code? I don't think you would be able to modify a web2py variable as the result of a click. By the time the suer views your page, all the web2py code has been rendered into HTML.

[web2py] Re: curd.create redirect to created item on success

2010-12-18 Thread pbreit
This seems to work: form = SQLFORM(db.item) if form.accepts(request.vars, session): response.flash = 'Item added.' redirect(URL('item', args=form.vars.id))

[web2py] Re: mercurial.py : ignore sessions too

2010-12-18 Thread pbreit
and uploads/* ?

[web2py] Re: Say hello to pyStack.com

2010-12-19 Thread pbreit
It would be great to see some polished core apps like Forums, CMS and Blog.

[web2py] Re: pootle2py

2010-12-19 Thread pbreit
This project is cool: https://github.com/berk/tr8n

[web2py] Re: How to do this in web2py..?

2010-12-20 Thread pbreit
I wonder if a NoSQL DB like Mongo or Couch would work?

[web2py] Re: it case you missed it...

2010-12-20 Thread pbreit
I guess I still support considering a permissive license (ie, BSD or MIT). I'm curious why folks prefer GPL? Does a non-GPL license make it more difficult to incorporate GPL code into a project? Have there been situations where permissive licensing compromised a project? I realize many don't

[web2py] When to use lambda?

2010-12-21 Thread pbreit
I see lambda used quite a bit and don't totally understand the concept. Is there a simple rule to follow to know when it is necessary to use?

Re: [web2py] Re: The stability of web2py releases

2010-12-22 Thread pbreit
I do think at some point the concept of stable and new will be useful for newer users. stable might be a loaded word so maybe just recommended or something. One challenge will be how to process bug fixes on stable. A start may be the ability to specify a branch in admin. And new users could be

[web2py] Re: Link to mod_wsgi.so download for py25 not working

2010-12-22 Thread pbreit
Might check here: http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2

[web2py] Re: Members database

2010-12-22 Thread pbreit
I would suggesting only using auth_user for people who register and need to log in. If you're just storing and publishing information like that, create a new table and don't worry about duplicate data. People might want to display a different contact email address anyway.

[web2py] DotCloud is Heroku with more options

2010-12-22 Thread pbreit
Could be an interesting deployment option for Web2py: http://www.dotcloud.com/

Re: [web2py] Re: uWSGI + Cherokee + web2py - a howto.

2010-12-22 Thread pbreit
I added instructions for SSL: http://web2pyslices.com/main/slices/take_slice/110 Seems to work OK.

[web2py] Re: App admin error

2010-12-23 Thread pbreit
Can you look at the db.pictures.word field using a SQLite browser to see if there's any corruption or the wrong type?

Re: [web2py] Re: The stability of web2py releases

2010-12-23 Thread pbreit
I think it's definitely a worthwhile goal to evolve the release schedule into stable and feature branches with bugs getting back-ported but suspect it will take some time to get there. Part of the value of a framework is being able to count on its stability. For now, we can upgrade more slowly

[web2py] Re: try web2py with cherrypy, diesel, eventlet, fapws,flup, gnuicorn, paste, rocket, tornado, twisted, wsgiref

2010-12-24 Thread pbreit
Bjoern: a screamingly fast Python WSGI server written in C https://github.com/jonashaag/bjoern

[web2py] Re: Any success getting web2py to run on Cherokee?

2010-12-24 Thread pbreit
Cool, thanks for following up. I did manage to finally get something working and turned it into a new slice: http://web2pyslices.com/main/slices/take_slice/110 This is for Cherokee 1.0.14 which has a slightly different front-end. I also was able to get self-signed certs set up. Seems like a

[web2py] Getting Started...

2010-12-25 Thread pbreit
In the beginning, I'd suggest just using programming on your local machine with the bundled web server and sqlite. When you're ready to deploy to a remote server setting up ssl isn't too bad. Or forwarding localhost with ssh -L 8000:localhost:8000 r...@server.ip.address. For initial learning,

Re: [web2py] Getting Started...

2010-12-25 Thread pbreit
On Mac or windows, just double-click the app. Maybe on *nix as well. Best to create the project in admin but after that you can do *all* of your editing in text editor.

Re: [web2py] Getting Started...

2010-12-25 Thread pbreit
On Mac or windows, just double-click the app. Maybe on *nix as well. Best to create the project in admin but after that you can do *all* of your editing in text editor. Chapter 3 of the books walks through getting started: http://web2py.com/book/default/chapter/03

Re: [web2py] Default Values.

2010-12-26 Thread pbreit
Definitely suggest running through chapter 3 of the book (and all chapters if possible).

Re: [web2py] Re: Web2Py Foundation?

2010-12-28 Thread pbreit
I think we're OK for now. While there is a small perceptual problem of web2py being a single person's effort, I think at this stage it is beneficial for Massimo to continue with his rapid and prudent improvements. The best thing now is for more people to become web2py experts. There's a lot of

[web2py] Re: web2py Turnkey Linux Appliance (collaborator needed)

2010-12-31 Thread pbreit
Does anyone here use Fabric? I'm going to take a look in the next few days.

[web2py] RFC: new URL routing facility

2010-12-31 Thread pbreit
Cool!

[web2py] How web2py handles URLs

2011-01-01 Thread pbreit
Are you sung the URL() helper function? It should take care of all of the encoding. What does your code look like?

[web2py] URL encoding

2011-01-01 Thread pbreit
There's a short discussion here http://web2py.com/book/default/chapter/04#Dispatching Which seems to suggest what you are seeing. Perhaps there's an ENV variable that can provide the un-manipulated args?

[web2py] Re: How to delete a user?

2011-01-02 Thread pbreit
Be careful deleting users with an href since that can easily lead to unintended deletions. In general links and GETs should never add, update or delete anything.

Re: [web2py] ADVOCACY: every single other Python program ever written uses imports?

2011-01-06 Thread pbreit
When I started learning Python the excessive importing made no sense to me. It seemed like something that obviously the computer should figure out (isn't that what computers are good at?). If it would make people happy, I suppose we could add from glon imprt web2py (or whatever) to every file.

[web2py] Re: Drupal alternatives in Python or web2py

2011-01-07 Thread pbreit
I think it would definitely be worthwhile for there to be a decent Web2py-based CMS. But it doesn't need to be as extensive and complicated as Drupal. Keep it simple.

[web2py] Re: ADVOCACY: every single other Python program ever written uses imports?

2011-01-08 Thread pbreit
I think we could do ourselves a favor by taking the feedback seriously and not being so dismissive of criticism. There are pros and cons of the various approaches and we happen to think Web2py's design decisions have good merit. Hiding behind DRY for the importing situation is not productive.

Re: [web2py] Hassle-Free Application Hosting?

2011-01-09 Thread pbreit
DotCloud looks very promising (Bruno, how'd you get your invite??). I dabbled with AlwaysData for a bit which is a nice free option. If you are considering it at all, I would highly suggest running a cloud server. It's not as difficult as it may seem and can be quite inexpensive

Re: [web2py] Hassle-Free Application Hosting?

2011-01-09 Thread pbreit
If you use Google Chrome, it will prompt to translate the page for you. The Always Data pages translate fairly well and many on the Always Data forums speak English including the very helpful AD rep Cyril.

[web2py] Re: ADVOCACY: every single other Python program ever written uses imports?

2011-01-09 Thread pbreit
So I guess the question remains: is Web2py suitable for large, public web sites or does it max out as a rapid prototyper and smaller intranet type sites?

Re: [web2py] Re: ADVOCACY: every single other Python program ever written uses imports?

2011-01-09 Thread pbreit
I don't buy the problem with integrating enterprise systems. Components should be more loosely coupled. I do wonder about the balance between the features that make Web2py great for rapid prototyping vs what you would need to do in the real world. But it seems to me that the productivity

[web2py] Re: ADVOCACY: every single other Python program ever written uses imports?

2011-01-09 Thread pbreit
Interesting points. One thing I don't understand is the objection to the web IDE since it is 100% optional. Could it be presented differently so that people understand that instantly? I like the commitment to backwards compatibility. Are there any good examples of things that would be worth

[web2py] Re: ADVOCACY: every single other Python program ever written uses imports?

2011-01-09 Thread pbreit
It might make sense to dropt enterprise from the slogan. For one, I don't think businesses care much about backwards compatibility. My experience in the enterprise was that vendors were constantly churning out non-backwards-compatibile updates and customers were routinely several versions

Re: [web2py] Re: Running PHP on top of Web2Py

2011-01-09 Thread pbreit
I'm late to the party here but my sense is that you'll be best off just moving everything over. You mentioned that it's a content site with not a lot of traffic any a moderate amount of content. Sounds to me like you would have a relatively easy time moving it over than trying to cobble

Re: [web2py] Re: BETA: new URL routing facility

2011-01-09 Thread pbreit
I'm a bit confused as well. Perhaps some more example would help. Also, I would agree that per-application routing should be the default. And further, the global routes file should be enabled by default and should provide the same routes as you currently get with a fresh install of Web2py

[web2py] Re: Apache, Wsgi problem

2011-01-09 Thread pbreit
I came to Web2py recently and I can definitely see how the promotion of Web2py in places like Reddit would rub people the wrong way. Much of the hostility seems related to how Web2py is promoted, not to its technical merits.

[web2py] Re: Inserting additional fields in crud

2011-01-10 Thread pbreit
Did you check out SQLFORM.factory? http://web2py.com/book/default/chapter/07#SQLFORM.factory I'd highly recommend using Web2py's built-in user functions, at least initially. It includes all the basic user functions. Then you can focus on your application and come back to user auth later if you

Re: [web2py] Re: BETA: new URL routing facility

2011-01-10 Thread pbreit
As usual, there's more to it than I first imagined! To overcome the issue of routes being overwritten with an update, could there be a routes_default.py that ships with Web2py and can be overridden by routes.py in the same directory? Not super important. I envision something like (pseudocode):

Re: [web2py] Problems with ssh tunnel to run cherokee-admin and configure web2py

2011-01-10 Thread pbreit
I'm not sure why '-N' would be necessary. I don't seem to need it on RackSpace Cloud Ubuntu 10.04. The '-b' flag defeats the purpose. '-b' enables you to connect to Cherokee admin over any port (ie, http://173.230.137.80/admin). Omitting '-b' is what requires tunneling through localhost which

Re: [web2py] Gzip compression of javascript to speed up website

2011-01-10 Thread pbreit
Also, for Jquery: http://code.google.com/apis/libraries/devguide.html#jquery

[web2py] Re: Help with cron

2011-01-10 Thread pbreit
Fixed this (no .py) but still not working: cron/crontab: #run every 2 minutes */2 * * * * root *cron/release_pending_items I've also tried: cron/crontab: #run every 2 minutes */2 * * * * root *applications/myapp/cron/release_pending_items.py Is there any way to determine if cron is functioning?

[web2py] Re: Help with cron

2011-01-10 Thread pbreit
Ah, it's working! Sorry for false alarm.

Re: [web2py] (OT) Choosing a javascript mvc framework

2011-01-11 Thread pbreit
SproutCore, JavaScripMVC and TrimPath come up a lot.

[web2py] web2py fabric, pip, virtualenv, virtualenvwrappers deployment scripts

2011-01-11 Thread pbreit
Very interested but don't have anything to contribute yet. Currently using Cherokee server, FWIW. However Cherokee doesn't seem well-suited to automated deployment.

[web2py] Re: Error using setup-web2py-ubuntu.sh on Linode

2011-01-12 Thread pbreit
There's a chance that this is just a warning that you don't necessarily need to worry about. How are you accessing admin? Make sure you access it either with https or localhost.

Re: [web2py] new router

2011-01-12 Thread pbreit
Could it be caught with a 404 and routed somewhere?

[web2py] Re: Why the need of return dict() in controller?

2011-01-13 Thread pbreit
Wait, so are you saying that instead of return dict(items=items, blah=blah, etc) we can just use return locals() on most or all controllers? What's the downside, memory? Implicitness?

[web2py] Recommended links in web2py

2011-01-15 Thread pbreit
Recommendation engines are relatively difficult to build. I think you are on the right track starting with some simple, manual recommendations. You might also look at something like Easyrec.

[web2py] Re: account for each user

2011-01-15 Thread pbreit
I may not understand either. The user authentication functionality is automatically provided by web2py scaffolding. I would suggest using it without modifications until you run into limitations.

[web2py] Re: account for each user

2011-01-15 Thread pbreit
Hmm...still not quite sure what you're looking for. It's unlikely you want separate tables for separate users. By default, users cannot access records of other users. The built-in Web2py Access Control features may already do what you are looking for.

Re: [web2py] social network idea

2011-01-17 Thread pbreit
With delicious possibly going away there could be an opportunity. Just add the distance component.

[web2py] Re: regarding social networking...

2011-01-17 Thread pbreit
Check out Micromobs.

[web2py] Re: reply-to setting in Mail()

2011-01-18 Thread pbreit
What's the best way to file doc bugs? reply-to should certainly be documented in the book. And mail should probably be covered elsewhere in the book. Access Control was not where I expected it to be discussed.

[web2py] Re: account for each user

2011-01-18 Thread pbreit
I would suggest starting over from scratch and using Web2py's Access Control features as they come by default as much as possible. Once you are comfortable with how they work, you can think about customizing them. I think your code should be something like this: ==model==

[web2py] Re: Use the source, Luca

2011-01-18 Thread pbreit
Probably any additional documentation is a good thing. I personally like more practical information. My favorite framework documentation is probably CodeIgniter.

[web2py] Re: Use the source, Luca

2011-01-18 Thread pbreit
I hate to say it but I think the biggest problem is the Book. Don't get me wrong, the Book is very well written and has excellent content. But it's too much like a book and too little like online documentation. I also think the Overview might benefit from being the creation of one simple app,

Re: [web2py] Re: DRY conception

2011-01-18 Thread pbreit
For starters, I wouldn't get so hung up on DRY. Are the pages you are creating very nearly identical but with different data sets? Jonathan's suggestion sounds good: http://app/default/show/t http://app/default/show/tablenamerips http://app/default/show/p http://app/default/show/tablenameersons

[web2py] Re: step-by step instructions installing web2py on a CentOS server with cPanel installed

2011-01-21 Thread pbreit
Do you have ssh access? Perhaps try the Ubuntu setup script: http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh Even if you don't use the script, you can look at the individual commands. What host are you on? Does it provide any instructions for running Python or

[web2py] Re: web2pyslices migration

2011-01-21 Thread pbreit
Is there any web2py-based wiki software that would work? Seems to me a simple wiki site with aggressive administration would be best. Check Rails or Django for examples. I rarely find the voting very helpful.

[web2py] Re: article on django vs web2py

2011-01-21 Thread pbreit
Nice writeup. I put it on Reddit.

  1   2   3   4   5   6   7   8   9   10   >