def reset_sequence(model):
 sql = connection.ops.sequence_reset_sql(no_style(), [model])
 for cmd in sql:
  connection.cursor().execute(cmd)

def reset_sequence ( model ) : sql = connection . ops . sequence_reset_sql ( no_style ( ) , [ model ] ) for cmd in sql : connection . cursor ( ) . execute ( cmd )
reset the id sequence for a model .