Sunday, April 21, 2013

Modifying a field in another model

My (newbye) problem is as follows:

Suppose

class Person(models.Model):      first_name = models.CharField(max_length=30)      last_name = models.CharField(max_length=30)
    address = models.CharField(max_length=100)
        ............................

class Lent_Book(models.Model):      title = models.CharField(max_length=100)      to_whom = models.ForeignKey(Person)
    last_known_address= >>>>HERE I WOULD LIKE TO SHOW AND, IF NECESSARY, MODIFY Person.address

In a nutshell, my problem is: when I run admin and open Lent_book I would like to have a changeable field 'last-know_address' that  modifies Person.address in one shot (without having to open Person).

Is that possible and how?

An example would be highly appreciated.

Ciao from Rome
Vittorio
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate