Given that I've thought a bit about this not too long ago[1], I'll pipe in with my little bit of philosophy, along with some advice on the topic at hand.
Exceptions are, by definition, exceptional. They defy the rule. That could mean errors, but it could also mean any other situation that a particular rule doesn't account for. Ultimately, you can only define exceptions with regard to the rules they defy, and the rules followed by a piece of code are dictated entirely by the developer of that code. If you don't want your flow to accommodate a situation, you're welcome to raise an exception and have other code handle that case. However, in the case of Django, the framework itself can't possibly accommodate everyone's idea of how rules should be written. Instead, it has to take a middle-of-the-road approach, trying to cover the most common situations, while allowing other situations to be handled easily. Clearly having an exception for redirects won't be necessary (or even good) for most Django users, so it's not something that will make it into the framework itself. Especially since, as has already been mentioned on this thread, it's quite possible to accomplish with middleware. If, however, you'd like to see the existing HTTP exceptions refactored in such a way that you could subclass them to create a redirecting exception without the middleware, that's an entirely separate issue, and one that would probably be better received. It still might not make it into trunk, but I would think that it would be a much better suggestion than "I'm doing non-standard practice X, can it be added to Django so I can save myself a dozen (or less!) lines of code?" I'd recommend creating a ticket for generalizing HTTP exceptions so that the exception class can dictate what response gets sent. But don't expect me to implement it. -Gul [1] http://gulopine.gamemusic.org/2007/nov/21/except-the-unexpected/ (Sorry if the page loads slowly or not at all, the server's having issues) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---