Commits

Daniel Greenfeld  committed 42df772

entire working app courtesy of audreyr

  • Participants

Comments (0)

Files changed (8)

+Copyright (c) 2011 Cartwheel, LLC and contributors.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+======
+README
+======
+

File cmsplugin_htmlsitemap/__init__.py

+__VERSION__=(0,5,0)

File cmsplugin_htmlsitemap/cms_plugins.py

+from cms.plugin_base import CMSPluginBase
+from cms.plugin_pool import plugin_pool
+from htmlsitemap.models import HTMLSitemapPlugin as HTMLSitemapPluginModel
+from django.utils.translation import ugettext as _
+
+class HTMLSitemapPlugin(CMSPluginBase):
+    model = HTMLSitemapPluginModel # Model where data about this plugin is saved
+    name = _("HTML Sitemap Plugin") # Name of the plugin
+    render_template = "htmlsitemap/plugin.html" # template to render the plugin with
+
+    def render(self, context, instance, placeholder):
+        context.update({'instance':instance})
+        return context
+
+plugin_pool.register_plugin(HTMLSitemapPlugin) # register the plugin

File cmsplugin_htmlsitemap/models.py

+from django.db import models
+
+from cms.models import CMSPlugin
+
+class HTMLSitemapPlugin(CMSPlugin):
+    pass

File cmsplugin_htmlsitemap/templates/cmsplugin_htmlsitemap/plugin.html

+{% load menu_tags %}
+
+<ul id="sitemap">{% show_menu 0 100 100 100 %}</ul>
+[build_sphinx]
+source-dir = docs/
+build-dir = docs/_build
+all_files = 1
+
+[upload_sphinx]
+upload-dir = docs/_build/html
+docs-dir = docs/
+from distutils.core import setup
+
+setup(
+    name = "cmsplugin-htmlsitemap",
+    version = "0.5.0",
+    author = "audreyr",
+    author_email = "audreyr@cartwheelweb.com",
+    description = "HTML sitemap plugin for django-cms",
+    long_description = open("README.rst").read(),
+    license = "BSD",
+    url = "http://bitbucket.org/cartwheel/cmsplugin-htmlsitemap",
+    packages = [
+        "cmsplugin_htmlsitemap",
+    ],
+    classifiers = [
+        "Development Status :: 3 - Beta",
+        "Environment :: Web Environment",
+        "Intended Audience :: Developers",
+        "License :: OSI Approved :: BSD License",
+        "Operating System :: OS Independent",
+        "Programming Language :: Python",
+        "Framework :: Django",
+    ]
+)