Using Wagtail as admin for django-oscar.
NB: This is currently in beta
The overal goal of this project is to be able to administer all aspects of django-oscar from the wagtail admin.
Features:
- Add/Edit Products.
- Add/Edit Categories.
- View Orders.
- Add/Edit Product Classes.
- Add/Edit Partners.
- Add/Edit StockRecords.
Todo:
- Manage Customers.
- Better handling of StockRecords.
- Add a
ProductChooser
to use in Pages.
-
pip install wagtail-shop
-
Add
from oscar.defaults import *
to your settings.py file. -
Import and append
get_core_apps()
to your INSTALLED_APPS, and add required packages like this:
from wagtail_shop import get_core_apps
INSTALLED_APPS = [
...
'django.contrib.sites',
'django.contrib.flatpages',
'wagtail.contrib.routable_page',
'wagtail.contrib.modeladmin',
'widget_tweaks',
] + get_core_apps()
-
Add
oscar.apps.basket.middleware.BasketMiddleware
to your MIDDLEWARE -
Run migrations
./manage.py migrate
-
Before you can add any products you must create at least one
Product Type
and add onePartner
in the Wagtail admin interface.
You should now be able to follow the django-oscar documentation for further details. There are a few exceptions:
-
Instead of using
./manage.py oscar_fork_app
when forking an app, use./manage.py wagtail_shop_fork_app
. -
If setting up with the default templates provided with django-oscar, the images won't work, and you would have to update the image tags in the template to use Wagtails image tags