Django, being nice, comprehensive, and well-supported, is sometimes too much for a small web application. Django wants you to play by your own rules from the start, you have to avoid things like the dashboard and the admin panel if you don't need them. It is also easier, with Django, to follow its project layout even if it is too complicated for a simple application.
So-called microarchitectures may work best for your small application. They are built on the opposite principle: now use a minimal set of functions, add as many as you need.
Flask is based on the Werkzeug WSGI library and the Jinja2 template (the latter can be switched), widely documented (with a note on virtualenv and materials ) and is well suited for small and large applications. It comes complete with a dev auto-reboot server (no need for Apache on your development machine) and an interactive debugger with Werkzeug support. Extensions exist for things like HTML forms and the ORM database .
Bottle is no less than a microcard consisting of 1 (one) file, including the dev server, can receive. Move it to the project folder and start hacking. The built-in SimpleTemplate template engine can be switched, but the development server is more fragile than Flask. The documentation is less complete, and, in my opinion, all this is less polished and convenient, like Flask.
In both cases, you use the dev server locally, and then deploy using WSGI, the server interface for Python web applications that support both frameworks. There are many ways to deploy a WSGI application; Apache mod_wsgi is one of the most popular.
I would go completely with Flask if only one addiction (Bottle) was not better than three (Flask, Jinja2 and Werkzeug).
(There are many other frameworks, so wait until their users come and talk about them. I suggest avoiding web.py : it works, but it is full of magic and inelegant compared to Flask or Bottle.)
Helgi
source share