It took me a while to find the solution, which I am posting here:
class ArticleAdmin(admin.ModelAdmin):
form = ArticleAdminForm
def get_changeform_initial_data(self, request):
initial = super().get_changeform_initial_data(request)
initial['submitted_by'] = request.user
return initial
No comments:
Post a Comment