try this:
http://lucasmanual.com/mywiki/TurboGears#head-93e3717ef5146d4beccc1578f5a5f44cb6109e64
This should work for you.
Lucas
On Dec 5, 2007 8:12 AM, Timo <[EMAIL PROTECTED]> wrote:
>
> I would like to get to the point where I can get a simple grid (I
> don't care what it has in it yet) to show up on the page. It's all set
> up to show the frontdoor template, but the server crashes when I try
> to run it with the above code. I've tried it in innumerable ways and I
> can't get it to work. Where is the proper place to declare a DataGrid
> widget? What is the proper syntax?
>
>
> On Dec 5, 3:01 am, Glauco <[EMAIL PROTECTED]> wrote:
> > Timo ha scritto:
> >
> > > Hi, I'm new to TG. Sorry for asking silly questions.
> >
> > > Anyway, I really want to implement a DataGrid. I've pretty much just
> > > started a new project and I don't know where to put what code (and
> > > none of the TG tutorials seem to want to tell me).
> >
> > > For example, right now I'm trying to declare a DataGrid in my
> > > controllers.py file:
> >
> > > import turbogears
> > > import model
> > > from turbogears import controllers, expose, widgets
> > > from turbogears.widgets import DataGrid
> >
> > > class Root(controllers.RootController):
> > > @expose(template="mathlan_info.templates.frontdoor")
> > > def index(self):
> > > return dict(grid=DataGrid(fields=[('title', 'Hi There'),
> > > ('name', 'First Data Grid')]))
> >
> > > If you could help me get this widget working, I feel like the rest
> > > will come easily. I'm just feeling kind of lost without any example
> > > that I can successfully implement.
> >
> > > Thanks for all your help.
> >
> > what's the problem?
> >
> > - data inside the grid?
> > - a clear source?
> > - other error?
> >
> > Glauco
> >
> > --
> > +------------------------------------------------------------+
> > Glauco Uri
> > glauco(at)sferacarta.com
> >
> > Sfera Carta Software(R) info(at)sferacarta.com
>
> > Via Bazzanese,69 Casalecchio di Reno(BO) - Tel. 051591054
> > +------------------------------------------------------------+
> >
>
--
--
Vim auto completion for python
http://lucasmanual.com/mywiki/FrontPage#head-8ce19b13e89893059e126b719bebe4ee32fe103c
TurboGears from start to finish:
http://www.lucasmanual.com/mywiki/TurboGears
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---