Datagrid widgets and csv in tc?

1 view
Skip to first unread message

Lukasz Szybalski

unread,
Jul 8, 2008, 11:43:43 AM7/8/08
to toscawidge...@googlegroups.com
Hello,
I am currently using turbogears datagrid, and paginate datagrid.

Question 1:
Are those available in tc? What are their names? Is the syntax the
same as tg widgets ? Examples?

Question 2:
Is there a option that overloads the tc datagrid/paginate grid to
provide csv,xls,odt,pdf export. I need at least csv. Examples on doing
so? Or example on how to make it happen?

Question 3:
What does "Tosca" mean? Is There a plan to maybe replace it with
something easier to remember? "pywidgets...etc.. I can never remember
the correct name, so every time I search for some info I need google
the right name, then search for my info.

Thanks,
Lucas

--
Where was my car manufactured?
http://cars.lucasmanual.com/vin
TurboGears Manual-Howto
http://lucasmanual.com/pdf/TurboGears-Manual-Howto.pdf

Florent Aide

unread,
Jul 9, 2008, 6:04:45 AM7/9/08
to toscawidge...@googlegroups.com
On Tue, Jul 8, 2008 at 5:43 PM, Lukasz Szybalski <szyb...@gmail.com> wrote:
>
> Hello,
> I am currently using turbogears datagrid, and paginate datagrid.
>
> Question 1:
> Are those available in tc? What are their names? Is the syntax the
> same as tg widgets ? Examples?

first of all: s/tc/tw

http://toscawidgets.org/documentation/WidgetBrowser/

> Question 3:
> What does "Tosca" mean? Is There a plan to maybe replace it with
> something easier to remember? "pywidgets...etc.. I can never remember
> the correct name, so every time I search for some info I need google
> the right name, then search for my info.

http://en.wikipedia.org/wiki/Tosca
http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Puccini_Tosca.jpg/200px-Puccini_Tosca.jpg

I don't think it will be renamed. After all Alberto does not ask that
you change your name. I'm sure you'll get used to it. And personally I
find this name quite pretty.

Florent.

Alberto Valverde

unread,
Jul 9, 2008, 9:21:12 AM7/9/08
to toscawidge...@googlegroups.com

>
> On Tue, Jul 8, 2008 at 5:43 PM, Lukasz Szybalski <szyb...@gmail.com>
> wrote:
>>
>>(...)

>> Question 3:
>> What does "Tosca" mean? Is There a plan to maybe replace it with
>> something easier to remember? "pywidgets...etc.. I can never remember
>> the correct name, so every time I search for some info I need google
>> the right name, then search for my info.
>
> http://en.wikipedia.org/wiki/Tosca
> http://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Puccini_Tosca.jpg/200px-Puccini_Tosca.jpg

Almost, but not quite, it actually indirectly comes from the opera but
also an Austrian band:

http://en.wikipedia.org/wiki/Tosca_%28band%29

The indirect part comes from a cat a friend of mine left at my house to
babysit while she had to travel a couple of years ago. Tosca, the cat,
fell in love with me and I fell in love with her so I soon became her
official babysitter whenever my friend had to travel. A couple of months
later she finally went back to live at her home in the UK. Instead of
leaving poor Tosca in mandatory quarantine for more than a month she
decided to leave Tosca with me. Happy end :)

Ahh, btw, the cat was named Tosca after the opera :)

> I don't think it will be renamed. After all Alberto does not ask that
> you change your name. I'm sure you'll get used to it. And personally I
> find this name quite pretty.

:D Well said Florent. Sorry Lukasz, TW has already gone through an
identity crisis before:

http://groups.google.com/group/turbogears-trunk/tree/browse_frm/month/2006-11/bd9432ccb36876cd?rnum=81&_done=%2Fgroup%2Fturbogears-trunk%2Fbrowse_frm%2Fmonth%2F2006-11%3F

And besides that, it's probably more work for us to rename every package,
mention in the docs, pypi, logo, etc... than for you to change your name
;)

Alberto

Lukasz Szybalski

unread,
Jul 9, 2008, 1:10:02 PM7/9/08
to ToscaWidgets-discuss


On Jul 9, 5:04 am, "Florent Aide" <florent.a...@gmail.com> wrote:
> On Tue, Jul 8, 2008 at 5:43 PM, Lukasz Szybalski <szybal...@gmail.com> wrote:
>
> > Hello,
> > I am currently using turbogears datagrid, and paginate datagrid.
>
> > Question 1:
> > Are those available in tc? What are their names? Is the syntax the
> > same as tg widgets ? Examples?
>
> first of all: s/tc/tw
done.
>
> http://toscawidgets.org/documentation/WidgetBrowser/

