Remove custom 500 error view.
This commit is contained in:
@@ -12,22 +12,6 @@ urlpatterns = patterns(
|
||||
url(r'^docs/', include('rest_framework_swagger.urls')),
|
||||
)
|
||||
|
||||
|
||||
def handler500(request):
|
||||
"""
|
||||
500 error handler which includes ``request`` in the context.
|
||||
|
||||
Templates: `500.html`
|
||||
Context: None
|
||||
"""
|
||||
from django.template import Context, loader
|
||||
from django.http import HttpResponseServerError
|
||||
|
||||
t = loader.get_template('500.html') # You need to create a 500.html template.
|
||||
return HttpResponseServerError(t.render(Context({
|
||||
'request': request,
|
||||
})))
|
||||
|
||||
if settings.DEBUG:
|
||||
from django.conf.urls.static import static
|
||||
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
Reference in New Issue
Block a user