django-oscar / django-oscar-api

RESTful JSON API for django-oscar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Overwrite Oscar API URL ?

shamszzazzo opened this issue · comments

commented

Maybe it's a silly question but which way is best to overwrite oscar API URLs?
I mean I want to create a new url.py inside oscar_api(OSCARAPI_OVERRIDE_MODULES = ["oscar_api"]).

I need to change login registration and add to the cart(basket) from my custom API view and keep the product from oscar_api.

You currently can't overrride the url's by placing a new urls.py in you OSCARAPI_OVERRIDE_MODULES path. This only works for the views and classes which are retrieved with get_api_class.

So you need to override the views you mention (as those can be overridden). This is explained in the documentation or register your own urls like any Django app.