From 743d98e7376cfa9e67c70b2cfa2220bf91a5b4b7 Mon Sep 17 00:00:00 2001 From: Tim Savage Date: Tue, 3 Oct 2023 18:29:46 +1100 Subject: [PATCH] Improve readme --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index b01fa85..a89c149 100644 --- a/README.md +++ b/README.md @@ -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) +```