Skip to content

ladrua/django-oscar-api-vue-storefront

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Oscar API for Vue-Storefront

This package provides a RESTful API for django-oscar adapted to vue-storefront.

Usage

Still under development, no release yet.

Notes

Documentation we are following for the api.

Better definition of required fields

Data Definitions

Developing

  1. To start using git clone then cd into directory and run pip install -e .

2. Add oscar_vue_api to INSTALLED_APPS:

INSTALLED_APPS = [
    ....
    'rest_framework',
    'corsheaders',
    'oscar_vue_api',
]
MIDDLEWARE = (
    'corsheaders.middleware.CorsMiddleware',
    #...
)
CORS_ORIGIN_ALLOW_ALL = True
REST_FRAMEWORK = {
 'DEFAULT_AUTHENTICATION_CLASSES': (
     ....
     'oscar_vue_api.authentication.TokenAuthSupportQueryString',
 )
}

3. Import the api urls to your projects urls.py file:

from oscar_vue_api.app import application as api

urlpatterns = [
    ....
    url(r'^vsbridge/', api.urls),
]

Notes

Export exsisting categories and products to elasticsearch: ./manage.py oav_export

Delete all ElasticSearch entries curl -X DELETE 'http://localhost:9200/_all'

About

API layer for django-oscar to vue-storefront

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages