Yup, it can get confusing. Those with EXPERIENCE will tell you that you can indeed keep bettas in community tanks, while those that listen to fish stores or myths on the internet will tell you they'll kill everything you put with them. It's true that sometimes a person will end up with an unusually aggressive betta, but this is not the norm, and the betta can always be traded in for another. I've also heard the myth that bettas drown in larger tanks, as if they didn't have gills - silly nonsense.
Betta's are not so aggressive and can be kept in community tanks, but the tank must be planned around them. In your specific tank it's not such a good idea because Danios are a poor mix - they're fast and active and will stress out a betta and possibly n-i-p at his fins. If you want a betta, trade the danio's for a calmer schooling fish like tetras.
The key to choosing good fish for a betta is simple - no fast, active fish, no nipping fish. Tiger barbs are danios are perfect examples of this. No territorial fish or it will cause fights with the betta. Gouramis and cichlids are perfect examples of this. Naturally no goldfish - they shouldn't be with tropical fish in the first place. No fish that look like the betta or it can cause mistaken conflict. No other bettas.
DO make sure you keep schooling fish in schools - 6 at least is best. This will ease their stress and prevent the betta from targeting them.
I keep a 15 gallon with 8 cardinal tetras, 3 oto cats, 4 cordora cats, and a betta, who is active and healthy and ignores the rest of the fish. This tank setup is over 3 years old now.