tomchristie/django-rest-framework — pull request #136 by btimby (2012-01-19 20:11:16+00:00)
Title: Docstring support for HTTP methods, refactorization of get_name/get_description.

My first pass was unsuccessful, I simply did away with the description module and replaced all references to it with calls to view.get_name()/view.get_description().

However, this approach won't work since breadcrumbs gets the name of non-class views, this yields an AttributeError: 'function' object has no attribute 'get_name'

This implementation leaves the description module intact, however, I moved the View class related logic into the View.get_name and View.get_description methods. Now, for a View class, these methods will be used if available.

I also reinstated the unit tests to verify that get_name and get_description allow the name/description to be explicitly set.

I did NOT run the test suite, I was received an error when I tried. I did however, verify that the changes work on my current API project, so I have high hopes that everything is correct.