Thank you SO MUCH for that suggestion for logger. I have some compress
tags in my templates, but I guess I haven't configured that correctly.
And I was getting following error.


  File 
"/home/ubuntu/.virtualenvs/myvirt/lib/python2.7/site-packages/compressor/base.py",
line 121, in get_filename
    filename = self.storage.path(basename)
  File 
"/home/ubuntu/.virtualenvs/myvirt/lib/python2.7/site-packages/django/core/files/storage.py",
line 261, in path
    raise SuspiciousFileOperation("Attempted access to '%s' denied." % name)
SuspiciousFileOperation: Attempted access to '/css/bootstrap311.min.css' denied.
Not Found: /accounts/login/

the way I debugged this was creating following setup in my
production.py and then /tmp/debug.log had this error.

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'file': {
            'level': 'DEBUG',
            'class': 'logging.FileHandler',
            'filename': '/tmp/debug.log',
        },
    },
    'loggers': {
        'django.request': {
            'handlers': ['file'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}

I removed the {% compress %} tags from my templates for now so I can
disable DEBUG on my "production/demo" server and everything works
great now!

-Subodh

On Sun, Aug 17, 2014 at 11:53 AM, Cal Leeming [iops.io] <c...@iops.io> wrote:
> Interesting, you could try removing the 400.html and allow it to raise the
> original exception that caused it.
>
> You could also try using a different WSGI server, such as uWSGI or gunicorn,
> as it could be a problem with that.
>
> Another option would be to use something like Sentry to capture the errors,
> or modify your `settings.LOGGING` to send to stderr.
>
> Cal
>
>
> On Sun, Aug 17, 2014 at 7:46 PM, Subodh Nijsure <subodh.nijs...@gmail.com>
> wrote:
>>
>> Unfortunately I don't see traceback neither in my nginx log or my
>> apache log that is what is making it very confusing and difficult to
>> debug...
>>
>> -Subodh
>>
>> On Sun, Aug 17, 2014 at 11:37 AM, Cal Leeming [iops.io] <c...@iops.io>
>> wrote:
>> > Can you please send us the traceback of the error generated? (assuming
>> > there
>> > is one)
>> >
>> > Cal
>> >
>> >
>> > On Sun, Aug 17, 2014 at 7:25 PM, Subodh Nijsure
>> > <subodh.nijs...@gmail.com>
>> > wrote:
>> >>
>> >> I am totally stumped why I can't get my site to work when DEBUG=False.
>> >>
>> >> I have entered my domain name and IP address in the ALLOWED_HOSTS
>> >>
>> >> I even tried putting '*' in my ALLOWED_HOST but when DEBUG=False I
>> >> always get my 400.html page served to me. As soon as DEBUG=True
>> >> everything works great.
>> >>
>> >> I have search through google tried all the checks people say to try (
>> >> I think) , all my urls end in '/'. none of my local.py or base.py have
>> >> DEBUG setting or ALLOWED_HOSTS
>> >>
>> >> ALLOWED_HOSTS = ['1.2.3.4', 'www.myhost.com', '*' , ]
>> >>
>> >> Nothing seems to be working.
>> >>
>> >> I even inserted by own dummy LoginRequierdMiddleware class it does get
>> >> called but I don't see anything wrong with request coming in.
>> >>
>> >> class LoginRequiredMiddleware:
>> >>       def process_request(self, request):
>> >>             print request
>> >>
>> >> I am running nginx and apache2 in production environment. I am really
>> >> stuck , desperately need help!Any clues on how to debug this?
>> >>
>> >> -Subodh
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "Django users" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> email to django-users+unsubscr...@googlegroups.com.
>> >> To post to this group, send email to django-users@googlegroups.com.
>> >> Visit this group at http://groups.google.com/group/django-users.
>> >> To view this discussion on the web visit
>> >>
>> >> https://groups.google.com/d/msgid/django-users/CALr9Q3Y_CvwWo1cPEcmROok13VQOneKnis2m9rwGQULbqo%3DpaQ%40mail.gmail.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Django users" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to django-users+unsubscr...@googlegroups.com.
>> > To post to this group, send email to django-users@googlegroups.com.
>> > Visit this group at http://groups.google.com/group/django-users.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/django-users/CAHKQagG%2BoyHxp%3DkOFZLZZBfrVLDcBYpWBPtFRAwKediRdwWkjg%40mail.gmail.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CALr9Q3aM4KgYZa4Jwe3egoyCzvK3UFTngmY7ckCb4sPPPtrMPw%40mail.gmail.com.
>>
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHKQagGBpVcETUMDhci1n09qpTg3v6Q_dBtUMGM_Ff%2Bur7%2BobQ%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALr9Q3Zae8_Pe5GAY8Y5cE_ExfQYtQ%2BowQRUE_vdiJKTzvg6Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to