Wiking branch, master, updated. 4fb16721a382ac9fa0ad619dc8a290c5777ebfed

Tomas Cerha cerha at devel.brailcom.org
Wed Jun 15 11:08:03 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Wiking".

The branch, master has been updated
       via  4fb16721a382ac9fa0ad619dc8a290c5777ebfed (commit)
      from  da56e5da91ee4fcf1112bde5ba78ec9380761d41 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4fb16721a382ac9fa0ad619dc8a290c5777ebfed
Author: Tomas Cerha <cerha at brailcom.org>
Date:   Wed Jun 15 11:03:50 2011 +0200

    Rewrite another use of deprecated field inheritance

-----------------------------------------------------------------------

Summary of changes:
 lib/wiking/cms/certificates.py |    2 +-
 lib/wiking/cms/cms.py          |   16 +++++++---------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/lib/wiking/cms/certificates.py b/lib/wiking/cms/certificates.py
index e73d05e..209dd29 100644
--- a/lib/wiking/cms/certificates.py
+++ b/lib/wiking/cms/certificates.py
@@ -32,7 +32,7 @@ import os
 import subprocess
 
 import pytis.data
-from pytis.presentation import computer, Computer, Fields, Field
+from pytis.presentation import computer, Computer, Field
 from lcg import log as debug
 
 ONCE = pp.Editable.ONCE
diff --git a/lib/wiking/cms/cms.py b/lib/wiking/cms/cms.py
index 70b51d1..76d10a6 100644
--- a/lib/wiking/cms/cms.py
+++ b/lib/wiking/cms/cms.py
@@ -38,7 +38,7 @@ import time
 
 from pytis.util import *
 import pytis.data
-from pytis.presentation import computer, Computer, CbComputer, Fields, HGroup, CodebookSpec, \
+from pytis.presentation import computer, Computer, CbComputer, HGroup, CodebookSpec, \
     Field, ColumnLayout
 from lcg import log as debug
 
@@ -1660,17 +1660,15 @@ class Images(Attachments):
     class Spec(Attachments.Spec):
         table = 'attachments'
         def fields(self):
-            fields = pp.Fields(super(Images.Spec, self).fields())
-            overridden = (
-                #Field(inherit=fields['mime_type'], check=),
-                Field(inherit=fields['title'], 
+            overridde = (
+                Field('title',
                       descr=_("Image title.  If empty, the file name will be used instead.")),
-                Field(inherit=fields['description'], maxlen=512,
+                Field('description', maxlen=512,
                       descr=_("Optional image description.")),
-                Field(inherit=fields['listed'], label=_("In galery"),
+                Field('listed', _("In galery"),
                       descr=_("Check if you want the image to appear an automatically generated "
                               "galery.")),
-                Field(inherit=fields['is_image'], default=True),
+                Field('is_image', default=True),
                 )
             extra = (
                 Field('image', virtual=True, editable=ALWAYS, computer=computer(self._image),
@@ -1695,7 +1693,7 @@ class Images(Attachments):
                 Field('_resized_filename', virtual=True,
                       computer=self._filename_computer('-resized')),
                 )
-            return tuple(fields.fields(override=overridden)) + extra
+            return self._inherited_fields(Images, override=overridde) + extra
         def _image(self, record):
             # Use lazy get to prevent running the computer (to find out, whether a new file was
             # uploaded and prevent loading the previously saved file in that case).


hooks/post-receive
-- 
Wiking



More information about the Wiking-cvs mailing list