Hello,
I made a django project and would like to deploy it on pythonanywhere, but I got the next issue and I don’t know how to solve it. Can somebody help me?
This is the error:
Traceback (most recent call last):
File "/home/Livcamp/.virtualenvs/livcamp.pythonanywhere.com/lib/python3.8/site-packages/django/db/back
ends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/home/Livcamp/.virtualenvs/livcamp.pythonanywhere.com/lib/python3.8/site-packages/django/db/back
ends/sqlite3/base.py", line 328, in execute
return super().execute(query, params)
sqlite3.OperationalError: no such table: blog_category
This is my code models.py
from django.db import models
from django.contrib.auth.models import User
from django.urls import reverse
from django.utils import timezone
# from ckeditor.fields import RichTextField
# Create your models here.
class Category(models.Model):
name = models.CharField(max_length=255)
slug = models.SlugField(null=True)
title_tag = models.CharField(max_length=255, default='Livcamp')
meta_tag = models.CharField(max_length=255, default='')
keyword = models.CharField(max_length=255, default='Livcamp')
def __str__(self):
return self.name
def get_absolute_url(self):
return reverse("add_category")
My settings code:
# Database
# https://docs.djangoproject.com/en/4.2/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
Do I need to share more of my code?
I hope somebody can help me out.