Changes between Version 7 and Version 8 of CookBookNewformsAdminAndUser


Ignore:
Timestamp:
Aug 9, 2008, 1:04:32 PM (16 years ago)
Author:
oyvind
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CookBookNewformsAdminAndUser

    v7 v8  
    2626    fields= ('content',)
    2727
    28     def __call__(self, request, url):
    29 
    30         self.user = request.user
    31 
    32         return super(PostModelAdmin, self).__call__(request, url)
    33 
    3428    def save_model(self, request, form, change):
    3529
    3630        new_object = form.save(commit=False)
    3731
    38         new_object.user = self.user
     32        new_object.user = request.user
    3933        new_object.save()
    4034
Back to Top