From: Eevee Date: Sun, 7 Dec 2008 00:15:38 +0000 (-0500) Subject: Created a simple shoutbox plugin for spline. X-Git-Url: http://git.veekun.com/spline-shoutbox.git/commitdiff_plain/HEAD Created a simple shoutbox plugin for spline. All it does at the moment is install a controller that announces that it in fact exists. --- f32d09074db90cdd13501ce6febccb4f5b7105c7 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f0f68e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.swp +*.pyc +*.egg-info diff --git a/lib/spline/__init__.py b/lib/spline/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lib/spline/plugins/__init__.py b/lib/spline/plugins/__init__.py new file mode 100644 index 0000000..de40ea7 --- /dev/null +++ b/lib/spline/plugins/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/lib/spline/plugins/shoutbox/__init__.py b/lib/spline/plugins/shoutbox/__init__.py new file mode 100644 index 0000000..4d79dbf --- /dev/null +++ b/lib/spline/plugins/shoutbox/__init__.py @@ -0,0 +1,8 @@ +from spline.lib.plugin import PluginBase +import controllers.shoutbox + +class ShoutboxPlugin(PluginBase): + def controllers(self): + return dict( + shoutbox = controllers.shoutbox.ShoutboxController, + ) diff --git a/lib/spline/plugins/shoutbox/controllers/__init__.py b/lib/spline/plugins/shoutbox/controllers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lib/spline/plugins/shoutbox/controllers/shoutbox.py b/lib/spline/plugins/shoutbox/controllers/shoutbox.py new file mode 100644 index 0000000..c520f22 --- /dev/null +++ b/lib/spline/plugins/shoutbox/controllers/shoutbox.py @@ -0,0 +1,13 @@ +import logging + +from pylons import request, response, session, tmpl_context as c +from pylons.controllers.util import abort, redirect_to + +from spline.lib.base import BaseController, render +#from spline import model + +class ShoutboxController(BaseController): + + def index(self): + return 'shoutbox here' + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f5b4419 --- /dev/null +++ b/setup.py @@ -0,0 +1,18 @@ +from setuptools import setup, find_packages +setup( + name = 'spline-shoutbox', + version = '0.1', + package_dir = {'': 'lib'}, + packages = find_packages('lib'), + + install_requires = ['spline'], + + include_package_data = True, + + zip_safe = False, + + entry_points = {'spline.plugins': 'shoutbox = spline.plugins.shoutbox:ShoutboxPlugin'}, + + namespace_packages = ['spline', 'spline.plugins'], +) +