I'm replying to my own message because I was getting some strange
behaviour and this is how I fixed it.
I would occasionally see unformatted debug_toolbar output after my
"under construction" page. I could reliably reproduce this "bug" (I
think it's a bug but I have no idea where) via the
Wow, was that ever easy. Thanks for your help!
Kurt
For future googlers:
settings.py:
MIDDLEWARE_CLASSES = (
...
'redirector.ConstructionFilterMiddleware',
...
)
redirector/__init__.py:
from django.shortcuts import render_to_response
from django.conf import settings
class Construct
You should and must do such things at middleware (as god intended).
example: http://www.djangosnippets.org/snippets/845/
just return custom HttpResponse, not HttpResponseForbiden
Kristaps Kūlis
On Sun, Oct 4, 2009 at 8:41 PM, Kurt wrote:
>
>
> I think I must be doing something fundamentally w
I think I must be doing something fundamentally wrong since this seems
like an easy problem...
I'm building a site, I want all ips not in INTERNAL_IPS to get an
"under construction" page and my internal ips to get the real site.
What I'm trying to do is call the application urlconf via the resol
4 matches
Mail list logo