Django = old
Web2py = new
Anything Django does, web2py does better. This is because web2py was made long after django and has learned from Django's mistakes, though it makes all new mistakes ;)
Main difference, and what is keeping me in web2py:
Django has incredible documentation...web2py is so intuitive that it doesn't need as much...HOWEVER! I have found that the Django documentation is applicable to web2py, for the most part. If you spend a day and read the django book (Ch 1-7), you will get the idea about how that is true. So in a way, saying Django is better documented is asinine. Also, note that any framework that goes around talking about the volumes of documentation for it as a good thing...be concerned... documentation is good, not needing any to begin with = better. Web2py's existing documentation more than meets the needs of 90% of the users. The remaining 10% have to go take a look at the framework library code (not as much of it as Django, and not as scary). Also, if you get to the point where you are spending more than 30% of your time going through library code, it is time to move away from frameworks and move towards collections of libraries (such as pylons). At that point it means you are not doing anything that web frameworks were designed to handle...
SQLForm in Django is TextModel. Once you create a form using TextModel (=SQLForm). Good luck trying to change the CSS of a single input field! In web2py you just do form.element(), no such thing in Django. You have to go through "widget()", but to get to widget, you have to first go through the input field type, etc...
Also, manual DB migration...change schema? Sorry...have to either download and install a separate migration app (South), or have to do it manually in your DB console.
Lastly, no out of the box support for multiple DBs... think hoops...
In other words... with Django... hope you like jumping and hoops.
If you want to really take a jump forward from web2py, try Pylons...seriously...
Biggest drawback of web2py is its age and smaller code base...this is not unreasonable though, considering Django is like the first python web framework to implement RAILS style RAD ideas and is like twice the age of web2py. Web2py is still in its early adopter portion of its life...Django is in the beyond critical mass part coming up to decline... web2py should reach critical mass any day now in the next 2 years, I predict.
CONCLUSION
Spend a day, read the django book (ch 1-7), and read the Pylons book (Part 1), and then think about why you are using a framework to begin with. For me it was to get as much done as quickly as possible, and without looking up documentation 30% the time.
Web2py meets the above needs for me.
db
database indb.py
, as suggested by tutorial, then globaldb
variable will be accessible inmodels.py
and eg.people.py
, but not incontacts.py
). Just learn to architect your code properly again, not the way web2py works, but the way Django code works. – Empty