As far as I know, there is no easy way to do that. Either you have to
write your custom view and manipulator for administration and
overwrite the default urls, or you have to make use of javascript and
asynchronous  requests to save these additional fields.

Regards,
Aidas Bendoraitis aka Archatas



On 12/19/06, Rob Slotboom <[EMAIL PROTECTED]> wrote:

This is my model and it works in Admin due to the efforts of Antoni.
(see link at the bottom)
What I want to do is to add a collumn to the inline editing list
representing some field from the related content_object. Is there an
easy way to do this?


class Category(models.Model):
   name = models.CharField(maxlength=20)
   parent = models.ForeignKey('self', blank=True, null=True,
related_name='child_set')

   def __str__(self):
      return self.name

   def get_absolute_url(self):
      return "./%i/" % self.id

   def admin_links(self):
      return '<a href="%s">edit</a> | <a href="%s">view</a> | <a
href="%s/delete">delete</a>' % (self.id, self.get_absolute_url(),
self.id)

   admin_links.allow_tags = True
   admin_links.short_description = 'Actions'

   class Admin:
      pass

class CatItem(models.Model):
   category = models.ForeignKey(Category, edit_inline=models.TABULAR,
num_in_admin=3)
   content_type = models.ForeignKey(ContentType)
   object_id = models.PositiveIntegerField(db_index=True, blank=True,
null=True,core=True,)
   content_object = models.GenericForeignKey()





#######
http://net-x.org/weblog/2006/nov/29/django-generic-relations-made-easier/


>


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to