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.
I love the commitment to backwards compatibility but a security issue
warrants a fix.
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
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
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
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).
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.
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
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
It should be:
modules/checkrole.py
and:
role=local_import('checkrole')
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
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.
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.
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.
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
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.
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
The disadvantages of GPL are somewhat clear.
Are there any advantages of GPL (with respect to frameworks)?
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.
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.
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.
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
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
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 =
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.
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.
Tips on storing user information? Best to put it in auth_user or separate
table? (ie: address, DOB, email preferences, etc).
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()
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
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.
Anthony, thanks for keeping your posts reasonable and considerate.
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
Here's one:
https://groups.google.com/d/topic/web2py/mH5Toup0vwk/discussion
+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
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
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.
Oops: also very similar to Ivan's instructions.
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.
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))
and uploads/* ?
It would be great to see some polished core apps like Forums, CMS and Blog.
This project is cool:
https://github.com/berk/tr8n
I wonder if a NoSQL DB like Mongo or Couch would work?
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
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?
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
Might check here:
http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware?tm=2
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.
Could be an interesting deployment option for
Web2py: http://www.dotcloud.com/
I added instructions for SSL:
http://web2pyslices.com/main/slices/take_slice/110
Seems to work OK.
Can you look at the db.pictures.word field using a SQLite browser to see if
there's any corruption or the wrong type?
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
Bjoern: a screamingly fast Python WSGI server written in C
https://github.com/jonashaag/bjoern
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
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,
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.
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
Definitely suggest running through chapter 3 of the book (and all chapters if
possible).
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
Does anyone here use Fabric? I'm going to take a look in the next few days.
Cool!
Are you sung the URL() helper function? It should take care of all of the
encoding. What does your code look like?
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?
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.
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.
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.
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.
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
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.
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?
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
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
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
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
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
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.
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
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):
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
Also, for Jquery:
http://code.google.com/apis/libraries/devguide.html#jquery
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?
Ah, it's working! Sorry for false alarm.
SproutCore, JavaScripMVC and TrimPath come up a lot.
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.
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.
Could it be caught with a 404 and routed somewhere?
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?
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.
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.
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.
With delicious possibly going away there could be an opportunity. Just add the
distance component.
Check out Micromobs.
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.
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==
Probably any additional documentation is a good thing. I personally like
more practical information. My favorite framework documentation is probably
CodeIgniter.
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,
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
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
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.
Nice writeup. I put it on Reddit.
1 - 100 of 1988 matches
Mail list logo