We added such a check in runserver [1]. For other servers it seems less 
clear to me where that check would go -- in the WSGI handler? In 
django.setup()? (obviously, there is no need for ALLOWED_HOSTS if you are 
using Django outside a webserver context, so the check could be annoying if 
it's there).

[1] https://code.djangoproject.com/ticket/19875

On Wednesday, June 10, 2015 at 1:40:11 PM UTC-4, Carl Meyer wrote:
>
> On 06/10/2015 09:55 AM, Robert Roskam wrote: 
> > I realize this is a simple thing, but I'm sure this will save some 
> > people time. 
> > 
> > Since Allowed_Hosts is a required setting, when debug mode is off, it 
> > should raise an appropriate ImproperlyConfigured error. 
> > 
> > I'm sure there's some broader discussion surrounding which settings 
> > should have this and why, but I haven't been able to find it. 
>
> This makes sense - a configuration with DEBUG=False and empty 
> ALLOWED_HOSTS can't possibly work, so why should we even allow it to 
> start up? Can anyone else recall a reason why we didn't do this? 
>
> Carl 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c4af417b-4775-4fda-90ad-f6bf2c93f9b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to