mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
Updated example of customized ModelAdmin in documentation for 1.4
The change_view method of django.contrib.admin.ModelAdmin takes an extra `form_url` argument in Django 1.4.
This commit is contained in:
parent
4865274bc1
commit
04e8ef5a83
@ -1266,11 +1266,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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user