#2413: Installing tw.dojo breaks CrudRestController from tgext.crud
------------------------+---------------------------------------------------
 Reporter:  boulon      |       Owner:       
     Type:  defect      |      Status:  new  
 Priority:  normal      |   Milestone:  2.1a3
Component:  TurboGears  |     Version:  2.1a1
 Severity:  normal      |    Keywords:       
------------------------+---------------------------------------------------
 This bug actually have been seen on tgext.crud
 (tgext.crud-0.3.3-py2.5.egg) using TurboGears 2.1a2, not 2.1a1 (but the
 later isn't in the Version list):

 At the top of tgext.crud.controller you can find these lines:
 {{{
 #!python
 try:
     import tw.dojo
 except ImportError:
     use_paginate = True
     from tg.decorators import paginate
 else:
     # if dojo ist installed, we don't need pagination
     use_paginate = False
 }}}

 However later in the file, in the get_all method of CrudRestController you
 can find the following lines:

 {{{
 #!python
         if use_paginate:
             values = self.table_filler.get_value(**kw)
         else:
             values = []
             tmpl_context.paginators = None
         tmpl_context.widget = self.table
         return dict(model=self.model.__name__, value_list=values)
 }}}

 Which means that if you install tw.dojo then the get_value method isn't
 called anymore, leading to a 'No Records found' message.

 One possible workaround may be to not only install tw.dojo, but use it
 (with DojoTable and DojoTableFiller) :) However my attempt to do that
 failed in another way that I will probably file here too after more
 investigation.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/2413>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

-- 
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en

Reply via email to