Django — Edit Foreign Keys Directly In Place

I I’m not sure why there are so few results for googling this. Editing foreign keys directly, or at least taking us to the model in question I’ve wanted to do since the first day I used django. I’m finding it very difficult to search for so I’ll add it here. I had to pull out the patch filename to find it again. I wonder why?

The data for a forward relationship (Model A FK –> Model B) should positively identify the target model so I don’t know why a link option hasn’t been built in, because I know tons of people would appreciate that built-in functionality.

This patch will place an edit icon next to the “add” icon for direct foreign links, allowing you to edit an FK in the same manner: a pop up window.

Here’s the ticket that I used to patch my django on my dev server. So far, so good. Has it been merged into 1.1? That would make this useless.

Go to your directory that CONTAINS django (for example, django-trunk if you used SVN) and download the patch.


patch -p1 add_edit_icon.diff

Patch is not my cup of tea, but assuming django hasn’t changed too much, the command should install the patch. Type ‘man patch’ for details on the -pnum argument. I barely know this thing so I can’t say much more.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s