Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add packaging files to make it installable.

  • Loading branch information...
commit 6e2a572771baf507021787b029d777649764f440 1 parent 5d58825
@vdboor vdboor authored
View
13 AUTHORS
@@ -0,0 +1,13 @@
+Packaging in separate application:
+
+* Diederik van der Boor
+
+Original code written by Django CMS developers and contributors:
+
+* Chris Glass
+* Jonas Obrist
+* Patrick Lauber
+* Paul van der Linden
+* "philomat"
+* Stephan Jaekel
+* Tanel Külaots
View
28 LICENSE
@@ -0,0 +1,28 @@
+Copyright (c) 2008, Batiste Bieler
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of the author nor the names of other
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
3  MANIFEST.in
@@ -0,0 +1,3 @@
+include AUTHORS
+include README.rst
+include LICENSE
View
35 README.rst
@@ -0,0 +1,35 @@
+Introduction
+============
+
+The ``template_analyzer`` package offers an API to analyze the Django template structure.
+It can be used to find nodes of a particular type, e.g. to do automatic detection of placeholder tags.
+
+API example
+==========
+
+::
+ from template_analyzer.djangoanalyzer import find_node_instances
+ from mypackage.templatetags.placeholdertags import Placeholder
+
+ template = get_template("mycms/default-page.html")
+
+ placeholders = find_node_instances(template, Placeholder)
+ placeholder_names = [p.get_name() for p in placeholders]
+
+Installation
+============
+
+First install the module, preferably in a virtual environment. It can be installed from PyPI::
+
+ pip install django-template-analyzer
+
+Or the current folder can be installed::
+
+ pip install .
+
+Credits
+=======
+
+* This package is based on the work of
+ `Django CMS <http://www.django-cms.org>`_.
+* Many thanks to the contributors of ``cms/utils/plugins.py`` in Django CMS!
View
35 setup.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+from setuptools import setup, find_packages
+from os.path import dirname, join
+
+setup(
+ name='django-template-analyzer',
+ version='1.0.0',
+ license='BSD License',
+ platforms=['OS Independent'],
+
+ description='Django Template Analyzer - Extract template nodes from a Django template',
+ long_description=open(join(dirname(__file__), 'README.rst')).read(),
+
+ author='Diederik van der Boor & Django CMS developers',
+ author_email='opensource@edoburu.nl',
+
+ url='https://github.com/edoburu/django-template-analyzer',
+ download_url='https://github.com/edoburu/django-template-analyzer/zipball/master',
+
+ packages=find_packages(),
+ include_package_data=True,
+
+ zip_safe=False,
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Framework :: Django',
+ 'Topic :: Software Development',
+ 'Topic :: Software Development :: Libraries :: Application Frameworks',
+ ]
+)
View
1  template_analyzer/__init__.py
@@ -1 +1,2 @@
from .djangoanalyzer import find_node_instances
+VERSION = (1,0,0)

0 comments on commit 6e2a572

Please sign in to comment.
Something went wrong with that request. Please try again.