DRF View for django CMS
Project description
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/
Install dependencies according to the application bower.json: https://gitix.iast.it/opensource/djangocms-rest-view/blob/master/bower.json
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
Built Distribution
File details
Details for the file djangocms-rest-view-0.1.6.tar.gz
.
File metadata
- Download URL: djangocms-rest-view-0.1.6.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9255d0fd69adff2ed7b9b3db48f8bf4a434a6c92ff441aa7d7aa9bbf74f519e1 |
|
MD5 | 3d1dac251137f5e6a1a954c5478d741b |
|
BLAKE2b-256 | f53458836b3283c0e9c0ebf22fd33a9dcceb79e50c462d19561fa8c65186f215 |
File details
Details for the file djangocms_rest_view-0.1.6-py2.py3-none-any.whl
.
File metadata
- Download URL: djangocms_rest_view-0.1.6-py2.py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e8087d13d8faaa051848b69b050db7c38fc8f6fb71b7d30e2dd2ae32fa5115b |
|
MD5 | fe221781434e84c7d719a19816c92b25 |
|
BLAKE2b-256 | fbe0579e68dfa85447ae036adacdbb0ae37d0cbb36823e916271aa4aab785725 |