I have a problem with Django, running on Apache and Python 3.5.
App is running okay, and the first problem with my app is with Debug=False thing. I already created custom handler404 method , and when i type some wrong URL, basically I'm expecting Django on request to show me my custom 404 template, but he don't do that! Django constantly showing his message: *You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page. *
settings.py with middleware
DEBUG = False
ALLOWED_HOSTS = ["www.bancaintesa.com"]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
Here is the file views.py with handler404
def handler404(request):
response = render_to_response('404.html', context_instance=RequestContext(request))
response.status_code = 404
return response
urls.py file
handler404 = 'intesa.views.handler404'
Second thing, installed version of Django is 1.10, but when i run Django app on some irrelevant URL error, he shows me that Django is running on 1.8.7 version. Mindblowing. Any explanation?
Does anybody knows what is happening or somethinf, Thank you, I appreciate it [very much] (sorry for bad english).