InfoQ

News

Microsoft shows Django running on IronPython

Posted by Robert Bazinet on Mar 28, 2008

Community
.NET
Topics
Dynamic Languages
Tags
Microsoft ,
IronPython ,
Django ,
Python

Microsoft recently had the opportunity to show off some of the progress the Dynamic Language Runtime (DLR) team has made when they gave a demo of Django running on IronPython.  The accomplishment was shown during PyCon 2008 in Chicago, March 14-16, 2008.

This is a huge step for the team, to be able to run a widely-used framework, such as Django, on a dynamic language running on the .NET Framework.  Django is a mature web application framework written for Python and intended to create applications very fast with a clean and pragmatic design.  It is a framework developers normally use on Linux or some other platform where Apache and Python are found but this demo showed Django running on Microsoft's DLR, the IronPython language and SQL Server 2005.

Dino Viehland and Jim Hugunin provided the talk at PyCon titled "IronPython: The Road Ahead", summarized nicely by Brian Luft of the blog Unbracketed.  Dino's demo took at bit to get running:

For the demo, Dino showed us the latest Django release (v0.96) running on IronPython 2.0 Beta 1 (which was just released on Friday). He did have to make a few patches to get the demo running. Naturally they chose to use MS SQL Server for their database and Django does not support that database by default. A handful of one or two line changes to the Django source got it working for IronPython. Additionally, there was another one line change or two that had to do with handling unicode properly. He noted that with the trunk of Django that may no longer be an issue since Django now supports unicode throughout.

As for the demo itself:

Dion demonstrated the simple poll application that we're all familiar with from the Django official tutorials. He started with the vanilla version as would result from following the tutorials and then followed it up with a spruced-up version that included some video and image backgrounds, nice UI effects, and rich-client dynamic updating of the voting results. All of this was of course accomplished with a minimal amount of Python code

Dino explains the first step in getting Django running was getting a database provider that would run on .NET and work with Django.  He describes PEP 249 as the Python Database API Specification which needs to be followed to create the basic database provider used.

IronPython v2.0 beta 1, released this past week, runs on the DLR is available on CodePlex.  Additional information about Django can be found at the Django Project.

No comments

Watch Thread Reply

Educational Content

Brian Marick on 4 Challenges and 5 Guiding Values of Agile Software Development

Brian Marick takes us through a quick tour of the most important values and challenges to adopting Agile successfully (they aren't the typical challenges and values we hear in the community).

Are You a Software Architect?

The line between development and architecture is tricky. Does it exist at all? Is an ivory tower actually needed? There's a balance in the middle, but how do you move from developer to architect?

Agile – A Way of Life and Pragmatic Use of Authority

The word 'authority' sometimes produces an allergic response in hard-line agilists. Freedom and authority – both are bad if misused and both are good if used in right spirit for a noble cause.

Getting Started with Grails, Second Edition

"Getting Started with Grails" brings you up to speed on this modern web framework. Companies as varied as LinkedIn, Wired, and Taco Bell are all using Grails. Are you ready to get started as well?

Using ITIL V3 as a Foundation for SOA Governance

Those familiar with only ITIL V2 often scoff at the thought that ITIL could serve as a governance framework for SOA. With ITIL V3, the focus of the framework shifted towards service-orientation.

Adrian Colyer on AspectJ, tc Server and dm Server

SpringSource CTO Adrian Colyer discusses AspectJ, SpringSource's dm Server and tc Server products, OSGi and Scrum.

Adam Wiggins on Heroku

Heroku's Adam Wiggins talks about Rails, Background Jobs, Add-Ons, Ruby, and how Heroku manages to work around Ruby's inefficiencies using Erlang and other languages.

SOA as an Architectural Pattern: Best Practices in Software Architecture

For Grady Booch the foundation of a good architecture is patterns, SOA being just one of many patterns. In this Second Life presentation, Booch attempts to bring more clarity on what architecture is.