Overriding method python class of a pip module to update its behavior globally
Overriding method python class of a pip module to update its behavior globally Question: Using OOP I want to do something like from django.contrib import admin class NavigateFormAdmin(admin.ModelAdmin): def render_change_form(self, request, context, add=False, change=False, form_url=”, obj=None): context[‘next_record_id’] = custom_function_to_calculate(context[‘obj’].id) res = super().render_change_form(request, context, add, change, form_url) return res And expect that whenever render_change_form of admin.ModelAdmin …