[1.4.x] Merge pull request #233 from rafikdraoui/modeladmin-doc

Updated example of customized ModelAdmin in documentation for 1.4

Backport of a04f68b15d from master.
This commit is contained in:
Tim Graham 2012-08-05 10:21:14 -07:00
parent c54034a2ad
commit df8a2bf4cb
1 changed files with 2 additions and 2 deletions

View File

@ -1281,11 +1281,11 @@ provided some extra mapping data that would not otherwise be available::
# ...
pass
def change_view(self, request, object_id, extra_context=None):
def change_view(self, request, object_id, form_url='', extra_context=None):
extra_context = extra_context or {}
extra_context['osm_data'] = self.get_osm_info()
return super(MyModelAdmin, self).change_view(request, object_id,
extra_context=extra_context)
form_url, extra_context=extra_context)
.. versionadded:: 1.4