Skip to main content

DRF View for django CMS

Project description

Latest PyPI version Monthly downloads Python versions Latest Travis CI build status Test coverage Test coverage Code Climate

An application to load django CMS pages in a client application.

djangocms-rest-view uses Django REST framework to serve django CMS pages through a REST API

Editing must still be done the “traditional” way

Installation

  • pip install djangocms-rest-view

  • Edit INSTALLED_APPS:

    INSTALLED_APPS = [
        ...
        'rest_framework',
        'djangocms_rest_view',
        ...
    ]
  • Edit urls.py:

    urlpatterns = [
        ...
        url(r'^api/', include('djangocms_rest_view.urls')),
        ...
    ]
  • That’s all!

The REST view of the pages will be available at http://example.com/api/

Sample client

A sample Angular JS client is provided within the project.

To start exploring djangocms-rest view, you can install it and browse the website:

  • Edit INSTALLED_APPS:

    INSTALLED_APPS = [
        ...
        'djangocms_rest_view.client',
        ...
    ]
  • Edit urls.py:

    urlpatterns = [
        ...
        url(r'^rest/', include('djangocms_rest_view.client.urls')),
        ...
    ]

the Angular client will be available at http://example.com/rest/

example:

  • Copy dependencies in project bower.json

  • run bower:

    bower install

Customize

The sample client uses a dedicated base page to load all the default styles etc needed to render your content. Template is in rest/base.html copy it from djangocms_rest_view/client/templates/rest/base.html and edit it according your needs.

Features

  • REST view to the pages

  • Support for sekizai context in the plugins

Credits

Tools used in rendering this package:

History

0.1.0 (2016-02-01)

  • 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.

Source Distribution

djangocms-rest-view-0.1.7.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

djangocms_rest_view-0.1.7-py2.py3-none-any.whl (17.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file djangocms-rest-view-0.1.7.tar.gz.

File metadata

File hashes

Hashes for djangocms-rest-view-0.1.7.tar.gz
Algorithm Hash digest
SHA256 5e99a8fac203e8a7c6809ae49f8a5653536a03dc464920e7bbfb42a58d7289cc
MD5 5f97fc0f11bdc22dc0db12c889aff668
BLAKE2b-256 66e7b289acfd6f44c01c778731cfd32476e52e8694806c6c8df5cde115300703

See more details on using hashes here.

File details

Details for the file djangocms_rest_view-0.1.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_rest_view-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b4252b38cb8f89967d3c75fae51f2aa3eabc17058e279b504ce15b20ff599b9a
MD5 6ef5333529b9338b946782ca52931c24
BLAKE2b-256 572c6a109847192191dd152f5a2f7d781aec881776eb0549935f5f858b6f38ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page