On Wed, 2008-12-24 at 20:41 -0800, Jeff Hammerbacher wrote:
> Hey,
> 
> I'm building a web applications that pulls all of its data from an
> external web service rather than from a managed database. The
> documentation for the model layer in Django seems to assume you're
> retrieving application information from a database. Can anyone point
> me to a resource that describes best practices for putting external
> API accesses into the model layer?

The best resource is the code. You're essentially saying that you're
going to replace the Queryset class with your own code that understands
the same API but retrieves the data in an entirely different fashion. So
each of your models will always use custom managers to return your
QuerySet replacement.

In some distant future, this might all be a bit more automatic -- I have
a very long-term dream to make it possible to run unchanged Django code
on Google App Engine, primarily -- but that is nothing beyond some
planning in my head at the moment.

Realise that what you're trying to do is essentially replacing Django's
ORM, so you're at the point of writing your own version of that.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to