original_docstring: Deletes the category that is currently selected
docstring: Deletes the category that is currently selected
docstring_tokens: Deletes the category that is currently selected
code: def deletecategory(self, event=None):
          '''Deletes the category that is currently selected'''
          message = messagebox.askyesno(message='Are you sure you want to delete the category')
          if not message:
              return
  
          c.execute('DELETE FROM questions WHERE subject = (?)', (self.category,))
          c.execute('DELETE FROM subjects WHERE subject = (?)', (self.category,))
          conn.commit()
  
          messagebox.showinfo(message='Category deleted successfully! Choose another category!')
  
          self.refreshlist()
  
          self.window.destroy()
          self.changecategory()
code_tokens: def deletecategory ( self , event = None ) : message = messagebox . askyesno ( message = 'Are you sure you want to delete the category' ) if not message : return c . execute ( 'DELETE FROM questions WHERE subject = (?)' , ( self . category , ) ) c . execute ( 'DELETE FROM subjects WHERE subject = (?)' , ( self . category , ) ) conn . commit ( ) messagebox . showinfo ( message = 'Category deleted successfully! Choose another category!' ) self . refreshlist ( ) self . window . destroy ( ) self . changecategory ( )
short_docstring: Deletes the category that is currently selected
short_docstring_tokens: Deletes the category that is currently selected
comment: '''Deletes the category that is currently selected'''