On 2/15/06, David S. <[EMAIL PROTECTED]> wrote:
> Sadly, no.  The use case is a link from another context (page) that contains
> some of the values in question, i.e. from an author detail, click "add book" 
> so
> that the book add admin page is returned with the author field populated (this
> is simplied, please trust me that using ForeignKey is not a solution.)

Every admin add and change form accepts default values in arbitrary
GET parameters. For example, this URL will automatically populate the
"author" field with the value "foo":

http://somedomain/admin/blah/authors/add/?author=foo

If you need to populate a foreign-key value, use the ID of the value.

http://somedomain/admin/blah/authors/add/?author=3

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to