Changes between Version 44 and Version 45 of NewformsAdminBranch
- Timestamp:
- Mar 30, 2008, 4:00:49 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NewformsAdminBranch
v44 v45 126 126 ordering = ('title',) 127 127 128 def has_change_permission(self, request, obj ):128 def has_change_permission(self, request, obj=None): 129 129 """ 130 130 John can only edit books by Roald Dahl. 131 131 """ 132 if request.user.username == 'john':132 if obj and request.user.username == 'john': 133 133 return obj.author.last_name == 'Dahl' 134 134 return super(BookOptions, self).has_change_permission(request, obj)