Ticket #14679: 14679.diff

File 14679.diff, 830 bytes (added by fisadev, 4 years ago)
  • django/contrib/auth/admin.py

     
    137137            'root_path': self.admin_site.root_path,
    138138        }, context_instance=RequestContext(request))
    139139
     140    def response_add(self, request, obj, post_url_continue='../%s/'):
     141        '''The user model has a different workflow on add.'''
     142        # if the save button was pressed, it acts as the save and continue
     143        # editing  button
     144        if not request.POST.has_key("_addanother"):
     145            request.POST["_continue"] = 1
     146        return super(UserAdmin, self).response_add(request, obj, post_url_continue)
    140147
    141148admin.site.register(Group, GroupAdmin)
    142149admin.site.register(User, UserAdmin)
Back to Top