can me out. have problem in seeing .htm files on browser.i have installed django-sentry logging errors. in settings.py if change debug = true can see contents of file opened in browser of images not shown. when debug =false error of 500.html displaying through sentry. error have seen sentry recording records in database file. , error : improperlyconfigured internal server error: /media/data/1/ahtm/noimgpreview.htm traceback (most recent call last):
file "/var/www/django-trunk/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs)
file "/var/www/django-trunk/django/views/static.py", line 41, in serve return staticfiles_serve(request, path, document_root, show_indexes, insecure)
file "/var/www/django-trunk/django/contrib/staticfiles/views.py", line 45, in serve raise improperlyconfigured("the view serve static files can "
improperlyconfigured: view serve static files can used if debug setting true or --insecure option of 'runserver' used
but files mp3,txt there contents shown on browser both settings of debug.how can view .htm files on browser.only .htm files not displayed other files different formats displayed properly.
please me out.
the strange thing others files served, maybe, it's cache problem? read django.contrib.staticfiles documentation learn how serve static files in production, in particular collectstatic management command.
Comments
Post a Comment