I was looking for something like rails activeresources

In app A, just a regular model

class Bar(models.Model):
    text = models.CharField(_('text'), max_length=140)

in app B

#ok i cant figure out any better name than RemoteModel atm
class Bar(models.RemoteModel):
   site = 'http://1.2.3.4/foo/bar


in some view:
Bar.objects.filter(....)
Bar.objects.get(pk=2).delete()
Bar(text='foo').save()
etc and it will perform http GET, POST, PUT, DELETE etc to 
http://1.2.3.4/foo/bar


Obviously, it will only work with relations that already is on app A,
this is mosly for denormalizing stuff to be able to scale in all
directions.



On 11 Juli, 12:35, "Emily Rodgers" <[EMAIL PROTECTED]> wrote:
> Also, what do you mean by 'a restful model backend instead of a database
> backend'?
>
> What are you trying to do? I have some ideas, but I may be barking up
> the wrong tree!!
>
>
>
> > -----Original Message-----
> > From: django-users@googlegroups.com
> > [mailto:[EMAIL PROTECTED] On Behalf Of lgr888999
> > Sent: 11 July 2008 11:10
> > To: Django users
> > Subject: Re: "remote models" with django?
>
> > nope different sites on different IPs
>
> > On 11 Juli, 11:44, "Emily Rodgers" <[EMAIL PROTECTED]> wrote:
> > > Are they in the same project?
>
> > > > -----Original Message-----
> > > > From: django-users@googlegroups.com
> > > > [mailto:[EMAIL PROTECTED] On Behalf Of lgr888999
> > > > Sent: 11 July 2008 10:33
> > > > To: Django users
> > > > Subject: "remote models" with django?
>
> > > > Lets say i have two django apps A and B. Lets say A has
> > some models,
> > > > Foo and Bar.
>
> > > > Now i know there are plenty of implementations to make
> > Foo and Bar
> > > > restfuly available via http but is there anything built
> > yet to make
> > > > Foo and Bar available as Models on B via http? Ie a restful model
> > > > backend instead of a database backend.
>
> --
> IMPORTANT NOTICE: The contents of this email and any attachments are 
> confidential and may also be privileged. If you are not the intended 
> recipient, please notify the sender immediately and do not disclose the 
> contents to any other person, use it for any purpose, or store or copy the 
> information in any medium.  Thank you.
--~--~---------~--~----~------------~-------~--~----~
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