It is too late to get them to make you the manager when they have already announced the other person is going to do the job.
Now what that means is that you need to learn how to position yourself for the job you want before it is vacant. You need to ask for more leadership opportunities and you need to make your boss aware that you are interested in management. You need to learn the realities of politics (all managers deal extensively with politics daily.)
However, based on what you wrote, I don't think you are interested in management, I think you just don't like having a new boss you don't care for. What you appear to want is freeedom to do anything you want to do which is a nice pipe-dream but is something no responsible company will give you in practice. You want to be a developer who can play with whatever he wants to play with which is a recipe for career disaster.
You don't indicate that you understand managment or that what the users need is more important than what you want. Further, you are a contractor, the management position is never going to be given to the contractor over the permanent employee. You are not an employee of the company, so of course you were not considered for the position. As a contractor, you will work for many people under many circumstances and you will very often be faced with working for someone you do not care for. It is a work skill you need to get.
Now as to this guy and how to work with him. First, I have in the past been assigned to work for someone I disliked or did not respect. Sometimes when you actually get to know them better you will find they are better than you think and they will be someone you can learn from. At a minimum this person clearly understands more about how to work the political end of management which you clearly do not. You can learn from him. Now granted, on occasion, what you learn is how you don't want to behave later when you are a manager yourself if this is truly where you want to go. This too is valuable knowledge. I have never worked with any person that I did not learn something valuable from.
The first task you have is to talk to the new manager and find out how he wants to work with you. Then adapt to his style. (This is critically important, his style of managing work is the new normal, adapt.) He will consider your input more if you do not antagonize him from the start. Don't be patronizing and come off as the expert because he doesn't know web developement. Never make your boss feel as if you dislike him or think he is stupid, especially if you do. This guy now has the power to end your contract or decide if you wil be converted to a permanent employee. You need to impress him with you abilities and part of impressing him is learning what he will find impressive and doing that. You only have 6 more months on your contract, give this guy at least that amount of time and if you still don't think he is a good manager, start looking as your contract end date is coming up. In a career, 6 months is a drop in the bucket.
Leaving becasue you have a new manager is an indicator that you are difficult to work with to a hiring official. At least give the guy a try. Leaving at this point is the single worst mistake you can make. You need to learn how to roll with the punches and keep working and doing a good job. Or you will shortly find yourself with a series of short jobs because something you didn't like happened. Well here's a hint, something you don't like will happen at 100% of all organizations you could work for. Even people who own the company have things they don't like that they have to deal with. Learn to deal before you move on.