Two options:
- Define the domain name as a constant in your settings and use it where needed in your code. If you have only one site this is a reasonable decision as you no longer need the whole
sites
framework. - Enable the
sites
framework again and define oneSite
object withwww.example.com
as domain. You'll also need to specify the site's id asSITE_ID
in your Django settings.