just for the record, this is the ticket:
http://code.djangoproject.com/ticket/9362

it´s been opened 5 months ago ...


On 11 Mrz., 15:07, patrickk <sehmasch...@gmail.com> wrote:
> I´ve figured out that this seems to be a bug with edit_inline.
>
> patrick.
>
> On 11 Mrz., 13:46, patrickk <sehmasch...@gmail.com> wrote:
>
> > when using "self.content_type" within "__unicode__" on one of my
> > models, I´m not getting the right ContentType. instead of getting the
> > reference to _another_ model, I´m always getting the current model.
>
> > an example:
>
> > class ContainerListItem(models.Model):
> >     containerlist = models.ForeignKey(ContainerList)
> >     content_type = models.ForeignKey(ContentType)
> >     object_id = models.PositiveIntegerField('ID')
> >     content_object = generic.GenericForeignKey('content_type',
> > 'object_id')
> >     ....
>
> >     class Meta:
> >         ....
>
> >     def __unicode__(self):
> >         print self.content_type
> >         ...
>
> > in my database, the value for content_type is "10" (which is the ID of
> > the model "movies"). but, instead of "10", I´m getting "44", which is
> > the ID of the model "ContainerListItem".
>
> > I´m probably missing something here, but the reference to ContentType
> > is working on my website. It´s just not possible to use that reference
> > for the models representation ... this is spooky.
>
> > thanks,
> > patrick
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to