Hello, In my model, I define the choices for a charfield. I make a ModelForm of that model but I want my own widget for that field. How can I pass-through the choices I defined in my model?
Some code: class Movie( Relic ): disk_type = models.CharField( 'Type', max_length=8, choices=((u'1','one'), (u'2',u'two')), default=u'1' ) class MovieForm( BasicRelicForm ): disk_type = forms.CharField( widget = choicewidget( choices=?? )) class Meta: model = Movie What would I put in the choices=?? line? I have found this voodoo: forminstance._meta.model.disk_type.choices But it needs an instance to work. I could use a global var and repeat it twice, but I'd like to know if there's a way to simply 'fetch' it from the model. Any clues? \d --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---