Hi, forgive the double posting. My membership to grok-dev hasn't been approved yet...

Hi there,

I'm trying to get a better feel for grok so that I can evaluate for an upcoming project - so far, its been a relatively painless experience!

However, I've been using Paul Carduner's guide to the z3c packages (http://carduner.net/docs/z3c-tutorial/ ) and thought I would try out using z3c.table, and have hit a stumbling block

I have a view, thus:

class Index(grok.View):

        def __init__(self, context, request):
                super(Index, self).__init__(context, request)
                self.tableView = table.Table(context, request)

(note I can't have Index inherit z3c.table.Table, as Table's render() method causes conflicts with my index.pt)
and in my corresponding index.pt I can have the following:

<p> Here is the table from z3c.table </p>
  <div tal:replace="structure python:view.tableView.renderTable()" />

So far, so good -- no table gets displayed though, as I haven't registered columns as named multiadapters. This is where things go pear shaped.

I have in my code the following -- can someone see what I'm doing wrong?

from z3c.table import table, column

class NameColumn(column.GetAttrColumn, grok.MultiAdapter):
        header = u'Name'
        attrname = 'who'
        weight = 1

Once I get an answer, I can write it up as a howto.

Thanks in advance for any help :)

This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Zope3-users mailing list

Reply via email to