Engineering USU’s Django Hosting Infrastructure

In: Open Source| Utah State University

2009

Django

I am always looking for ways to speed up development and automate processes that I do over and over. In particular, I try to engineer systems that help avoid the usual headaches associated with deployment processes because they are usually very convoluted and error-prone.

To this end, I engineered Utah State University’s Django hosting infrastructure for instant deployment of new sites, use of modular common code, easy inline documentation with automatic HTML generation, and fast updates to live sites.

Highlights

Some highlights of the system include:

  • Instant deployment of new sites by simply dropping a folder of a certain structure on to a network share. No configuration, no Apache restart required.
  • A common set of modular Django apps and USU utilities that can be used by any project, including helpers for thread-safe programming, SQL shortcuts, and custom middleware.
  • Easy and secure integration of USU’s authentication and identity webservices.
  • Ability to automatically force an entire site to use SSL with one configuration option. Again, no web server restart required.
  • Fabric scripts to streamline deployment to a one-step process.
  • Established standardized documentation structure, including inline code documentation that is automagically published as HTML using Sphnix for other team members to view.

See example Apache VirtualHost configuration using mod_wsgi.

I am a constant advocate for automating repeated processes and streamlining the development workflow—simply because it gives me more time for solving other issues and helps keep development fun. Engineering the USU Django infrastructure in this way will hopefully make web development at USU even easier going forward.

Extending Django Forms with django-dataforms

django-dataformsI was also involved in the creation of an open source project that extends the Django forms API, allowing for dynamic form creation without any schema changes or hard-coded models required.

As many projects done by the USU Programming and Design team are very form-intensive, creating this project helped to streamline the development and maintenance of those forms. In order to contribute to the community, we decided to open source the application for others to benefit as well.

See the open source project for django-dataforms.

Comment Form