Skip to main content

A RESTful JSON API for django-fiction-outlines. Part of the broader maceoutliner project.

Project description

https://badge.fury.io/py/django-fiction-outlines-api.svg https://circleci.com/gh/maceoutliner/django-fiction-outlines-api.svg?style=svg https://coveralls.io/repos/github/maceoutliner/django-fiction-outlines-api/badge.svg?branch=master Documenatation Status

A RESTful JSON API for django-fiction-outlines.

Documentation

The full documentation is at https://django-fiction-outlines-api.readthedocs.io. The source code can be found at https://github.com/maceoutliner/django-fiction-outlines-api/.

Quickstart

Install Django Fiction Outlines API:

pip install django-fiction-outlines-api

Add it and dependencies to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    '
    'rest_framework',
    'taggit',
    'rules.apps.AutodiscoverRulesConfig',
    'rest_framework_rules',
    'fiction_outlines',
    'fiction_outlines_api',
    ...
)

If you have not already, add rules to you AUTHENTICATION_BACKENDS.

AUTHENTICATION_BACKENDS = (
    'rules.permissions.ObjectPermissionBackend',
    'django.contrib.auth.backends.ModelBackend',
)

Unless you like to live dangerously, it is STRONGLY recommend you configure whichever database you use for outlines to have ATOMIC_REQUESTS to True.

DATABASES = {
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": "outlines",
        "ATOMIC_REQUESTS": True,
    }}

Add Django Fiction Outlines API’s URL patterns:

from fiction_outlines_api import urls as fiction_outlines_api_urls


urlpatterns = [
    ...
    url(r'^', include(fiction_outlines_api_urls)),
    ...
]

If you haven’t already installed fiction_outlines you should run python manage.py migrate now.

Features

NOTE: As with fiction_outlines, this app makes use of the excellent object permissions library django-rules.

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r test_requirements.txt
(myenv) $ pytest
(myenv) $ flake8 setup.py fiction_outlines_api tests

Credits

Tools used in rendering this package:

History

0.2.1 (2018-10-16)

  • Support for both python 3.6 and 3.7

0.2.0 (2018-08-08)

  • Support for Django 2.1

0.1.3 (2018-06-21)

  • Move dependency back to official django-taggit-serializer package now that our pull request has been merged.

0.1.0 (2018-04-07)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-fiction-outlines-api, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size django_fiction_outlines_api-0.2.1-py2.py3-none-any.whl (18.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size django-fiction-outlines-api-0.2.1.tar.gz (17.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page