Django vs web2py for a beginner developer

RubyGladiator picture RubyGladiator · Dec 4, 2010 · Viewed 62.3k times · Source

Which of these two frameworks is better suited to a developer with 11 months experience. I have decided to learn python for my server side coding and wanted to know which of these would be better suited for someone at my skill level. I have just spent a few days playing around with web2py and really like it and i am wondering if Django offers something more that i am missing out on?

PS. UPDATE: Thank you all for the wonderful input, after buying three django books and going through a few small projects/tutorials for both django and web2py, i have settled on web2py. This is a wonderful framework, which makes web development really fun for a newbe. I would recommend all newbies to learn this framework as it will be mainstream in the future. Django is also a wonderful framework but web2py is just better in my limited experience opinion.

Answer

mdipierro picture mdipierro · Dec 4, 2010

(disclaimer: I am the project leader for web2py)

Django has been around 5 years longer than web2py therefore it has more users and more applications to show off. Django has what they call "admin" which is not the same as web2py's "admin" but more like web2py's "appadmin". Django's "admin" is better and more customizable than web2py's "appadmin". Django does not have the equivalent of web2py's "admin". (sorry for the name confusion).

web2py is more compact and has more functionality out of the box (more supported databases, web based IDE, ticketing system, runs on GAE without patches, multiple login methods, role based access control, web based translation interface, support for multiple database connections, distributed transactions, and more).

For me the most important functionality of web2py is automatic migrations. Django does not provide them out of the box.

For web2py long term backward compatibility is a primary goal, together with security. Django is comparable to web2py in terms of security (except that web2py had CSRF prevention and default escaping in templates before they did) but Django broke backward compatibility when 1.0 was released. web2py never did since Oct 2007.

To me the web2py syntax is more natural:

 db(db.tablename.fieldname <= value).select() # web2py
 Tablename.objects.filter(fieldname__lt=value) # Django

I am not aware of any functionality of web2py that is not present in Django. I have asked that question many times because, if there is, we want to add it to web2py, but I have not yet received a satisfactory answer.

Of course there are things that we both do but differently. Django follows "explicit is better than implicit". web2py does not and instead follows "everything should have a default behavior". I believe this makes web2py code and configuration more compact.

Anyway, whatever you choose, they are both good solid web frameworks and there are fewer similarities than differences. Django's developers are very smart people.

The web2py community is very friendly. As an experiment, try asking a question on the web2py google group and on the Django group.