Commits

Garth Johnson committed 347ef85

Install cleanup and added cmsplugins command

  • Participants
  • Parent commits 78c06c6

Comments (0)

Files changed (4)

 include AUTHORS
 include LICENSE
 include README.rst
+include TODO.rst
 recursive-include djaboto *

File djaboto/__init__.py

 # -*- coding: utf-8 -*-
-VERSION = (0,0,5,'alpha',1)
+VERSION = (0,0,6,'alpha',1)
 
 def get_version(version=None):
     """Derives a PEP386-compliant version number from VERSION."""

File djaboto/management/commands/cmsplugins.py

+###TODO: replace most sys.exit() calls to raise errors instead
+###TODO: move all code from this command to libraries and connect aws command to the same calls
+
+import optparse
+import pip, xmlrpclib
+import sys, os
+from django.core.management.base import BaseCommand
+import djaboto
+from subprocess import check_call
+from cms.plugin_pool import plugin_pool
+
+class Command(BaseCommand):
+    help = ("List all plugins available to this project (not just the ones in use).")
+    requires_model_validation = False
+    can_import_settings = True
+
+    def handle(self, *args, **options):
+        """
+        Shows all plugins that are available to this project, not just the ones that are already in use.
+        """
+        plugin_pool.discover_plugins()
+        if options.get('verbosity',0):
+            print "%-35s %s %s MODEL" % ("PLUGIN", "TEXT ", "ADMIN")
+        for plugin in plugin_pool.plugins:
+            if options.get('verbosity',0):
+                print "%-35s %-5s %-5s %s" % (
+                    plugin,
+                    plugin_pool.plugins[plugin].text_enabled,
+                    plugin_pool.plugins[plugin].admin_preview,
+                    plugin_pool.plugins[plugin].model,
+                    )
+            else:
+                print plugin
 #!/usr/bin/env python2
 from setuptools import setup, find_packages
+import os
+
+try:
+    from setuptest import test
+except ImportError:
+    from setuptools.command.test import test
 
-version = __import__('djaboto').get_version()
 
-install_requires = [
-    'setuptools',
-    'Django>=1.4',
-    'fabric',
-    'boto',
-    'GitPython',
-]
+version = __import__('djaboto').get_version()
 
-dependency_links = [
-    ]
+def read(fname):
+    # read the contents of a text file
+    return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
 setup(
     name = "django-djaboto",
     license = 'BSD',
     platforms=['Linux'],
     description = "A Django app and assorted tools to help create, deploy and manage Django projects on AWS servers",
+    long_description = read('README.rst'),
     keywords='django, cms, amazon',
     author = "Odd Otter Co",
     author_email = 'djaboto@oddotter.com',
     packages = find_packages(),
-    install_requires = install_requires,
-    dependency_links = dependency_links,
+    install_requires = (
+            'setuptools',
+            'Django>=1.4',
+            'fabric',
+            'boto',
+            'GitPython',
+    ),
     include_package_data = True,
     zip_safe = False,
     classifiers = [