Both parties did not enable him. The Dems did not fight him adequately but they did not enable him. He wanted the shutdowns, but the only way not to have a shutdown would have been to make unacceptable concessions. And then he'd have increased his demands and the whole thing would have repeated. Whereas what he got out of the shutdowns is less than he went in with.
You could argue that the left-leaning parts of the media spent a bit too much time laughing at Trump and not enough time worrying about him, but from day one it was obvious who he was and that he had media clout.