Here's a question that is probably divisive - why did Django decide to go
with Model/Template/View instead of Model/View/Controller? MVC just
conceptually makes so much more sense to me.

Anyhow, that's not the primary point of this posting...

Is there any way to implement some sort of pre and/or post-request
processing that runs across any request that comes through? Does this
already exist? Ideally I would use this to implement some sort of RESTful
interface(yes, I know about the Django REST interface
http://code.google.com/p/django-rest-interface/ but I don't like that it
seems to violate DRY by requiring you to write extremely similar code for
each of your models - and the fact that you have to define one url per view
type per model. If you had four view types
(XML, JSON, HTML, plaintext) and five models, things get messy and hard to
maintain quick!)

Either way, I am wondering if there is some sort of start/end method similar
to what other frameworks provide? At least in perl Catalyst I know that you
can define a global start and end method that are wrapped around any
request. I would use these methods to start developing my idea for a
genericized RESTful API that you can easily add any model to.

Thanks, Pythonistas!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to