Version 0.1.0 0.1.0
authorThierry Florac <thierry.florac@onf.fr>
Wed, 17 Jun 2015 10:01:47 +0200
changeset 2 842ab9ef3982
parent 1 1cbcb33e54a4
child 3 9c12e2477888
Version 0.1.0
.installed.cfg
src/pyams_viewlet/__init__.py
src/pyams_viewlet/manager.py
src/pyams_viewlet/viewlet.py
--- a/.installed.cfg	Fri Mar 20 17:17:20 2015 +0100
+++ b/.installed.cfg	Wed Jun 17 10:01:47 2015 +0200
@@ -1,33 +1,40 @@
 [buildout]
-installed_develop_eggs = 
+installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-utils.egg-link
 parts = package i18n pyflakes test
 
 [package]
-__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/ptweens
+__buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pyams_upgrade
+	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pviews
 	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pserve
-	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pviews
 	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/proutes
+	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pdistreport
+	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/prequest
+	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/ptweens
 	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pshell
 	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pcreate
-	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/prequest
-	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pdistreport
 __buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.4-py3.4.egg zc.buildout-2.3.1-py3.4.egg
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs
 _e = /var/local/env/pyams/eggs
 bin-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin
 develop-eggs-directory = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs
-eggs = pyams_viewlet
+eggs = chameleon
+	pyams_utils
+	pyams_viewlet
 	pyramid
 	zope.component
+	zope.configuration
+	zope.contentprovider
 	zope.interface
+	zope.location
+	zope.schema
 eggs-directory = /var/local/env/pyams/eggs
 recipe = zc.recipe.egg
 
 [i18n]
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pybabel
+	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pot-create
 	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/polint
-	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/pot-create
 __buildout_signature__ = zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.4-py3.4.egg zc.buildout-2.3.1-py3.4.egg
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs
@@ -58,7 +65,7 @@
 [test]
 __buildout_installed__ = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/parts/test
 	/home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/test
-__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.4.egg zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.4-py3.4.egg zope.testrunner-4.4.6-py3.4.egg zc.buildout-2.3.1-py3.4.egg zope.interface-4.1.2-py3.4-linux-x86_64.egg zope.exceptions-4.0.7-py3.4.egg six-45a2be65d681713a598787ec39be3290
+__buildout_signature__ = zc.recipe.testrunner-2.0.0-py3.4.egg zc.recipe.egg-2.0.1-py3.4.egg setuptools-12.0.4-py3.4.egg zope.testrunner-4.4.6-py3.4.egg zc.buildout-2.3.1-py3.4.egg zope.interface-4.1.2-py3.4-linux-x86_64.egg zope.exceptions-4.0.7-py3.4.egg six-e6b62e54b4df360c40dfcbb76c1ecf1a
 _b = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin
 _d = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs
 _e = /var/local/env/pyams/eggs
@@ -69,3 +76,18 @@
 location = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/parts/test
 recipe = zc.recipe.testrunner
 script = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/bin/test
+
+[buildout]
+installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_viewlet/develop-eggs/pyams-utils.egg-link
+
+[buildout]
+parts = i18n pyflakes test package
+
+[buildout]
+parts = pyflakes test package i18n
+
+[buildout]
+parts = test package i18n pyflakes
+
+[buildout]
+parts = package i18n pyflakes test
--- a/src/pyams_viewlet/__init__.py	Fri Mar 20 17:17:20 2015 +0100
+++ b/src/pyams_viewlet/__init__.py	Wed Jun 17 10:01:47 2015 +0200
@@ -28,9 +28,6 @@
 def includeme(config):
     """Pyramid include"""
 
-    # add translations
-    config.add_translation_dirs('pyams_viewlet:locales')
-
     # load registry components
     config.scan()
 
--- a/src/pyams_viewlet/manager.py	Fri Mar 20 17:17:20 2015 +0100
+++ b/src/pyams_viewlet/manager.py	Wed Jun 17 10:01:47 2015 +0200
@@ -229,9 +229,9 @@
         settings = self.__dict__.copy()
 
         def callback(context, name, ob):
-            cdict = {}
-            cdict['__name__'] = settings.get('name')
-            cdict['permission'] = settings.get('permission')
+            cdict = {'__name__': settings.get('name')}
+            if 'permission' in settings:
+                cdict['permission'] = settings.get('permission')
 
             if issubclass(ob, Interface):
                 class_ = settings.get('class_', ViewletManager)
--- a/src/pyams_viewlet/viewlet.py	Fri Mar 20 17:17:20 2015 +0100
+++ b/src/pyams_viewlet/viewlet.py	Wed Jun 17 10:01:47 2015 +0200
@@ -75,8 +75,9 @@
         settings = self.__dict__.copy()
 
         def callback(context, name, ob):
-            cdict = {'__name__': settings.get('name'),
-                     'permission': settings.get('permission')}
+            cdict = {'__name__': settings.get('name')}
+            if 'permission' in settings:
+                settings['permission'] = settings.get('permission')
 
             bases = (ob,)
             if not IContentProvider.implementedBy(ob):
@@ -148,9 +149,11 @@
         settings = self.__dict__.copy()
 
         def callback(context, name, ob):
-            cdict = {'__name__': settings.get('name'),
-                     'permission': settings.get('permission'),
-                     'weight': settings.get('weight')}
+            cdict = {'__name__': settings.get('name')}
+            if 'permission' in settings:
+                cdict['permission'] = settings.get('permission')
+            if 'weight' in settings:
+                cdict['weight'] = settings.get('weight')
 
             bases = (ob,)
             if not IViewlet.implementedBy(ob):