a django based miniframework, inspired by sinatra
Project description
(‘What is it?n===========nnDjango is awesome, but starting a new project in it is a pain. importd isninspired from ruby's sinatra. Hello world django project:nn.. code-block:: pythonnn from importd import dn d(DEBUG=True)nn @d(“/”)n def idx(request):n return “index.html” nn @d(“/post/<int:post_id”>/”)n def post(request, post_id):n return “post.html”, {“post_id”: post_id}nnTo run it:nn.. code::nn $ python foo.pynnThis will start the debug server. nnTo run it in production:nn.. code::nn $ gunicorn foo:dnnAn example app: https://github.com/amitu/importd/blob/master/foo.pynnFeaturesn========nn * fully compatible with djangon * supports smarturlsn * most of regularly used django functions and classes available in d.n namespace, eg d.HttpResponse, d.render_to_response, d.get_object_or_404 etcn * automatically maps “templates” folder in foo.py directory to serve templatesn * automatically maps “static” folder in foo.py to serve static contentn * management commands still available: $ python foo.py shelln * wsgi compliantn * gunicorn supportn * works seamlessly with fhurl (http://packages.python.org/fhurl/)nnInstallationn============nn.. code::nn $ easy_install importdnnDocumentationn=============nndocs: http://amitu.com/importd/nnToDo/Known Issuesn=================nn * figure our whats going on with double importsn * figure out whats going on when gunicorn exitsn’,)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.