Django: Get current user in model save

You can tackle this problem from another angle. Instead of changing the models save method you should override the AdminSites save_model method. There you’ll have the request object and can access the logged in user data as you already pointed out.

Have a look at this chapter of the docs: Django ModelAdmin documentation save_model

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)