original_docstring: 
          Admin action to revert a configuration back to the selected value
          
docstring: Admin action to revert a configuration back to the selected value
docstring_tokens: Admin action to revert a configuration back to the selected value
code: def revert(self, request, queryset):
          """
          Admin action to revert a configuration back to the selected value
          """
          if queryset.count() != 1:
              self.message_user(request, _("Please select a single configuration to revert to."))
              return
          target = queryset[0]
          target.id = None
          target.changed_by = request.user
          target.save(action_type='create')
          self.message_user(request, _("Reverted configuration."))
          return HttpResponseRedirect(
              reverse(
                  'admin:{}_{}_change'.format(
                      self.model._meta.app_label,
                      self.model._meta.model_name,
                  ),
                  args=(target.id,),
              )
          )
code_tokens: def revert ( self , request , queryset ) : if queryset . count ( ) != 1 : self . message_user ( request , _ ( "Please select a single configuration to revert to." ) ) return target = queryset [ 0 ] target . id = None target . changed_by = request . user target . save ( action_type = 'create' ) self . message_user ( request , _ ( "Reverted configuration." ) ) return HttpResponseRedirect ( reverse ( 'admin:{}_{}_change' . format ( self . model . _meta . app_label , self . model . _meta . model_name , ) , args = ( target . id , ) , ) )
short_docstring: Admin action to revert a configuration back to the selected value
short_docstring_tokens: Admin action to revert a configuration back to the selected value
comment: """
          Admin action to revert a configuration back to the selected value
          """