Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add packaging files to make it installable.
- Loading branch information
Showing
6 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include AUTHORS | ||
include README.rst | ||
include LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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', | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from .djangoanalyzer import find_node_instances | ||
VERSION = (1,0,0) |