Installation
A guide on how to install Salesman.
1. Install using pip
pip install django-salesman
Note
Optionally install the Pygments library for a nicer code display in admin.
You can use the command pip install django-salesman[pygments]
2. Add to your settings.py
INSTALLED_APPS = [
...
'salesman.core',
'salesman.basket',
'salesman.checkout',
'salesman.orders',
'salesman.admin',
'rest_framework',
]
3. Add neccesary urls in urls.py
from django.urls import include, path
urlpatterns = [
...
path('api/', include('salesman.urls')),
]
4. Run the migrations and start server
python manage.py migrate
python manage.py runserver
Tip
It is recommended to configure and setup all Salesman models as swappable even if it’s not neccesary at the begining. This will future proof your application in case you wish to add it later. This has to be done before the initial migrations are created. See Swappable models.
Done! Salesman is installed and you can navigate the API by going to http://localhost:8000/api/
.
But since no product types are configured there is nothing to be added to the basket yet.