Ticket #17749: 17749.diff

File 17749.diff, 775 bytes (added by Claude Paroz, 13 years ago)

Documentation fix

  • docs/ref/contrib/admin/index.txt

    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index 1fde2ce..a287aee 100644
    a b provided some extra mapping data that would not otherwise be available::  
    12781278            pass
    12791279
    12801280        def change_view(self, request, object_id, extra_context=None):
    1281             my_context = {
    1282                 'osm_data': self.get_osm_info(),
    1283             }
     1281            extra_context = extra_context or {}
     1282            extra_context['osm_data'] = self.get_osm_info()
    12841283            return super(MyModelAdmin, self).change_view(request, object_id,
    1285                 extra_context=my_context)
     1284                extra_context=extra_context)
    12861285
    12871286.. versionadded:: 1.4
    12881287
Back to Top