It's your understanding that, basically, any town-council, of any state, could enact and enforce such a ban without any serious legal obstructions?
As long as the Constitution is not being violated, either in its due process for passing the legislation, or its adherence to individual rights expressly protected in the Constitution, then local government bodies can and do place such restrictions on business all the time. There are plenty of dry counties, Blue Laws, and all sorts of laws governing business behavior that localities have passed, and have never been overturned as unconstitutional as far as I know.
Do I personally agree with and support such laws? No. I would not want to live in such a place, and would either work to change the laws or move to a place that didn't have such restrictions. But my personal distaste for such regulations does not prohibit a group of people, who wish to freely associate and voluntarily live by certain restrictions and codes, from passing them.
If a county was heavily Amish, for example, and as a matter of conscience the leaders and representatives (with the support of the people) wanted certain legal restrictions passed -- as long as the Constitution is the base document they abide by in the process of drafting the laws, and protection of individual rights under the Constitution is not violated, then they should be free to create a legal and moral environment to their liking, should they not?
I realize there are many gray areas where individual rights collide with legal restrictions, and this is where many court battles related to Constitutionality are fought -- so it's not a cut and dry situation, just a general principle that has been established through the years.