Django HTML does not update in browser

Asked

Viewed 72 times

0

I believe that the structure of my project is somewhat complex. As it is a framework, I did not start it from scratch.

My problem occurs when I try to make changes to the text content of HTML files and start the browser. Some files .html accept these changes, while others do not. HTML files that accept these changes are in the directory test_project, the same directory I run python manage.py runserver. I would say that it is mandatory to start the server from this directory. If I try the main directory, which includes the manage.py primary, get the error no such table: django_session. In turn, HTML files that do not accept the changes are in the directory qa.

What should I do to update HTML files in both directories, test_project and qa?


I hope I have put enough information. Thank you!

.
├── AUTHORS.rst
├── CONTRIBUTING.rst
├── HISTORY.rst
├── LICENSE.md
├── MANIFEST.in
├── Makefile
├── README.rst
├── docs
│   ├── Makefile
│   ├── base.rst
│   ├── conf.py
│   ├── index.rst
│   ├── installation.rst
│   ├── make.bat
│   └── settings.rst
├── manage.py
├── qa
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-37.pyc
│   │   ├── __init__.cpython-38.pyc
│   │   ├── admin.cpython-38.pyc
│   │   ├── apps.cpython-38.pyc
│   │   ├── forms.cpython-38.pyc
│   │   ├── mixins.cpython-38.pyc
│   │   ├── models.cpython-38.pyc
│   │   ├── signals.cpython-38.pyc
│   │   ├── urls.cpython-37.pyc
│   │   ├── urls.cpython-38.pyc
│   │   ├── utils.cpython-38.pyc
│   │   ├── views.cpython-37.pyc
│   │   └── views.cpython-38.pyc
│   ├── admin.py
│   ├── apps.py
│   ├── forms.py
│   ├── migrations
│   │   ├── 0001_initial.py
│   │   ├── 0002_auto_20160412_1336.py
│   │   ├── 0003_auto_20160414_1413.py
│   │   ├── 0004_answer_updated.py
│   │   ├── 0005_auto_20160519_1057.py
│   │   ├── 0006_question_total_points.py
│   │   ├── 0007_answer_total_points.py
│   │   ├── 0008_auto_20160719_0729.py
│   │   ├── 0009_auto_20160919_1528.py
│   │   ├── 0010_auto_20160919_2033.py
│   │   ├── 0011_question_slug.py
│   │   ├── 0012_remove_question_views.py
│   │   ├── __init__.py
│   │   └── __pycache__
│   │       ├── 0001_initial.cpython-38.pyc
│   │       ├── 0002_auto_20160412_1336.cpython-38.pyc
│   │       ├── 0003_auto_20160414_1413.cpython-38.pyc
│   │       ├── 0004_answer_updated.cpython-38.pyc
│   │       ├── 0005_auto_20160519_1057.cpython-38.pyc
│   │       ├── 0006_question_total_points.cpython-38.pyc
│   │       ├── 0007_answer_total_points.cpython-38.pyc
│   │       ├── 0008_auto_20160719_0729.cpython-38.pyc
│   │       ├── 0009_auto_20160919_1528.cpython-38.pyc
│   │       ├── 0010_auto_20160919_2033.cpython-38.pyc
│   │       ├── 0011_question_slug.cpython-38.pyc
│   │       ├── 0012_remove_question_views.cpython-38.pyc
│   │       └── __init__.cpython-38.pyc
│   ├── mixins.py
│   ├── models.py
│   ├── signals.py
│   ├── static
│   │   ├── css
│   │   │   └── qa.css
│   │   └── qa
│   │       ├── icon.ico
│   │       ├── qa_index.jpeg
│   │       ├── qa_page.jpeg
│   │       ├── question.jpg
│   │       └── user.png
│   ├── templates
│   │   ├── 403.html
│   │   └── qa
│   │       ├── base.html
│   │       ├── create_answer.html
│   │       ├── create_comment.html
│   │       ├── create_question.html
│   │       ├── detail_question.html
│   │       ├── index.html
│   │       ├── profile.html
│   │       ├── update_answer.html
│   │       └── update_question.html
│   ├── urls.py
│   ├── utils.py
│   └── views.py
├── requirements.txt
├── runtests.py
├── setup.py
├── test_project
│   ├── core
│   │   ├── __init__.py
│   │   ├── __pycache__
│   │   │   ├── __init__.cpython-38.pyc
│   │   │   ├── admin.cpython-38.pyc
│   │   │   ├── forms.cpython-38.pyc
│   │   │   ├── models.cpython-38.pyc
│   │   │   ├── tests.cpython-38.pyc
│   │   │   └── views.cpython-38.pyc
│   │   ├── admin.py
│   │   ├── apps.py
│   │   ├── forms.py
│   │   ├── migrations
│   │   │   ├── __init__.py
│   │   │   └── __pycache__
│   │   │       └── __init__.cpython-38.pyc
│   │   ├── models.py
│   │   ├── templates
│   │   │   ├── login.html
│   │   │   └── register.html
│   │   ├── tests.py
│   │   └── views.py
│   ├── db.sqlite3
│   ├── manage.py
│   ├── requirements.txt
│   └── simpleqa
│       ├── __init__.py
│       ├── __pycache__
│       │   ├── __init__.cpython-38.pyc
│       │   ├── settings.cpython-38.pyc
│       │   ├── urls.cpython-38.pyc
│       │   └── wsgi.cpython-38.pyc
│       ├── settings.py
│       ├── urls.py
│       └── wsgi.py
├── tests
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-37.pyc
│   │   ├── __init__.cpython-38.pyc
│   │   ├── settings.cpython-37.pyc
│   │   ├── settings.cpython-38.pyc
│   │   ├── test_mixins.cpython-38.pyc
│   │   ├── test_models.cpython-38.pyc
│   │   └── test_views.cpython-38.pyc
│   ├── settings.py
│   ├── test_mixins.py
│   ├── test_models.py
│   └── test_views.py
└── tree.txt

20 directories, 124 files

1 answer

0


Maybe, you need to make a correct note in your Settings in the TAG TEMPLATES follows mine as an example:

> TEMPLATE_DIR = os.path.join(BASE_DIR, "templates") 
>      TEMPLATES = [
>     {
>         'BACKEND': 'django.template.backends.django.DjangoTemplates',
>         'DIRS': [TEMPLATE_DIR],
>         'APP_DIRS': True,
>         'OPTIONS': {
>             'context_processors': [
>                 'django.template.context_processors.media',
>                 'django.template.context_processors.debug',
>                 'django.template.context_processors.request',
>                 'django.contrib.auth.context_processors.auth',
>                 'django.contrib.messages.context_processors.messages',
>             ],
>         },
>     }, ]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.