I'm still not able to find out if datagrid and paginate data grid is
available in tw?
http://toscawidgets.org/documentation/WidgetBrowser/embed.html#using-the-widgetbrowser-directive
From the demo I see that you have most of the widgets that tg has but
do you have datagrid?

Here are the tg.widgets available:

['AjaxGrid', 'AutoCompleteField', 'Button', 'CSSLink', 'CSSSource',
'CalendarDat
ePicker', 'CalendarDateTimePicker', 'CalendarLangFileLink',
'CheckBox', 'CheckBo
xList', 'CompoundFormField', 'CompoundInputWidget', 'CompoundWidget',
'DataGrid'
, 'FieldSet', 'FileField', 'Form', 'FormField', 'FormFieldsContainer',
'HiddenFi
eld', 'ImageButton', 'InputWidget', 'JSLink', 'JSSource', 'JumpMenu',
'Label', '
Link', 'LinkRemoteFunction', 'ListForm', 'LocalizableJSLink',
'MultipleSelectFie
ld', 'PaginateDataGrid', 'PasswordField', 'RPC', 'RadioButtonList',
'RemoteForm'
, 'RepeatingFieldSet', 'RepeatingFormField', 'RepeatingInputWidget',
'ResetButto
n', 'Resource', 'SelectionField', 'SingleSelectField', 'Source',
'SubmitButton',
'SyntaxHighlighter', 'Tabber', 'TableForm', 'TextArea', 'TextField',
'URLLink',
'Widget', 'WidgetDescription', 'WidgetsList', '__builtins__',
'__doc__', '__fil
e__', '__name__', '__path__', 'all_widgets', 'base', 'big_widgets',
'datagrid',
'forms', 'i18n', 'js_location', 'links', 'load_widgets', 'meta',
'mochikit', 're
gister_static_directory', 'rpc', 'set_with_self', 'static']

Could you point me to similar list for tw?


Also, has anybody though of some kind of connection between tw and
Xforms?
It would be great If I was able to create a xfroms in openoffice, then
save it and tell tw to use the form I crated? That's something in the
future maybe? I see it as designing advanced forms layouts use
openoffice, and using them on turbogers sites.



>
> > Question 3:
> > What does "Tosca" mean? Is There a plan to maybe replace it with
> > something easier to remember? "pywidgets...etc.. I can never remember
> > the correct name, so every time I search for some info I need google
> > the right name, then search for my info.
>
> http://en.wikipedia.org/wiki/Toscahttp://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Puccini_Tosc...
>
> I don't think it will be renamed. After all Alberto does not ask that
> you change your name. I'm sure you'll get used to it. And personally I
> find this name quite pretty.

I tired I guess.
Keep the name change in mind if you ever merge with another project in
the future.
Lucas

Dean Landolt

unread,
Jul 9, 2008, 8:55:28 PM7/9/08
to toscawidge...@googlegroups.com
Also, has anybody though of some kind of connection between tw and
Xforms?
It would be great If I was able to create a xfroms in openoffice, then
save it and tell tw to use the form I crated? That's something in the
future maybe? I see it as designing advanced forms layouts use
openoffice, and using them on turbogers sites.

I agree there is some symmetry here but having given this some thought in the past, it seems to me the burden should be on desktop apps (e.g. OpenOffice) to come around to accepting html form input in one way or another. After all, you can't argue with broad acceptance of that standard. Projects like tw are just doing them a favor all the more...

I'd go even further and say desktop gui toolkits should quit reinventing the wheel too, but that would border on sacrilege.

Alberto Valverde

unread,
Jul 10, 2008, 5:03:36 AM7/10/08
to toscawidge...@googlegroups.com
Lukasz Szybalski wrote:
> (....)

>
> I'm still not able to find out if datagrid and paginate data grid is
> available in tw?
>
No paginated grid (although I wouldn't mind adding one to tw.forms if
some kind soul contributes it :) but there is a port of tg's datagrid:
http://toscawidgets.org/documentation/tw.forms/modules/datagrid.html#module-tw.forms.datagrid

A non-exhaustive list of available TW widgets (only those that are
installed in tw.org) is in the "widgets" tab here:
http://toscawidgets.org/widget

Regarding xforms, I have no plans to implement a bridge between xforms
and tw.forms.

Alberto

Lukasz Szybalski

unread,
Jul 10, 2008, 11:37:33 AM7/10/08
to ToscaWidgets-discuss


On Jul 9, 7:55 pm, "Dean Landolt" <d...@deanlandolt.com> wrote:
> > Also, has anybody though of some kind of connection between tw and
> > Xforms?
> > It would be great If I was able to create a xfroms in openoffice, then
> > save it and tell tw to use the form I crated? That's something in the
> > future maybe? I see it as designing advanced forms layouts use
> > openoffice, and using them on turbogers sites.
>
> I agree there is some symmetry here but having given this some thought in
> the past, it seems to me the burden should be on desktop apps (e.g.
> OpenOffice) to come around to accepting html form input in one way or
> another. After all, you can't argue with broad acceptance of
> *that*standard. Projects like tw are just doing them a favor all the
> more...
>

I would assume that if xml or xhtml form confirms to "xforms" then it
should go both ways. web -> desktop app ->web.

Could you go into more details as far as what is the difference
between xforms and tw widgets for example, and what would have to
happen on tw side in order to use xforms(import export)?

Lucas

Lukasz Szybalski

unread,
Jul 10, 2008, 11:42:37 AM7/10/08
to ToscaWidgets-discuss

> > I'm still not able to find out if datagrid and paginate data grid is
> > available in tw?
>
> No paginated grid (although I wouldn't mind adding one to tw.forms if
> some kind soul contributes it :) but there is a port of tg's d
datagrid:http://toscawidgets.org/documentation/tw.forms/modules/
datagrid.html#...


Is there a port of paginate datagrid from tg? Would you be willing to
add it?

So I assume csv export is not available? Since you know more on detail
structure of datagrid what would one need to do to enable csv output.
Somehow get data that goes to datagrid, make a copy and give a csv
data feed? What function would need to be overloaded, where and how
would be nice.

Thanks,
Lucas

Alberto Valverde

unread,
Jul 11, 2008, 9:11:11 AM7/11/08
to toscawidge...@googlegroups.com
Lukasz Szybalski wrote:
>
>>> I'm still not able to find out if datagrid and paginate data grid is
>>> available in tw?
>>>
>> No paginated grid (although I wouldn't mind adding one to tw.forms if
>> some kind soul contributes it :) but there is a port of tg's d
>>
> datagrid:http://toscawidgets.org/documentation/tw.forms/modules/
> datagrid.html#...
>
>
> Is there a port of paginate datagrid from tg? Would you be willing to
> add it?
>

No there isn't but as I've said, I'll gladly add it


> So I assume csv export is not available? Since you know more on detail
> structure of datagrid what would one need to do to enable csv output.
> Somehow get data that goes to datagrid, make a copy and give a csv
> data feed? What function would need to be overloaded, where and how
> would be nice.
>

I would just put a link somewhere in the grid to a controller action
that returns the csv. A more sophisticated solution might involve
dumping the data as json in some js variable and formatting the csv on
the browser using javascript. See [1] for more details.

Alberto

[1]
http://toscawidgets.org/documentation/ToscaWidgets/modules/api.html#javascript-interfacing-utilities

Lukasz Szybalski

unread,
Jul 14, 2008, 12:27:09 AM7/14/08
to ToscaWidgets-discuss


On Jul 11, 8:11 am, Alberto Valverde <albe...@toscat.net> wrote:
> Lukasz Szybalski wrote:
>
> >>> I'm still not able to find out if datagrid and paginate data grid is
> >>> available in tw?
>
> >> No paginated grid (although I wouldn't mind adding one to tw.forms if
> >> some kind soul contributes it :) but there is a port of tg's d
>
> > datagrid:http://toscawidgets.org/documentation/tw.forms/modules/
> > datagrid.html#...
>
> > Is there a port of paginate datagrid from tg? Would you be willing to
> > add it?
>
> No there isn't but as I've said, I'll gladly add it
That would be great. When do you think you could have it done, and
would it be possible to also include fastdatagrid if its not to much
trouble.

>
> > So I assume csv export is not available? Since you know more on detail
> > structure of datagrid what would one need to do to enable csv output.
> > Somehow get data that goes to datagrid, make a copy and give a csv
> > data feed? What function would need to be overloaded, where and how
> > would be nice.
>
> I would just put a link somewhere in the grid to a controller action
> that returns the csv.
This would work. If the csv could have column names on the first line
and rest filled with data that would be great. The data length might
be big, so I'm not sure if javascript would scale? I'm not sure how
this would work using javascript ?

Let me know when you would have this available. I would convert my tg
datagrid to tw if csv export is available and give more feedback as
soon as possible.

Thanks,
Lucas

Lukasz Szybalski

unread,
Jul 18, 2008, 11:11:39 AM7/18/08
to ToscaWidgets-discuss
Since I didn't get a response, I created the ticket for it:

http://toscawidgets.org/trac/tw/ticket/18

The paginate datagrid is here:
http://trac.turbogears.org/browser/branches/1.0/turbogears/paginate.py

Export csv to web:
http://www.developer.com/lang/other/print.php/3727616


Thanks,
Lucas
Reply all
Reply to author
Forward
0 new messages