Skip to content

Commit

Permalink
[refactor][s]: reorganize extension layout to more standard form (cka…
Browse files Browse the repository at this point in the history
…next/disqus rather than ckanext/plugins/disqus).

* Also declare_namespace in ckanext/disqus as well as ckanext.
  • Loading branch information
rufuspollock committed Mar 20, 2012
1 parent 7506d7d commit b8ce143
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ckanext/plugins/__init__.py → ckanext/disqus/__init__.py
@@ -1,4 +1,4 @@
# this is a namespace package
# namespace package
try:
import pkg_resources
pkg_resources.declare_namespace(__name__)
Expand Down
File renamed without changes.
Expand Up @@ -30,7 +30,6 @@ def configure(self, config):
if self.disqus_name is None:
log.warn("No disqus forum name is set. Please set \
'disqus.name' in your .ini!")
self.disqus_name = 'ckan'
config['pylons.app_globals'].has_commenting = True

def filter(self, stream):
Expand All @@ -40,7 +39,6 @@ def filter(self, stream):
global objects, how can this be fixed without obscuring the
inteface?
"""

from pylons import request, tmpl_context as c
routes = request.environ.get('pylons.routes_dict')

Expand Down
5 changes: 2 additions & 3 deletions setup.py
Expand Up @@ -16,16 +16,15 @@
url='http://okfn.org',
license='GPL',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
namespace_packages=['ckanext', 'ckanext.plugins'],
namespace_packages=['ckanext', 'ckanext.disqus'],
include_package_data=True,
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
],
entry_points=\
"""
[ckan.plugins]
disqus = ckanext.plugins.disqus:Disqus
disqus = ckanext.disqus.plugins:Disqus
""",
)

0 comments on commit b8ce143

Please sign in to comment.