Archive

Archive for the ‘Web Development’ Category

Automatic URL discovery for Django

May 13th, 2009 zeraien No comments

Have you ever felt that you were dreading the thought of creating a new django app because you didn’t feel like doing the urlconfs or copy and pasting all those annoying view helper methods?

Or maybe you didn’t like having to apply the same decorator to every view function?

Maybe even, your views.py files grew so large that they became hard to maintain, and splitting them up seemed like a hastle?

Well, the above problems and more are solved with the django url framework, which I wrote to emulate some of the functionality of Ruby on Rails.

A quick and dirty explanation is that you create controlller files with a class that extends the ActionController, and all instance methods of that controller are automatically made into URLs.

Included the the ActionController is all the functionality that you may need, such as a flash inter-request messaging system, redirects and action/controller based url resolution, filters to run before and after each view and more. Look it up on the google code page and give it a whirl.