composer: more Python3 fixes
This commit is contained in:
		
							parent
							
								
									b22dbf879c
								
							
						
					
					
						commit
						5f3bd3c04f
					
				
					 2 changed files with 10 additions and 52 deletions
				
			
		|  | @ -1,30 +1,11 @@ | ||||||
| # | # cybertools.composer.layout.base | ||||||
| #  Copyright (c) 2008 Helmut Merz helmutm@cy55.de |  | ||||||
| # |  | ||||||
| #  This program is free software; you can redistribute it and/or modify |  | ||||||
| #  it under the terms of the GNU General Public License as published by |  | ||||||
| #  the Free Software Foundation; either version 2 of the License, or |  | ||||||
| #  (at your option) any later version. |  | ||||||
| # |  | ||||||
| #  This program is distributed in the hope that it will be useful, |  | ||||||
| #  but WITHOUT ANY WARRANTY; without even the implied warranty of |  | ||||||
| #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  | ||||||
| #  GNU General Public License for more details. |  | ||||||
| # |  | ||||||
| #  You should have received a copy of the GNU General Public License |  | ||||||
| #  along with this program; if not, write to the Free Software |  | ||||||
| #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |  | ||||||
| # |  | ||||||
| 
 | 
 | ||||||
| """ | """ Basic classes for layouts and layout components. | ||||||
| Basic classes for layouts and layout components. |  | ||||||
| 
 |  | ||||||
| $Id$ |  | ||||||
| """ | """ | ||||||
| 
 | 
 | ||||||
| from zope.cachedescriptors.property import Lazy | from zope.cachedescriptors.property import Lazy | ||||||
| from zope import component | from zope import component | ||||||
| from zope.interface import implements | from zope.interface import implementer | ||||||
| 
 | 
 | ||||||
| from cybertools.composer.base import Component, Element, Compound | from cybertools.composer.base import Component, Element, Compound | ||||||
| from cybertools.composer.base import Template | from cybertools.composer.base import Template | ||||||
|  | @ -34,10 +15,9 @@ from cybertools.composer.layout.region import Region | ||||||
| from cybertools.util.jeep import Jeep | from cybertools.util.jeep import Jeep | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @implementer(ILayoutManager) | ||||||
| class LayoutManager(object): | class LayoutManager(object): | ||||||
| 
 | 
 | ||||||
|     implements(ILayoutManager) |  | ||||||
| 
 |  | ||||||
|     @Lazy |     @Lazy | ||||||
|     def regions(self): |     def regions(self): | ||||||
|         result = {} |         result = {} | ||||||
|  | @ -53,10 +33,9 @@ class LayoutManager(object): | ||||||
|                       key=lambda x: x.template.order) |                       key=lambda x: x.template.order) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @implementer(ILayout) | ||||||
| class Layout(Template): | class Layout(Template): | ||||||
| 
 | 
 | ||||||
|     implements(ILayout) |  | ||||||
| 
 |  | ||||||
|     title = description = u'' |     title = description = u'' | ||||||
|     category = 'default' |     category = 'default' | ||||||
|     renderer = None |     renderer = None | ||||||
|  | @ -79,10 +58,9 @@ class Layout(Template): | ||||||
|         component.provideUtility(self, provides=ILayout, name=self.name) |         component.provideUtility(self, provides=ILayout, name=self.name) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @implementer(ILayoutInstance) | ||||||
| class LayoutInstance(object): | class LayoutInstance(object): | ||||||
| 
 | 
 | ||||||
|     implements(ILayoutInstance) |  | ||||||
| 
 |  | ||||||
|     template = None |     template = None | ||||||
| 
 | 
 | ||||||
|     def __init__(self, context): |     def __init__(self, context): | ||||||
|  |  | ||||||
|  | @ -1,37 +1,17 @@ | ||||||
| # | # cybertools.composer.layout.region | ||||||
| #  Copyright (c) 2008 Helmut Merz helmutm@cy55.de |  | ||||||
| # |  | ||||||
| #  This program is free software; you can redistribute it and/or modify |  | ||||||
| #  it under the terms of the GNU General Public License as published by |  | ||||||
| #  the Free Software Foundation; either version 2 of the License, or |  | ||||||
| #  (at your option) any later version. |  | ||||||
| # |  | ||||||
| #  This program is distributed in the hope that it will be useful, |  | ||||||
| #  but WITHOUT ANY WARRANTY; without even the implied warranty of |  | ||||||
| #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the |  | ||||||
| #  GNU General Public License for more details. |  | ||||||
| # |  | ||||||
| #  You should have received a copy of the GNU General Public License |  | ||||||
| #  along with this program; if not, write to the Free Software |  | ||||||
| #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |  | ||||||
| # |  | ||||||
| 
 | 
 | ||||||
| """ | """ Region implementation. | ||||||
| Region implementation. |  | ||||||
| 
 |  | ||||||
| $Id$ |  | ||||||
| """ | """ | ||||||
| 
 | 
 | ||||||
| from zope.interface import implements | from zope.interface import implementer | ||||||
| 
 | 
 | ||||||
| from cybertools.composer.layout.interfaces import IRegion | from cybertools.composer.layout.interfaces import IRegion | ||||||
| from cybertools.util.jeep import Jeep | from cybertools.util.jeep import Jeep | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @implementer(IRegion) | ||||||
| class Region(object): | class Region(object): | ||||||
| 
 | 
 | ||||||
|     implements(IRegion) |  | ||||||
| 
 |  | ||||||
|     allowedLayoutCategories = None |     allowedLayoutCategories = None | ||||||
| 
 | 
 | ||||||
|     def __init__(self, name): |     def __init__(self, name): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue