Skip to content

Commit

Permalink
Improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
timsavage committed Oct 3, 2023
1 parent 93ee755 commit 743d98e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Oscar Odin

Mapping of Oscar eCommerce models to Odin resources.

## Installation

To install add `oscar_odin` to your installed apps

## Usage

```python
from oscar.core.loading import get_model
from oscar_odin.mappings import catalogue

Product = get_model("catalogue", "Product")

# Map a product to a resource.
product = Product.objects.get(id=1)
product_resource = catalogue.product_to_resource(product)
```

0 comments on commit 743d98e

Please sign in to comment.