What should I use - Mako or Django?

I am creating a website that sends users messages about the release of a movie or a computer game. It's not too complicated - users can register, select movies / music or genre and save settings. When a movie / music is released, it sends a message to the user. Some other features too, but this is a jyst.

Now I have worked a bit with Python, but mainly in the field of console applications. For the web: what should I use, the Django web framework or the mako template?

It seems I can not decide between them. :(

thanks

+4
source share
3 answers

Django Because it takes care of all the bits and pieces (matching URLs, processing requests, etc.) and also hides access to the database from you. If you want, you can use SQLite DB, so there is no need for MysQL or other "correct" databases. If you use only the template engine, you will have to take care of the HTTP level yourself. And the DB material also.

+2
source

Ask yourself this question: what do you get from this project? What do you want to know?

If you want to know the nuts and bolts of a web server in a difficult way: design your own web framework using Mako and other useful building blocks as needed. As @pulegium says, you will need to choose how to handle the HTTP level and the database level.

If you want to quickly and quickly launch a site, use Django. It is well documented and is an all-in-one solution. I found my admin interface a real killer. What Django does not provide is deployment tools; you will have to write a script or use a deployment solution to update the code on the server.

If you want to be more lazy: use the Google App Engine. (With the tacit agreement to follow BigTable rules, which is very different from popular relational database systems.) GAE takes care of installing and deploying your web application, registration, version control and other materials that you need to take care of when you start the site. You can also use Django for GAE.

+4
source

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

If you are a python whistle ... definitely pick Mako . I find django to be disappointing, as the syntax does not allow me to make really good pythonic code. I'm going to throw Mako into the appengine project before it's too late!

0
source

Source: https://habr.com/ru/post/1305784/


All Articles