Skip to content

Commit

Permalink
Update outofthebox.rst
Browse files Browse the repository at this point in the history
Updated outdated installation instructions
  • Loading branch information
maerteijn committed Dec 21, 2020
1 parent 4f4e008 commit 8ac23a0
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions docs/source/topics/outofthebox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,16 @@ To use the oscarapi application in an oscar ecommerce site without overriding or

1. Install it (see :ref:`django-oscar-api-installation`)
2. Add ``rest_framework`` and ``oscarapi`` to your INSTALLED_APPS section in ``settings.py``
3. Add the application's urls to your own app's `url.py`::
3. Add the application's urls to your urlconf

from django.conf.urls import url
.. code-block:: python
from oscarapi.app import application as api
from django.urls import include
urlpatterns = (
# all the things you already have
url(r'^oscarapi/', api.urls),
)

or with the newer Django 2.x way::

from django.urls import path

from oscarapi.app import application as api

urlpatterns = (
# all the things you already have
path('oscarapi/', api.urls),
)
urlpatterns = (
# all the things you already have
path("api/", include("oscarapi.urls")),
)
4. Apply migrations::

Expand Down

0 comments on commit 8ac23a0

Please sign in to comment.