Error on unauthorized access problem in django

45 views
Skip to first unread message

Anjana Balakrishnan

unread,
Jul 13, 2020, 8:13:01 AM7/13/20
to Django users
Hi,
  i am in trouble with django unauthorized access problem.i have a django project and it is now ready for production,so i added debug=False in settings.py file.When i change the debug=false, unauthorized access issue is solved,but the problem is webpages can't access all css and js files(Static folder,)how can i solve tbis issue?Attached a document showing this problems.
UNAUTHORIZED PROBLEM.odp

Jorge Gimeno

unread,
Jul 14, 2020, 2:56:39 PM7/14/20
to django...@googlegroups.com
django.contrib.staticfiles by design will serve static files only when debug is set to False.  It's not designed to serve static files in a production environment.  See here:  https://docs.djangoproject.com/en/3.0/howto/static-files/deployment/

-Jorge


On Mon, Jul 13, 2020 at 5:11 AM Anjana Balakrishnan <anjanabalak...@gmail.com> wrote:
Hi,
  i am in trouble with django unauthorized access problem.i have a django project and it is now ready for production,so i added debug=False in settings.py file.When i change the debug=false, unauthorized access issue is solved,but the problem is webpages can't access all css and js files(Static folder,)how can i solve tbis issue?Attached a document showing this problems.

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2edb567b-0909-4381-a8d7-9634ae688df5o%40googlegroups.com.

talk fun

unread,
Jul 19, 2020, 12:10:35 AM7/19/20
to django...@googlegroups.com
I do not know I am beginner too

Reply all
Reply to author
Forward
0 new messages