agiliq/django-production-ready — pull request #5 by kailashnath (2011-11-24 14:01:42+00:00)
Title: Updated the design and naming conventions

Had to change the current implementation as it's against clean code design.

* Previously the code was using the functions documentation as a message to the user.
-> Documentation is supposed to communicate the intent of the code block to the programmer but not as an error message to the user. Never use doc strings for printing out a message to the user
* Filename was Tests, which did not convey what it actually meant. The code block under that class wasn't testing any thing it was returning the values which is against what the class name is
* Template checking mechanism was faulty
-> The code was using get_template which means it searches across all the template locations even django's default templates, hence when searched for 404.html it always returns True as 404.html exists with django, hence had to change the implementation

* Removed the text under 'handle' function as it isn't the appropriate place for it. It should have been placed in README file
* Modified the help text as previously it was too casual message and wasn't in style form with other manage.py commands help description.

The new patch sticks to the zen of clean code ! The code structure is self explanatory and very much testable. The class Validations is side effect free.