python - Server error 500 instead of appending slash django when debug=false -
on production server 500 server error when access /visitors url. use django 1.8 nginx.
i think django should append slash @ end , show me actual page. if access /visitors/ works fine.
when debug set true works fine.
i don't have error in error.log , access log is: (sorry picture, reason not able copy/paste on server).
i not serveradmin don't know files relevant in errors 1 let me know need , paste here.
edit:
settings.py
# ... other settings deleted middleware_classes = ( 'django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.common.commonmiddleware', 'django.middleware.csrf.csrfviewmiddleware', 'django.contrib.auth.middleware.authenticationmiddleware', 'django.contrib.auth.middleware.sessionauthenticationmiddleware', 'django.contrib.messages.middleware.messagemiddleware', 'django.middleware.clickjacking.xframeoptionsmiddleware', 'django.middleware.security.securitymiddleware', 'ea.logs_middleware.logsmiddleware', 'ea.custom_login_middleware.firstloginmiddleware', 'ea.profiler_middleware.profilemiddleware', ) wsgi_application = 'ea.wsgi.application'
i don't modified append_slash , event if add append_slash=true doesn't work.
edit2
from django.conf.urls import include, url django.contrib import admin urlpatterns = [ url(r'^visitors/$', views.how_it_works, name='visitors'), # ... ]
Comments
Post a Comment