updating python to store requested photo info in DB