Further info,
Looks like from within a widget there's no easy way to find the Form. I'd a
thunk there'd be a Parent attribute, but there ain't.
So:
If you are doing something like this:
class SomeWidget( forms.TextInput ):
def __init__(self,attrs=None, PASSANYTHINGHERE=whatever ):
self.whatever = whatever # Helpful stuff
super(fklookupwidget,self).__init__(attrs)
def render(self, name, value, attrs=None):
#value is the field you assign this widget to.
#So, if it's an id or pk, you have it now.
#You also have self.whatever to work with.
hth,
\d
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---