jazzband / django-hosts

Dynamic and static host resolving for Django. Maps hostnames to URLconfs.
http://django-hosts.rtfd.org
Other
979 stars 107 forks source link

Refresh hostconf on `ROOT_URLCONF` change #168

Closed joonhyungshin closed 3 months ago

joonhyungshin commented 3 months ago

It is a common scenario to use settings.ROOT_URLCONF in hostconf, e.g.

host_patterns = [
    host(r"www", settings.ROOT_URLCONF, name="www"),
]

If a developer wants to test a different urlconf, the hostconf won't refresh and this can be problematic. For this reason I suggest to reload hostconf on ROOT_URLCONF change as well.