Assim que executo o python manage.py runserver ,apresenta o seguinte erro:
OperationalError at /
no such table: galeria_fotografia
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 4.2
Exception Type: OperationalError
Exception Value:
no such table: galeria_fotografia
Exception Location: C:\Users\SJOTJXY\AppData\Roaming\Python\Python311\site-packages\django\db\backends\sqlite3\base.py, line 328, in execute
Raised during: galeria.views.index
Python Executable: C:\Users\SJOTJXY\Projetos\bcp\venv\Scripts\python.exe
Python Version: 3.11.1
Python Path:
['C:\\Users\\SJOTJXY\\Projetos\\bcp',
'C:\\Program Files\\Python311\\python311.zip',
'C:\\Program Files\\Python311\\DLLs',
'C:\\Program Files\\Python311\\Lib',
'C:\\Program Files\\Python311',
'C:\\Users\\SJOTJXY\\Projetos\\bcp\\venv',
'C:\\Users\\SJOTJXY\\Projetos\\bcp\\venv\\Lib\\site-packages',
'C:\\Users\\SJOTJXY\\AppData\\Roaming\\Python\\Python311\\site-packages',
'C:\\Users\\SJOTJXY\\AppData\\Roaming\\Python\\Python311\\site-packages\\win32',
'C:\\Users\\SJOTJXY\\AppData\\Roaming\\Python\\Python311\\site-packages\\win32\\lib',
'C:\\Users\\SJOTJXY\\AppData\\Roaming\\Python\\Python311\\site-packages\\Pythonwin',
'C:\\Program Files\\Python311\\Lib\\site-packages']
Server time: Mon, 24 Apr 2023 15:56:22 -0300
Error during template rendering
In template C:\Users\SJOTJXY\Projetos\bcp\templates\galeria\index.html, error at line 22
no such table: galeria_fotografia
12 <li class="tags__tag">Nebulosa</li>
13 <li class="tags__tag">Estrela</li>
14 <li class="tags__tag">Galáxia</li>
15 <li class="tags__tag">Planeta</li>
16 </ul>
17 </section>
18 <section class="galeria">
19 <div class="cards">
20 <h2 class="cards__titulo">Navegue pela galeria</h2>
21 <ul class="cards__lista">
22 {% if cards %}
23 {% for fotografia in cards %}
24 <li class="card">
25 <a href="{% url 'imagem' fotografia.id %}">
26 {% if fotografia.foto == "" or fotografia.foto == null %}
27 <img class="card__imagem" src="{% static '/assets/imagens/galeria/not-found.png'%}" alt="foto">
28 {% else %}
29 <img class="card__imagem" src="{{ fotografia.foto.url }}" alt="foto">
30 {% endif %}
31 </a>
32 <span class="card__tag">Estrelas</span>