Answers for "django admin override save"

0

django admin override save

def save_model(self, request, obj, form, change):
    if not obj.pk:
        # Only set added_by during the first save.
        obj.added_by = request.user
    super().save_model(request, obj, form, change)
Posted by: Guest on June-12-2021

Code answers related to "django admin override save"

Browse Popular Code Answers by Language