2👍
def save_model(self, request, obj, form, change):
obj.user = request.user
obj.save()
I tried it and it worked well .
and this is the source
- [Django]-Django test the correct template used: with self.assertTemplateUsed()
- [Django]-When is a Django QuerySet evaluated?
- [Django]-Django 1.6 HTTP_X_CSRFTOKEN header ignored if csrf cookie is missing
- [Django]-Django comment moderation error: AlreadyModerated at /
- [Django]-How to configure code completion for Django based projects in PyDev?
- [Django]-How to make the login form available on whole site on Django
- [Django]-Order by a content object's value in Django
- [Django]-Identify which polygon contains a point with Django?
- [Django]-'model' object has no attribute 'id'
- [Django]-Django testing: RequestFactory() follow redirect
Source:stackexchange.com