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.6.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

djangocms_rest_view-0.1.6-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.6.tar.gz.

File metadata

File hashes

Hashes for djangocms-rest-view-0.1.6.tar.gz
Algorithm Hash digest
SHA256 9255d0fd69adff2ed7b9b3db48f8bf4a434a6c92ff441aa7d7aa9bbf74f519e1
MD5 3d1dac251137f5e6a1a954c5478d741b
BLAKE2b-256 f53458836b3283c0e9c0ebf22fd33a9dcceb79e50c462d19561fa8c65186f215

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for djangocms_rest_view-0.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7e8087d13d8faaa051848b69b050db7c38fc8f6fb71b7d30e2dd2ae32fa5115b
MD5 fe221781434e84c7d719a19816c92b25
BLAKE2b-256 fbe0579e68dfa85447ae036adacdbb0ae37d0cbb36823e916271aa4aab785725

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