Archive

Posts Tagged ‘django’

Setting up Django 1.3 + NGinx 1.0.5 + Green Unicorn 0.13 in an Ubuntu 11.10 EC2 instance

December 27th, 2011 23 comments

Django has become the de-facto web framework for Python. Although, since Django just specializes in dynamic content, you have to combine it (at least in production) with an HTTP server to serve static content such as css, javascript files and images files. In the past, the communication protocol between Python web applications was CGI, FastCGI or mod_python. But after PEP-333 was accepted the faster and more efficient WSGI became the standard.

Green Unicorn is a Python WSGI HTTP Server for UNIX. Its combination with the high performance HTTP server NGinx is gaining lot of momentum in the Python community.

From “man gunicorn”…

Green Unicorn (gunicorn) is an HTTP/WSGI server designed to serve
fast clients or sleepy applications. That is to say; behind a
buffering front-end server such as nginx or lighttpd.

 

We are describing here how to combine a Django application with Green Unicorn and Nginx within a pristine EC2 Ubuntu 11.10 image.
Read more…

Open ID login with Google App Engine + Django

June 16th, 2010 2 comments

Hi!, this a clean and simple sample test of a web app using Open ID login in Google App Engine + Django.

http://bitbucket.org/deccico/djangoappengine-openid-sample

This application combines with slight modifications, the following projects:

  • Djangoappengine: http://www.allbuttonspressed.com/projects/djangoappengine
  • Django-nonrel http://www.allbuttonspressed.com/projects/django-nonrel – Changes to Text fields to Chars, due to lack of filtering support in the firsts
  • OpenID integration: https://launchpad.net/django-openid-auth – Small change in the login view template, in order to work with standard Cross site forgery protection
  • Python OpenID library: http://github.com/openid/python-openid

Just remember to add {% csrf_token %} within the login form of your own view.

enjoy!