heya,

Thanks for the reply =).

I tried that, and the fields aren't there, but when I try to save the
object, I get a:

    IntegrityError at /admin/people/address/add/
    people_address.content_type_id may not be NULL

so obvoiusly Django doesn't like it if those fields aren't filled.

How do people normally do this sort of thing, with a polymorphic
object that's referenced by multiple other objects?

Cheers,
Victor

On Jan 19, 5:59 pm, Raffaele Salmaso <raffaele.salm...@gmail.com>
wrote:
> Victor Hooi wrote:
> > class AddressAdmin(VersionAdmin):
> >     pass
> > class AddressInline(generic.GenericTabularInline):
> >     model = Address
> > ...
>
>       fields = (the fields you want to display)
> or
>       exclude = ('content_type', 'object_id',)
>
> > class HospitalAdmin(admin.ModelAdmin):
> >     inlines = [
> >         AddressInline,
> >     ]
> > ...
> > admin.site.register(Address, AddressAdmin)
>
> --
> ()_() | That said, I didn't actually _test_ my patch.      | +----
> (o.o) | That's what users are for!                         | +---+
> 'm m' |                                   (Linus Torvalds) |  O  |
> (___) |              raffaele dot salmaso at gmail dot com |
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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