diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-07-26 23:24:55 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-07-26 23:24:55 +0000 |
| commit | 9b983831752d61b340bc67b0be5d2c8c5dbfcb18 (patch) | |
| tree | 83b0f6d01271304cbaa04ec6bf39c2a2aedfabbc | |
| parent | d52db2d879a4ab7b9318c71a22efe83ab462ddc8 (diff) | |
Fixed #187 -- Made admin view handle one-to-one relationships in which the parent relationship doesn't have the 'admin' parameter set. Thanks, Moof
git-svn-id: http://code.djangoproject.com/svn/django/trunk@331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/views/admin/main.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/views/admin/main.py b/django/views/admin/main.py index dbefc1c569..c24e17b3d1 100644 --- a/django/views/admin/main.py +++ b/django/views/admin/main.py @@ -79,6 +79,9 @@ def change_list(request, app_label, module_name): if opts.one_to_one_field: lookup_mod = opts.one_to_one_field.rel.to.get_model_module() lookup_opts = lookup_mod.Klass._meta + # If lookup_opts doesn't have admin set, give it the default meta.Admin(). + if not lookup_opts.admin: + lookup_opts.admin = meta.Admin() # Get search parameters from the query string. try: |
