Metadata-Version: 2.1
Name: mezzanine_cartridge_api
Version: 1.0.0
Summary: A REST Web API for Mezzanine CMS with the Cartridge e-commerce extension
Home-page: https://github.com/jackvz/mezzanine-cartridge-api
Author: Jack van Zyl
Author-email: jackvanzyl@icloud.com
License: UNKNOWN
Description: # Mezzanine API
        
        A REST Web API for the [Mezzanine content management system](http://mezzanine.jupo.org/) with the [Cartridge](http://cartridge.jupo.org/index.html) e-commerce extension.
        
        ## Features
        
        Web API endpoints for all Mezzanine objects, including sites, users, groups, pages, blog posts and settings, and Cartridge objects, including products, categories and orders.
        
        [Swagger-UI](https://swagger.io/tools/swagger-ui/) as development tool and documentation.
        
        Comes with [API key authentication/authorisation](https://pypi.org/project/djangorestframework-api-key/) as standard, but can be configured to work with Password-based and/or Authorisation code OAuth2 authentication/authorisation.
        
        ## Screenshots
        
        [API docs](http://localhost:8000/api/)
        
        ![API docs](https://raw.githubusercontent.com/jackvz/mezzanine-cartridge-api/master/screenshot-api-docs.png)
        
        [API keys](http://localhost:8000/admin/rest_framework_api_key/apikey/add/)
        
        ![API keys](https://raw.githubusercontent.com/jackvz/mezzanine-cartridge-api/master/screenshot-add-api-key.png)
        
        ## Installation
        
        Install [Python](https://www.python.org/)
        
        Install Mezzanine and Cartridge: 
            `pip3 install mezzanine`
            `pip3 install cartridge`
        
        Create a new Mezzanine project with Cartridge, and set up a clean development database by running:
            `mezzanine-project -a cartridge [project-name]`
            `cd [project_name]`
            `python3 manage.py createdb --noinput --nodata`
        
        You may need to set ALLOWED_HOSTS and SHOP_CURRENCY_LOCALE in your project's settings.py file before creating the database.
        
        Start a Python [virtual environment](https://virtualenv.pypa.io/en/latest/), install the requirements and run the development server:
            `virtualenv env`
            `source env/bin/activate`
            `pip3 install -r requirements.txt`
            `python3 manage.py runserver`
        
        With Mezzanine and Cartridge installed, add the package to your project's requirements.txt file:
        
        `mezzanine-cartridge-api==1.0.0`
        
        Add the following to your installed apps and middleware in your project's settings.py file:
        
            INSTALLED_APPS = (
                ...
                'oauth2_provider',
                'corsheaders',
                'rest_framework',
                'rest_framework_api_key',
                'rest_framework.authtoken',
                'rest_framework_swagger',
                'mezzanine_cartridge_api',
                ...
            )
        
            # Use `MIDDLEWARE_CLASSES` prior to Django 1.10
            MIDDLEWARE = [
                ...
                'corsheaders.middleware.CorsMiddleware',
                ...
            ]
        
        Start the Python [virtual environment](https://virtualenv.pypa.io/en/latest/), install the requirements and run the development server:
            `virtualenv env`
            `source env/bin/activate`
            `pip3 install -r requirements.txt`
            `python3 manage.py runserver`
        
        ## Configuration
        
        The following configuration settings are available:
        
        CORS_ORIGIN_ALLOW_ALL
        
        And other [django-cors-middleware](https://pypi.org/project/django-cors-middleware/) settings
        
        REST_FRAMEWORK
        
        See the [Django REST framework settings](https://www.django-rest-framework.org/api-guide/settings/)
        
        SWAGGER_SETTINGS
        
        See the [Django REST Swagger settings](https://django-rest-swagger.readthedocs.io/en/latest/settings/)
        
        SWAGGER_SCHEME_HTTPS
        
        True or False, e.g. True for when your production API is available over HTTPS
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
