Changes between Version 7 and Version 8 of CookBookNewformsAdminAndUser
- Timestamp:
- Aug 9, 2008, 1:04:32 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CookBookNewformsAdminAndUser
v7 v8 26 26 fields= ('content',) 27 27 28 def __call__(self, request, url):29 30 self.user = request.user31 32 return super(PostModelAdmin, self).__call__(request, url)33 34 28 def save_model(self, request, form, change): 35 29 36 30 new_object = form.save(commit=False) 37 31 38 new_object.user = self.user32 new_object.user = request.user 39 33 new_object.save() 40 34