Admin Site: TemplateDoesNotExist at /admin/

前端 未结 16 1819
鱼传尺愫
鱼传尺愫 2020-12-09 04:00

I\'m following Django\'s official Tutorial 2 but for some reason cannot create an admin site despite following all the steps correctly to my understanding.

This is t

16条回答
  •  暖寄归人
    2020-12-09 04:33

    I'm adding an "answer" as I cannot with my current "reputation" add a comment.

    Following Aaron solution:

    In a project with Django 1.4 with docker with the same issue (accessing yourproject/admin/login.html or yourproject/admin/index.html). I used in python.dockerfile this, and solved:

    "RUN pip install -r requirements.txt --no-cache-dir"
    

    Before I did this, I verified entering inside the docker, that inside the folder usr/local/lib/python2.7/site-packages/django/contrib/admin/ didnt exist the folder /templates/.

    I was reading this before coming to this post: https://www.mail-archive.com/search?l=django-users@googlegroups.com&q=subject:%22TemplateDoesNotExist+at+%5C%2Fadmin%5C%2F%22&o=newest&f=1

提交回复
热议问题