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


  • pip install djangocms-rest-view


  • Edit

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

The REST view of the pages will be available at

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

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

the Angular client will be available at


  • Copy dependencies in project bower.json

  • run bower:

    bower install


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.


Each django CMS has a defined template to render.

You can customize the template the AngularJS client will use to render the page:

  • create a partial directory in the static directory

  • create html files for each page template

  • define the content of the rest-page template to render the placeholders and page title:

    <article class="body">
      <h2 ng-bind="content_page.title"></h2>
      <p ng-bind-html="content_page.placeholders.content | safe"></p>

    content_page is the page serialization in the angular scope and contains the full serialization as visible at<page-id>; thus content_page.placeholders.content contains the rendered HTML for the content placeholder.


Tools used in rendering this package:


0.1.9 (2016-09-25)

  • Fixed compatibility with django CMS 3.4

0.1.8 (2016-09-10)

  • First public “#PyConUK” release

0.1.0 (2016-02-01)

  • Internal release

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 djangocms-rest-view, version 0.1.9
Filename, size & hash File type Python version Upload date
djangocms_rest_view-0.1.9-py2.py3-none-any.whl (18.5 kB) View hashes Wheel 2.7
djangocms-rest-view-0.1.9.tar.gz (14.8 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page