What's the new "field" parameter in the ManyToOneRel __init__ function?
(I can't really decide if this should go here or in django-dev, since I'm asking how to use a private class. If it'd fit better elsewhere, just let me know please.) Hi, I'm working on updating an app (not written by me (django-blog-zannia, for the curious)) to python 3.3 and django 1.6 . I've got a test failure relating to the fact that the signature for ManyToOneRel has changed, (It changed in this commit: https://github.com/django/django/commit/97774429aeb54df4c09895c07cd1b09e70201f7d , in response to this issue: https://code.djangoproject.com/ticket/19385 ) gaining a new "field" parameter in the __init__ call. I realize that it's a private class, but if anyone could explain what this new "field" parameter is supposed to be, it'd be appreciated. Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: What's the new "field" parameter in the ManyToOneRel __init__ function?
For a little bit of context, here's an example of code that perviously worked but now doesn't: class CategoryAdminForm(forms.ModelForm): """Form for Category's Admin""" parent = TreeNodeChoiceField( label=_('Parent category'), level_indicator='|--', required=False, empty_label=_('No parent category'), queryset=Category.objects.all()) def __init__(self, *args, **kwargs): super(CategoryAdminForm, self).__init__(*args, **kwargs) rel = ManyToOneRel(Category, 'id') self.fields['parent'].widget = RelatedFieldWidgetWrapper( self.fields['parent'].widget, rel, self.admin_site) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: What's the new "field" parameter in the ManyToOneRel __init__ function?
Er, it's not part of the API. You know what I mean. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.
Re: What's the new "field" parameter in the ManyToOneRel __init__ function?
Thank you! That tentatively fixes the issue. Now I just need to talk to the original author and make the code not use this API at all... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.