begin to drop ref to secondary view
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 24 Jul 2009 12:13:51 +0200
changeset 2471 3e2b50ece726
parent 2470 569d6641f08c
child 2472 a459a6ab78d0
begin to drop ref to secondary view
devtools/fake.py
goa/test/unittest_views.py
web/views/baseviews.py
web/views/timetable.py
--- a/devtools/fake.py	Fri Jul 24 12:10:54 2009 +0200
+++ b/devtools/fake.py	Fri Jul 24 12:13:51 2009 +0200
@@ -49,8 +49,7 @@
     _registries = {
         'controllers' : [Mock(id='view'), Mock(id='login'),
                          Mock(id='logout'), Mock(id='edit')],
-        'views' : [Mock(id='primary'), Mock(id='secondary'),
-                         Mock(id='oneline'), Mock(id='list')],
+        'views' : [Mock(id='primary'), Mock(id='oneline'), Mock(id='list')],
         }
 
     def registry_objects(self, name, oid=None):
--- a/goa/test/unittest_views.py	Fri Jul 24 12:10:54 2009 +0200
+++ b/goa/test/unittest_views.py	Fri Jul 24 12:13:51 2009 +0200
@@ -51,7 +51,7 @@
     def test_django_index(self):
         self.vreg.render('views', 'index', self.req, rset=None)
 
-for vid in ('primary', 'secondary', 'oneline', 'incontext', 'outofcontext', 'text'):
+for vid in ('primary', 'oneline', 'incontext', 'outofcontext', 'text'):
     setattr(SomeViewsTC, 'test_%s'%vid, lambda self, vid=vid: self.blog.view(vid))
 
 if __name__ == '__main__':
--- a/web/views/baseviews.py	Fri Jul 24 12:10:54 2009 +0200
+++ b/web/views/baseviews.py	Fri Jul 24 12:13:51 2009 +0200
@@ -2,7 +2,7 @@
 
 * noresult, final
 * primary, sidebox
-* secondary, oneline, incontext, outofcontext, text
+* oneline, incontext, outofcontext, text
 * list
 
 
@@ -101,6 +101,7 @@
         self.wdata(printable_value(self.req, etype, value, props, displaytime=displaytime))
 
 
+# XXX deprecated
 class SecondaryView(EntityView):
     id = 'secondary'
     title = _('secondary')
@@ -180,9 +181,6 @@
         self.w(u'</div>')
 
 
-# new default views for finner control in general views , to use instead of
-# oneline / secondary
-
 class InContextTextView(TextView):
     id = 'textincontext'
     title = None # not listed as a possible view
--- a/web/views/timetable.py	Fri Jul 24 12:10:54 2009 +0200
+++ b/web/views/timetable.py	Fri Jul 24 12:13:51 2009 +0200
@@ -138,7 +138,7 @@
         for user, width in zip(users, widths):
             self.w(u'<th colspan="%s">' % max(MIN_COLS, width))
             if user != u"*":
-                user.view('secondary', w=self.w)
+                user.view('oneline', w=self.w)
             else:
                 self.w(user)
             self.w(u'</th>')