开发者

What should I use - Mako or Django?

开发者 https://www.devze.com 2022-12-25 15:27 出处:网络
I\'m making a website that mail users when a movie or a pc game has released. It isn开发者_StackOverflow\'t too complex - users can sign up, choose movies/music or a genre and save the settings. When

I'm making a website that mail users when a movie or a pc game has released. It isn开发者_StackOverflow't too complex - users can sign up, choose movies/music or a genre and save the settings. When the movie/music is released - it mails the user. Some other functionality too but this is the jist.

Now, I've been working with Python for a bit but mainly in the area of console apps. For web: what should I use, the web framework Django or the templating engine Mako?

I can't seem to decide between the two. :(

Thanks


Ask yourself this question: What are you getting out of this project? What do you want to learn?

If you want to know the nuts and bolts of a web server the hard way: concoct your own web framework using Mako and other useful building blocks as needed. As @pulegium says, you'll have to choose how to handle the HTTP layer and database layer.

If you want to get a website up and running quickly: do use Django. It's well documented and is an all-in-one solution. I've found its admin interface to be a real killer. What Django doesn't provide is tools for deployment; you'll have to write a script or use a deployment solution to update your code on the server.

If you want to be more lazy: use Google App Engine. (With the silent agreement to follow the rules of the BigTable, which is quite different from popular relational database systems.) GAE takes care of installation and deployment of your web app, logging, versioning and other stuffs you need to take care of when running a website. You can also use Django on GAE.


Django. Because it takes care for all bits and pieces (url mapping, request object handling etc) and hides the DB access from you as well. If you want you can use SQLite DB so no need for MysQL or other "proper" DBs. If you were using just template engine you'd have to take care of HTTP layer yourself. And the DB stuff as well.


I have used mako for some time and have also tried to get to grips with django in google appengine.

If you are a python whizz... definitely opt for Mako. I'm finding django frustrating as the syntax doesn't allow me to do really nice pythonic code. I'm going to drop Mako into my appengine project before it's too late!

0

精彩评论

暂无评论...
验证码 换一张
取 消