Repository: doccano/doccano

Issue:
TemplateDoesNotExist Error on start from README instructions
How to reproduce the behaviour
---------

I was following the instructions on the main README to install and start doccano with pip (copied here)

```
pip install doccano
doccano init
doccano createuser --username admin --password pass
doccano webserver --port 8000
```

and then in another terminal

```
doccano task
```

This all looks fine, until I try the next step (visiting in the browser). I get the following error (included the last line of the non-error log for reference)

```
[2021-06-10 09:56:42 -0700] [1046] [INFO] Handling signal: winch
Internal Server Error: /
Traceback (most recent call last):
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 204, in _get_response
    response = response.render()
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/response.py", line 105, in render
    self.content = self.rendered_content
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/response.py", line 81, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/response.py", line 63, in resolve_template
    return select_template(template, using=self.using)
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/loader.py", line 47, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: index.html
Internal Server Error: /favicon.ico
Traceback (most recent call last):
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/core/handlers/base.py", line 204, in _get_response
    response = response.render()
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/response.py", line 105, in render
    self.content = self.rendered_content
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/response.py", line 81, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/response.py", line 63, in resolve_template
    return select_template(template, using=self.using)
  File "/projects/creisle_prj/git/doccano/venv_pipenv/lib/python3.7/site-packages/django/template/loader.py", line 47, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: index.html
```

Your Environment
---------
*   Operating System: centos07
*   Python Version Used: 3.7.2 (virtual environment)
*   When you install doccano: 2021-Jun-10 (Today)
*   How did you install doccano (Heroku button etc): pip



Discussion:
I am experiencing the same behavior.
me too.
> I am experiencing the same behavior.

i figured out. probably you should set `debug` to False in settings.py

Resolving patch:
diff --git a/backend/cli.py b/backend/cli.py
--- a/backend/cli.py
+++ b/backend/cli.py
@@ -6,6 +6,7 @@
 import sys
 
 from .app.celery import app
+os.environ['DEBUG'] = 'False'
 base = os.path.abspath(os.path.dirname(__file__))
 sys.path.append(base)
 manage_path = os.path.join(base, 'manage.py')


Test patch: