diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2a73ae --- /dev/null +++ b/.gitignore @@ -0,0 +1,51 @@ +*.py[cod] +__pycache__ + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +*.DS_Store +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg +lib +libs +lib64 + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml +htmlcov + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject +.idea/ + +# Complexity +output/*.html +output/*/index.html + +# Sphinx +docs/_build + +# Virtualenv +venv/ +.venv/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..a5021c6 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include README.rst +include LICENSE diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..4e33ec1 --- /dev/null +++ b/README.rst @@ -0,0 +1,44 @@ +=================== +djangocms-rest-api +=================== + +An application to use CMS content and features via REST API. + +djangocms-rest-api uses Django REST framework to serve django CMS data through a REST API + +Installation +------------ + +* pip install djangocms-rest-api +* Edit ``INSTALLED_APPS``:: + + INSTALLED_APPS = [ + ... + 'rest_framework', + 'djangocms_rest_api', + ... + ] + +* Edit ``urls.py``:: + + urlpatterns = [ + ... + url(r'^api/', include('djangocms_rest_api.urls')), + ... + ] + +* That's all! + + +Features +-------- + + +Credits +------- + + +License +------- + +MIT diff --git a/djangocms_rest_api/__init__.py b/djangocms_rest_api/__init__.py new file mode 100644 index 0000000..907e851 --- /dev/null +++ b/djangocms_rest_api/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +from __future__ import absolute_import, print_function, unicode_literals + +__version__ = '0.1.0' + diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..2a9acf1 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal = 1 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..4540262 --- /dev/null +++ b/setup.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import os +import re +import sys + +try: + from setuptools import setup +except ImportError: + from distutils.core import setup + + +def get_version(*file_paths): + filename = os.path.join(os.path.dirname(__file__), *file_paths) + version_file = open(filename).read() + version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", + version_file, re.M) + if version_match: + return version_match.group(1) + raise RuntimeError('Unable to find version string.') + +version = get_version('djangocms_rest_api', '__init__.py') + +setup( + name='djangocms-rest-api', + version=version, + packages=['djangocms_rest_api', ], + description='API for django cms.', + long_description=open('README.rst').read(), + author='SteelKiwi Development, Divio', + author_email='getmansky@steelkiwi.com', + include_package_data=True, + install_requires=[ + 'djangorestframework', + ], + license='MIT', + url='https://github.com/divio/djangocms-rest-api', + keywords='djangocms-rest-api', + classifiers=[ + 'Development Status :: 2 - Pre-Alpha', + 'Framework :: Django', + 'Framework :: Django :: 1.8', + 'Framework :: Django :: 1.9', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Natural Language :: English', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + ])