Better HN
topnewbestaskshowjobs
Log inSign up

_stem

18 karma · joined Oct 27, 2014 (12y ago) · 2 submissions

Submissions

comment 12y ago · link · parent

You're right. Settings are not even necessary in my example, as we should be fine with defaults in most cases. The only lines you really need are these four:

  from django.conf import settings
  settings.configure(ROOT_URLCONF='polls')
  from django.core.wsgi import get_wsgi_application
  application = get_wsgi_application()
You lose some of the Django niceties (like being able to provide your own custom settings on the command-line) but flask doesn't have them anyway.

comment 12y ago · link · parent

For all people still thinking that Django is not "lean" or flexible enough for their next project, let me just leave this here: https://speakerdeck.com/mstepniowski/django-best-python-micr...

A single-file web application in Django: https://github.com/mstepniowski/microdjango/blob/master/poll...