Gut and remove the head and bone of the sardines. Wash and pat dry, coat with flour and fry in olive oil. Drain them, remove the excess oil with a paper towel, salt and set aside.
Prepare a cooked marinade: fry the onions in olive oil over low heat and, when golden brown, add the vinegar. Keep over low heat for a few more minutes to reduce the vinegar slightly. Remove from pan, and set aside.
Fill a terracotta dish with alternate layers of sardines and the marinade and add pine nuts and raisins. The top layer should be the marinade.
Cover and let rest for 1-2 days before eating. This is a very good served as an antipasto.