In the United States I think you can actually. Nothing stops you. You can't discriminate based on a few criteria like race, age, gender (and depending on the state) sexual orientation.
Presumably landlords in DC can still kick people out for wearing an Obama / Trump shirt. (That’s supporting a candidate, not a party.)
I’d be curious to see court precedents on this.