David Larlet is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

david / django-roa http://welldev.org/

Turn your models into remote resources that you can access through Django's ORM. ROA stands for Resource Oriented Architecture.

Clone this repository (size: 579.8 KB): HTTPS / SSH
hg clone https://bitbucket.org/david/django-roa
hg clone ssh://hg@bitbucket.org/david/django-roa

Issues

#2 transactions

Reported by kmt

How would you support transactions though?

Status: new Responsible: nobody Type: enhancement Priority: major
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 David Larlet

    written

    Transactions' logic should be handled on the server side (vs client == django-roa), you can't think about REST like a database model.

  2. #2 Anonymous

    written

    Right. But since a model maps to a table and in REST it maps to a list of row-like resources, then this can't be used as a drop-in replacement. With relational models you handle transactions in Django because you potentially update multiple tables in one request. With django-roa, I suppose, you'd have to structure the data accordingly. For example with xml or json fields. And then it'd be up to the server (the resource provider) to take care of the transaction. Is that the idea?

  3. #3 David Larlet

    written

    • Changed type from bug to enhancement.

    Yes, exactly. Or create a Transaction resource but that's more tricky. There are a lot of articles on this topic.

    Do not hesitate to propose a generic solution to django-roa if you find something interesting.

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?