nephila/dev/: djangocms-rest-view-0.1.8 metadata and description

Homepage | Simple index

DRF View for django CMS

author Iacopo Spalletti
author_email i.spalletti@nephila.it
classifiers
  • Development Status :: 3 - Alpha
  • Framework :: Django
  • Framework :: Django :: 1.8
  • Framework :: Django :: 1.9
  • Intended Audience :: Developers
  • License :: OSI Approved :: BSD License
  • Natural Language :: English
  • Programming Language :: Python :: 2
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.3
  • Programming Language :: Python :: 3.4
  • Programming Language :: Python :: 3.5
keywords djangocms-rest-view
license BSD
platform
  • UNKNOWN
File Tox results History
djangocms-rest-view-0.1.8.tar.gz
Size
14 KB
Type
Source
  • Replaced 1 time(s)
  • Uploaded to nephila/dev by nephila 2016-09-10 17:25:23
djangocms_rest_view-0.1.8-py2.py3-none-any.whl
Size
18 KB
Type
Python Wheel
Python
2.7
  • Replaced 1 time(s)
  • Uploaded to nephila/dev by nephila 2016-09-10 17:25:24

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.