Hi guys,
I hope I don't get flamed but I am very new at python and turbogears.
I not sure that I can even ask the question correctly. So please be
tolerant of me.
My confusion is in this example
I have a Class which has two methods that returns a dictionary with a
datagrid using a widget
my classmates want to see their names as a header above the datagrid
by passing there names from a URL ( I hope this makes sense )
I read the docs, and know I can create a method like,
@expose()
def names(self, first='somebody', 'nobody'):
return 'Student: %s %s' % (first, last)
which either the URL ../first/last or via ?first=first&last=last will
work but I don't know how to combine both the datafrid widget method
and the names method to display together. I am totally lost.
I am feeling very lame here because what I want to do is
return 'Student: %s %s' % (first, last), dict(projects=projects,
projwidget=projwidget)
I know this is not correct to do cause I get errors, but I don't
understand it and what is the python syntax. Which is where my
confusion is. I don't know if I need to put the first last names in a
dictionary, or somehow combine the methods.
basically I have a method that returns arguments from the URL ( first
and last ) and I have a method that returns a widget/datagrid, what I
would like to do is pass the peoples names from the URL into the
widget and when the widget is called, dynamically display their name
as a header/caption.
Please advise me how to solve this. Know also that, I know I can
create a model with student's names, but this is not what I want, I
want to understand how to do this because it seems I am missing
something very fundamental which will teach me python and turbogears
more.
Thanks guys,
Nevyn
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---