Doing the homework

The hardest part for my sons, and for my students, seems to be doing the homework. It’s not so hard to go to class. It’s not so hard to do the things in class. But it is hard to do the homework.

I guess it is a case of priorities. Homework is not as fun as reading online or playing games or watching TV or goofing off.

How do I make it more a priority for them?