[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nuxeo-checkins] CVS: NuxForum Article.py,1.2,1.3 Custom.py,1.1,1.2 Foru
From: |
Juan David Ibáñez Palomar |
Subject: |
[Nuxeo-checkins] CVS: NuxForum Article.py,1.2,1.3 Custom.py,1.1,1.2 Forum.py,1.3,1.4 Node.py,1.2,1.3 Posting.py,1.1.1.1,1.2 |
Date: |
Fri, 03 May 2002 13:11:10 -0400 |
Update of /cvsroot/nuxeo/NuxForum
In directory subversions:/tmp/cvs-serv21290
Modified Files:
Article.py Custom.py Forum.py Node.py Posting.py
Log Message:
Improved customized mechanism.
Index: Article.py
===================================================================
RCS file: /cvsroot/nuxeo/NuxForum/Article.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Article.py 15 Mar 2002 14:54:43 -0000 1.2
--- Article.py 3 May 2002 17:11:06 -0000 1.3
***************
*** 32,35 ****
--- 32,36 ----
# Here
+ from Custom import Custom
from Posting import Posting
***************
*** 58,67 ****
def get_article(self):
""" """
-
return self
! security.declareProtected('View', 'index_html')
! index_html = LocalPageTemplateFile('ui/Article_index', globals())
--- 59,68 ----
def get_article(self):
""" """
return self
! security.declareProtected('View', 'index_html_default')
! index_html_default = LocalPageTemplateFile('ui/Article_index', globals())
! index_html = Custom('index_html_default', 'article_index')
***************
*** 77,81 ****
acquisition.
"""
-
return getattr(self.subjects, self.subject)
--- 78,81 ----
Index: Custom.py
===================================================================
RCS file: /cvsroot/nuxeo/NuxForum/Custom.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Custom.py 3 May 2002 09:41:35 -0000 1.1
--- Custom.py 3 May 2002 17:11:06 -0000 1.2
***************
*** 29,36 ****
class Customizable:
! def __bobo_traverse__(self, REQUEST, name):
self._v_root = self.getPhysicalRoot()
self._v_path = self.getPhysicalPath()
- return getattr(self, name)
--- 29,35 ----
class Customizable:
! def __before_publishing_traverse__(self, ob, request):
self._v_root = self.getPhysicalRoot()
self._v_path = self.getPhysicalPath()
Index: Forum.py
===================================================================
RCS file: /cvsroot/nuxeo/NuxForum/Forum.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** Forum.py 3 May 2002 09:41:35 -0000 1.3
--- Forum.py 3 May 2002 17:11:06 -0000 1.4
***************
*** 33,37 ****
# Modules from this product
! from Custom import Customizable, Custom
from Article import Article
from Node import Node
--- 33,37 ----
# Modules from this product
! from Custom import Custom
from Article import Article
from Node import Node
***************
*** 49,53 ****
! class Forum(Customizable, Node):
""" """
--- 49,53 ----
! class Forum(Node):
""" """
***************
*** 75,80 ****
# Add articles
! security.declareProtected('Add forum articles', 'add_article_form')
! add_article_form = LocalPageTemplateFile('ui/Article_add', globals())
security.declareProtected('Add forum articles', 'add_article')
--- 75,83 ----
# Add articles
! security.declareProtected('Add forum articles',
'add_article_form_default')
! add_article_form_default = LocalPageTemplateFile('ui/Article_add',
! globals())
! add_article_form = Custom('add_article_form_default', 'article_add')
!
security.declareProtected('Add forum articles', 'add_article')
Index: Node.py
===================================================================
RCS file: /cvsroot/nuxeo/NuxForum/Node.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Node.py 15 Mar 2002 14:54:43 -0000 1.2
--- Node.py 3 May 2002 17:11:06 -0000 1.3
***************
*** 33,38 ****
from Products.Localizer.LocalObjects import gettext
! class Node(Folder):
"""
Mixing class, all nodes in the tree able to have children should
--- 33,40 ----
from Products.Localizer.LocalObjects import gettext
+ from Custom import Customizable
!
! class Node(Customizable, Folder):
"""
Mixing class, all nodes in the tree able to have children should
Index: Posting.py
===================================================================
RCS file: /cvsroot/nuxeo/NuxForum/Posting.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** Posting.py 20 Feb 2002 12:07:07 -0000 1.1.1.1
--- Posting.py 3 May 2002 17:11:06 -0000 1.2
***************
*** 77,81 ****
def get_comments(self):
""" """
-
return [ getattr(self, str(x)) for x in range(self.count) ]
--- 77,80 ----
***************
*** 95,99 ****
def add_comment(self, title, body, REQUEST=None, RESPONSE=None):
""" """
-
from Comment import Comment
--- 94,97 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nuxeo-checkins] CVS: NuxForum Article.py,1.2,1.3 Custom.py,1.1,1.2 Forum.py,1.3,1.4 Node.py,1.2,1.3 Posting.py,1.1.1.1,1.2,
Juan David Ibáñez Palomar <=
- Prev by Date:
[Nuxeo-checkins] CVS: NuxForum/ui Forum_index.zpt,1.1.1.1,1.2 Posting_actions.zpt,1.1.1.1,1.2
- Next by Date:
[Nuxeo-checkins] CVS: NuxForum Article.py,1.3,1.4 Forum.py,1.4,1.5 Posting.py,1.2,1.3
- Previous by thread:
[Nuxeo-checkins] CVS: NuxForum/ui Forum_index.zpt,1.1.1.1,1.2 Posting_actions.zpt,1.1.1.1,1.2
- Next by thread:
[Nuxeo-checkins] CVS: NuxForum Article.py,1.3,1.4 Forum.py,1.4,1.5 Posting.py,1.2,1.3
- Index(es):