• HTTP
• routing
• templates
• configuration
• ORM
web framework
we
Slide 5
Slide 5 text
• HTTP
• routing
• templates
• configuration
• ORM
web framework
but
Slide 6
Slide 6 text
• few lines of code
• few dependencies
• small memory footprint
• application in a single file
• framework in a single file
„micro” web framework
additional
Slide 7
Slide 7 text
• few lines of code
• few dependencies
• small memory footprint
• application in a single file
• framework in a single file
„micro” web framework
this
Slide 8
Slide 8 text
„micro” web framework
• Flask
• Bottle
• web.py
single
Slide 9
Slide 9 text
„micro” web framework
• Flask
• Bottle
• web.py
• Django
single
from django.conf import settings
!
if not settings.configured:
settings.configure(DEBUG=True,
DATABASES={},
ROOT_URLCONF='app',
INSTALLED_APPS=[],
MIDDLEWARE_CLASSES=[],
TEMPLATE_DIRS=['templates'])
put
Slide 18
Slide 18 text
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
!
if __name__ == "__main__":
import sys
from django.core import management
management.execute_from_command_line(sys.argv)
create
Slide 19
Slide 19 text
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
!
if __name__ == "__main__":
import sys
from django.core import management
management.execute_from_command_line(sys.argv)
NOTE:
Slide 20
Slide 20 text
56 LOC
17 Django
„boilerplate”,
Slide 21
Slide 21 text
• few lines of code ✔
• few dependencies ✔
• small memory footprint ✔
• application in a single file ✔
• framework in a single file
„micro” web framework
look