Last few questions if you anybody is able to answer them.
 How I can modify the data controller so I can pass the
 fastdatawidget to an object which later gets passed to my template.

 With datagrid I was able to create an datagrid object and pass it to
 template. But due to number of columns it would be faster for me to
 use fastdata.

 Here is an example in data grid that would work for me....but it needs
 to be modified for fastdata.
 [Datagrid]
 mycustom_widget = DataGrid(fields=[
     ('NumberOfPayments', lambda row=row[0]),
     ('Due Each Month', lambda row=row[1]),
 ])
 mydefaults=[(6,100),(2,300)]

 [Fastdatagrid]
 Fastdata will create widget fields, right?. Is this automatically
 created in fastdata by virtue of sqlobjects. What is the proper code
 to initiate it ?

 [datagrid2]
 This is how i would create an object of the widget.
 from model import *
 x=mycustome_widget.display(mydefaults)
 return dict(mydatagrid=x)


 [fastdata2]
If my sqlobject class is called sqlclass. Datacontroller will build
the whole localhost:8080/sqlclass
 How do i convert it to an object that can be passed to template?

 [datagrid3
 In template I would display it in this way.
 <span py:content="mydatagrid">datagrid will apear here</span>

 [fastdata3]
 How do i do it in fastdata?


Thanks,
Lucas




On 7/30/07, Lukasz Szybalski <[EMAIL PROTECTED]> wrote:
> On 7/30/07, Christopher Arndt <[EMAIL PROTECTED]> wrote:
> >
> > Lukasz Szybalski schrieb:
> > > Is the version in the repository different from the one in the download 
> > > section?
> > > Does the svn version support TurboGears 1.0.x ? and python 2.5?
> >
>   > Yes and yes.
> >
> > But even the SVN version does not fully support all SQLObject column
> > types. Support for DataTimeCols is currently broken. Support for
> > RelatedJoins and MultipleJoins rather experimental.
> >
>
> I am having problems with implementing fastdata into my template:
>
> How do i set the widget?
> How do I pass this widget to my template?
>
>
> controler.py
> class Root(controllers.RootController):
>     @expose(template="myapp.templates.mybrowse")
>      def mybrowse(self):
>         from model import myClass
>         from tgfastdata import DataController
>         from tgfastdata.datawidgets import FastDataGrid
>         #creates a form generic widget?Do I need to pass a myClass to it?
>         database_form=FastDataGrid()
>         #initiates widget?
>         x=DataController(sql_class=myClass,list_widget=database_form)
>         return dict(datagrid=x)
>
> template.mybrowse.kid
>  <a py:content="datagrid">data grid</a>
>
> I get in localhost:8080/mybrowse:
> <tgfastdata.datacontroller.DataController object at 0x0155E7F0>
>
> 1. How do i properly initiate the widget?
> 2.What should be passed to template? Datacontroller or FastdataGrid?
> 3. How do i properly display it? if in template i do datagrid.display() I get
> AttributeError: 'DataController' object has no attribute 'display'
>
> Lucas
>

http://lucasmanual.com/mywiki/TurboGears?action=show#head-93e3717ef5146d4beccc1578f5a5f44cb6109e64

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to