David Parker wrote:
> verses = Verse.objects.filter(version__iexact=version,
> book__iexact=book, chapter__iexact=chapter, verse__iexact=verse)
> else:
> logging.debug("chapter: " + chapter)
> logging.debug("verse : " + verse)
> logging.debug("verse2 : " + verse2)
> Now, is this the standard way of doing this kind of thing? Or should
> I break the method up into different methods and have several
> different url patterns? Thanks!
Thou shalt write developer tests. ("Unit tests".)
Each of your temporary debug statements should instead be permanent
assert_equal() statements.
Tested code is, perforce, highly decoupled, so that tests can easily
reach any situation. So Test-Driven Development tends to obviate
questions about design - the best design is the one that works under
pressure from both test cases and the real application.
--
Phlip
http://twitter.com/Pen_Bird
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.